:root {
    --butter-yellow: #FFD700;
    --butter-light: #FFF8DC;
    --brain-blue: #1a237e;
    --brain-dark: #0d1456;
    --brain-light: #3949ab;
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --shadow-soft: rgba(255, 215, 0, 0.2);
    --shadow-hard: rgba(26, 35, 126, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* body.dark-mode {
    background: linear-gradient(135deg, var(--brain-dark) 0%, var(--brain-blue) 100%);
    color: var(--text-light);
} */

/* Particles Background */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--butter-yellow);
    border-radius: 50%;
    animation: float 6s infinite ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0;
    }

    50% {
        transform: translateY(-100px) rotate(180deg);
        opacity: 1;
    }
}

/* Navigation */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

/* .dark-mode .navbar {
    background: rgba(26, 35, 126, 0.95) !important;
    border-bottom: 1px solid rgba(255, 215, 0, 0.5);
} */

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--butter-yellow), var(--brain-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--brain-blue) !important;
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--butter-yellow);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.search-container {
    position: relative;
}

.search-input {
    border: 2px solid var(--butter-yellow);
    border-radius: 25px;
    padding: 8px 40px 8px 15px;
    background: rgba(255, 248, 220, 0.8);
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 20px var(--shadow-soft);
    outline: none;
    transform: scale(1.05);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--brain-blue);
}

.theme-toggle {
    background: var(--butter-yellow);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #0d1456;
}

.theme-toggle:hover {
    transform: rotate(180deg);
    box-shadow: 0 5px 15px var(--shadow-soft);
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.8), rgba(255, 215, 0, 0.6)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080"><rect fill="%23f0f2f5" width="1920" height="1080"/><circle cx="200" cy="200" r="150" fill="%23FFD700" opacity="0.1"/><circle cx="1600" cy="800" r="200" fill="%231a237e" opacity="0.1"/><path d="M0,400 Q480,200 960,400 T1920,400 V1080 H0 Z" fill="%23ffffff" opacity="0.05"/></svg>');
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255, 215, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(26, 35, 126, 0.4) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

#blog-post,
.blog-post-content {
    position: relative;
    z-index: 100;
    /* Higher value so it overlaps hero */
}



@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.hero-content {
    z-index: 2;
    text-align: center;
    color: white;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: slideUp 1s ease-out;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: slideUp 1s ease-out 0.3s both;
}

.cta-btn {
    background: linear-gradient(135deg, var(--butter-yellow), #ffcc00);
    color: var(--brain-dark);
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    animation: slideUp 1s ease-out 0.6s both;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.cta-btn:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.4);
    color: var(--brain-dark);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Categories Section */
.categories {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--butter-light) 0%, #818bc9 100%);
}

/* .dark-mode .categories {
    background: linear-gradient(135deg, var(--brain-dark) 0%, var(--brain-blue) 100%);
} */

.category-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* .dark-mode .category-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
} */

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: left 0.5s ease;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.category-icon {
    font-size: 3rem;
    color: var(--brain-blue);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.2);
    color: var(--butter-yellow);
}

/* Featured Articles Carousel */
.featured-section {
    padding: 100px 0;
    background: var(--brain-blue);
    color: white;
}

.carousel-item img {
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
}

.carousel-caption {
    background: rgba(53, 53, 53, 0.7);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(1px);
}

/* Blog Cards */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

/* .dark-mode .blog-card {
    background: rgba(255, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 217, 0, 0.2);
} */

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.blog-card img {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover img {
    transform: scale(1.1);
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-meta {
    color: var(--butter-yellow);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* .dark-mode .blog-meta {
    color: var(--butter-light);
} */

/* Scroll Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 9999;
    background: rgba(255, 215, 0, 0.2);
}

.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--butter-yellow), var(--brain-blue));
    width: 0%;
    transition: width 0.3s ease;
}

/* Sidebar */
.sidebar {
    background: rgba(255, 248, 220, 0.8);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

/* .dark-mode .sidebar {
    background: rgba(26, 35, 126, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.2);
} */

.tag {
    display: inline-block;
    background: var(--butter-yellow);
    color: var(--brain-dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 5px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--brain-blue);
    color: white;
    transform: scale(1.1);
}

/* About Page Styles */
.about-hero {
    min-height: 140vh;
    display: flex;
    align-items: center;
    padding-top: 90px;
    background: linear-gradient(135deg, var(--brain-blue) 0%, var(--butter-yellow) 100%);
}

.about-image {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) rotateY(0deg);
    transition: all 0.3s ease;
    /* height: 80vh; */
}

.about-image:hover {
    transform: perspective(1000px) rotateY(10deg);
}

.stats-counter {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    margin-bottom: 1rem;
}

.counter-number {
    font-size: 3rem;
    font-weight: 900;
    /* color: var(--butter-yellow); */
    color: white;
    display: block;
}

/* Contact Form */
.contact-form {
    background: rgba(255, 248, 220, 0.8);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(10px);
}

/* .dark-mode .contact-form {
    background: rgba(26, 35, 126, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.2);
} */

.form-control {
    border: 2px solid var(--butter-yellow);
    border-radius: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 20px var(--shadow-soft);
    border-color: var(--brain-blue);
    background: white;
}

/* Footer */
.footer {
    background: var(--brain-dark);
    color: var(--text-light);
    padding: 50px 0 20px;
}

.social-icon {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: var(--butter-yellow);
    color: var(--brain-dark);
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
    background: white;
    color: var(--brain-blue);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }

    .category-card {
        margin-bottom: 1rem;
    }
}

/* Custom Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Page Transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.page-transition.active {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--butter-yellow), #ffcc00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brain-dark);
    font-size: 1.5rem;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}