:root {
    --primary-color: #1e90ff;
    --secondary-color: #00bfff;
    --text-color: #333;
    --bg-color: #f0f4f8;
    --card-bg: #fff;
}




/* Global Styles */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Preloader */
#preloader {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    border: 4px solid var(--primary-color);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll-to-Top Button */
#scrollToTopBtn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: none;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-size: 24px;
    z-index: 9999; /* Add this line to ensure it's on top of everything */
}


#scrollToTopBtn:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* Hero Section */
/* Hero Section */
/* Hero Section */
header.hero {
    background: 
        linear-gradient(to right, 
            rgba(30, 144, 255, 0.9) 0%, /* Softer on the left */
            rgba(0, 191, 255, 0.8) 25%, 
            rgba(65, 105, 225, 0.7) 75%, 
            rgba(0, 0, 205, 0.6) 100% /* Stronger on the right */
        ),
        url('background.jpeg');
    background-size: 400% 400%, cover;
    background-position: 0% 50%, center;
    animation: gradientBG 15s ease infinite;
    color: #fff;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}



@media (max-aspect-ratio: 730/450) {
    header.hero {
        background-size: auto 100%;
    }
}

@media (min-aspect-ratio: 730/450) {
    header.hero {
        background-size: 100% auto;
    }
}
@keyframes gradientBG {
    0% {
        background-position: 0% 50%, center;
    }
    50% {
        background-position: 100% 50%, center;
    }
    100% {
        background-position: 0% 50%, center;
    }
}




/* ... rest of the hero styles ... */

header.hero h1 {
    font-size: 4rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInDown 1s ease-out;
}

header.hero p {
    font-size: 1.5rem;
    max-width: 600px;
    margin-top: 20px;
    animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Particle Background */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Timeline Section */
.timeline {
    background: var(--card-bg);
    padding: 60px 0;
    position: relative;
}

.timeline h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: var(--primary-color);
    animation: fadeInUp 1s ease-out;
}

.timeline-container {
    display: flex;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.timeline-item {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
}

.timeline-item:hover, .timeline-item.active {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background: var(--primary-color);
    color: #fff;
}

.timeline-item:hover::before, .timeline-item.active::before {
    box-shadow: 0 6px 12px rgba(14, 0, 163, 0.5);
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    animation: tooltipFadeIn 0.3s forwards;
}

@keyframes tooltipFadeIn {
    to { opacity: 1; }
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    transform: translateY(-50%);
    z-index: 1;
}

/* Courses Section */
.courses {
    padding: 60px 0;
    background: var(--bg-color);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 1.5s;
}

.semester {
    max-width: 900px;
    margin: 0 auto 40px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 30px;
    display: none;
    transition: all 0.5s ease;
}

.semester h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2rem;
}

.course {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.course:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background: var(--secondary-color);
    color: #fff;
}

.course h4 {
    color: var(--primary-color);
    margin: 0 0 10px 0;
    transition: color 0.3s ease;
}

.course:hover h4 {
    color: #fff;
}

.course ul {
    padding-left: 20px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

@media (max-width: 768px) {
    .timeline-container {
        flex-direction: column;
        align-items: center;
    }

    .timeline-item {
        margin-bottom: 20px;
        width: 80%;
    }

    .timeline-container::before {
        display: none;
    }

    header.hero h1 {
        font-size: 3rem;
    }

    header.hero p {
        font-size: 1.2rem;
    }
}
.rotating-text {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 20px;
    height: 1.5em;
    overflow: hidden;
    position: relative;
  }
  
  .rotating-text span {
    display: block;
    height: 100%;
    padding-left: 10px;
    color: #fff;
    animation: spin_words 10s infinite;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
  }
  
  @keyframes spin_words {
    0% { transform: translateY(0%); }
    20% { transform: translateY(0%); }
    25% { transform: translateY(-100%); }
    45% { transform: translateY(-100%); }
    50% { transform: translateY(-200%); }
    70% { transform: translateY(-200%); }
    75% { transform: translateY(-300%); }
    95% { transform: translateY(-300%); }
    100% { transform: translateY(-400%); }
  }
  
  .rotating-text span:nth-child(2) {
    animation-delay: 2s;
  }
  .rotating-text span:nth-child(3) {
    animation-delay: 4s;
  }
  .rotating-text span:nth-child(4) {
    animation-delay: 6s;
  }
  .rotating-text span:nth-child(5) {
    animation-delay: 8s;
  }
  document.addEventListener('DOMContentLoaded', function() {
    gsap.to(".rotating-text span", {
      yPercent: -400,
      ease: "none",
      stagger: {
        amount: 10,
        repeat: -1
      }
    });
  });

