/* Subtle background animations for homepage */

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, -10px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* Floating geometric shapes */
.subjects::before,
.subjects::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    pointer-events: none;
}

.subjects {
    position: relative;
    overflow: hidden;
}

.subjects::before {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.subjects::after {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    bottom: -80px;
    left: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

/* Add soft glow blobs inside card containers */
.subject-cards {
    position: relative;
    z-index: 1;
}

.subject-cards::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    top: 20%;
    left: 10%;
    border-radius: 50%;
    animation: pulse-glow 3s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.subject-cards::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    bottom: 10%;
    right: 5%;
    border-radius: 50%;
    animation: pulse-glow 4s ease-in-out infinite 1s;
    pointer-events: none;
    z-index: -1;
}

/* Card entrance animation on page load */
.card {
    animation: float 0.6s ease-out;
    animation-fill-mode: both;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .subjects::before {
        width: 250px;
        height: 250px;
        top: -50px;
        right: -50px;
    }
    
    .subjects::after {
        width: 200px;
        height: 200px;
        bottom: -60px;
        left: -60px;
    }
    
    .subject-cards::before,
    .subject-cards::after {
        display: none;
    }
}
