.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 15px 40px;

    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(10px);
}

/* Left and right groups */
.nav-left,
.nav-right {
    display: flex;
    gap: 20px;
}

/* Links */
.navbar a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

/* Hover effect */
.navbar a:hover {
    color: #38bdf8;
}

.navbar a.active {
    color: #38bdf8;
    border-bottom: 2px solid #38bdf8;
}

@media (max-width: 768px) {
    header,
    .middle-bg,
    .footer-bg {
        background-attachment: scroll;
    }
    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .nav-left,
    .nav-right {
        justify-content: center;
    }
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
}

header {
    min-height: auto;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    padding: 60px 20px;

    /* ❌ REMOVE bg-top */
    /* background: url("assets/bg-top.jpg"); */

    /* ✅ Use same style as middle */
    background: linear-gradient(
        rgb(4, 5, 5),
        rgba(5, 5, 6, 0.403)
    );
/* 
    background-color: #0f172a; */
}

.profile {
    width: 150px;
    border-radius: 50%;
    border: 3px solid #38bdf8;
}

.container {
    max-width: 800px;
    margin: auto;
}

section {
    padding: 30px;
    max-width: 900px;
    margin: 20px auto;

    background: rgba(30, 41, 59, 0.6);
    border-radius: 10px;
    backdrop-filter: blur(8px);
}

h2 {
    color: #38bdf8;
}

.skills span {
    display: inline-block;
    background: #1e293b;
    padding: 8px 12px;
    margin: 5px;
    border-radius: 5px;
}

.card {
    background: #1e293b;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
}

/* footer {
    text-align: center;
    padding: 10px 0;
    background: #020617;
} */    

a {
    color: #38bdf8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.middle-bg {
    min-height: 100vh;

    background: linear-gradient(
        rgba(5, 5, 6, 0.189),
        rgba(15, 23, 42, 0.9)
    ),
    url("assets/bg-middle.png");


    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    background-attachment: fixed; /* 🔥 KEY */
}

footer {
    text-align: center;
    padding: 20px 0;

    background: linear-gradient(
        rgba(2, 6, 23, 0.204),
        rgba(2, 6, 23, 0.95)
    ),
    url("assets/bg-bottom.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    background-attachment: fixed;
}