/* Improved Header with Solid Design */
header {
    background-color: rgba(255, 255, 255, 0.98);
    color: var(--text-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(77, 109, 227, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 4px solid;
    border-image: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color)) 1;
}


header.scrolled {
    padding: 0.7rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.social-icons .fa-graduation-cap {
    /* Ensure the icon is displayed correctly */
    transform: none !important;
}

.social-icons a:nth-child(3) .fa-graduation-cap {
    transform: none !important;
}

.nav-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    opacity: 0.03;
    border-radius: 10px;
    transform: rotate(45deg);
    z-index: -1;
}

.nav-container::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: 10%;
    width: 25px;
    height: 25px;
    background: var(--accent-color);
    opacity: 0.05;
    border-radius: 50%;
    z-index: -1;
}

/* Logo styling */
.logo {
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
    padding: 0.5rem 0;
    z-index: 2;
}

/* Add logo highlight box */
.logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    width: calc(100% + 20px);
    height: 100%;
    background: rgba(77, 109, 227, 0.06);
    border-radius: 12px;
    z-index: -1;
    transform: skewX(-10deg);
    transition: all 0.3s ease;
}

.logo:hover::before {
    background: rgba(77, 109, 227, 0.1);
    transform: skewX(-10deg) translateX(3px);
}

/* Add logo accent line */
.logo::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 40%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.logo:hover::after {
    width: 70%;
    opacity: 0.7;
}

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 1.5rem;
    position: relative;
}

.nav-links a {
    color: var(--text-color);
    position: relative;
    font-weight: 500;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 10px;
    display: inline-block;
    z-index: 1;
}

/* Create hover box effect */
.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 10px;
    z-index: -1;
    transition: all 0.3s ease;
    transform: scale(0.85);
    opacity: 0;
}

.nav-links a:hover::before,
.nav-links a.active::before {
    background: rgba(77, 109, 227, 0.1);
    transform: scale(1);
    opacity: 1;
}

.nav-links a.active::before {
    background: rgba(77, 109, 227, 0.15);
}

/* Add a subtle top accent for links */
.nav-links a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--secondary-gradient);
    border-radius: 3px;
    transition: all 0.3s ease;
    opacity: 0;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 70%;
    opacity: 1;
}

.nav-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(77, 109, 227, 0.08);
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(77, 109, 227, 0.1);
    position: relative;
    z-index: 1001;
}

.hamburger i {
    color: var(--primary-color);
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.hamburger:hover {
    background: rgba(77, 109, 227, 0.12);
}

.hamburger:hover i {
    transform: scale(1.1);
}

/* Mobile Menu Animation */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Styles */
@media (max-width: 860px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 45%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: all 0.4s ease-in-out;
        box-shadow: -10px 0 30px rgba(77, 109, 227, 0.1);
        z-index: 1000;
        border-left: 3px solid var(--primary-color);
        padding: 2rem;
    }

    .nav-links::before,
    .nav-links::after {
        content: '';
        position: absolute;
        width: 80%;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(77, 109, 227, 0.2), transparent);
        left: 10%;
    }

    .nav-links::before {
        top: 15%;
    }

    .nav-links::after {
        bottom: 15%;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1rem 0;
        width: 100%;
        text-align: center;
        opacity: 0;
    }

    .nav-links.active li {
        animation: fadeInRight 0.4s ease forwards;
    }

    .nav-links.active li:nth-child(1) {
        animation-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        animation-delay: 0.2s;
    }

    .nav-links.active li:nth-child(3) {
        animation-delay: 0.3s;
    }

    .nav-links.active li:nth-child(4) {
        animation-delay: 0.4s;
    }

    .nav-links.active li:nth-child(5) {
        animation-delay: 0.5s;
    }

    .nav-links a {
        display: block;
        padding: 0.8rem 1.5rem;
        width: 100%;
        font-size: 1.1rem;
    }

    .nav-links a::before {
        opacity: 1;
        transform: scale(1);
    }

    .nav-links a::after {
        display: none;
    }

    /* Overlay when menu is open */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Change hamburger icon when menu is open */
    .hamburger.active i {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.4rem;
    }

    .nav-links {
        width: 85%;
    }

    .hamburger {
        width: 45px;
        height: 45px;
    }
}