html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    background: linear-gradient(rgba(173, 216, 230, 0.35), rgba(173, 216, 230, 0.35)),
        url("images/back3.jpg") no-repeat top center fixed;
    background-size: cover;
    background-position: 50% 10%;
    background-repeat: no-repeat;
    color: #1b3a4b;
    opacity: 0.95;
}

/* Navbar */
.navbar {
    background: transparent;
    padding: 20px 0;
    text-align: center;
}

.nav-container {
    max-width: 850px;
    margin: 0 auto;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px;
}

.navbar a {
    color: #010a0f;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 700;
    transition: color 0.2s;
}

.navbar a:hover,
.navbar a.active {
    color: #1b3a4b;
    font-weight: 700;
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 850px;
    margin: 0 auto;
    padding: 40px 20px 20px 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-top: 30px;
}

.profile-img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #3a97d5;
    box-shadow: 0 6px 26px rgba(0, 0, 0, 0.15);
    margin-bottom: 14px;
    background: #fff;
}

h1 {
    margin: 18px 0 8px 0;
    font-size: 2.2em;
}

h2 {
    color: #4ea8de;
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Projects Section */
.projects {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-bottom: 15px;
}

.project-card {
    background: rgba(173, 216, 230, 0.2);
    border-left: 5px solid #4ea8de;
    padding: 16px;
    border-radius: 9px;
    flex: 1 1 380px;
    min-width: 320px;
    color: #1b3a4b;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card p {
    margin-bottom: 12px;
}

/* Show Project Button */
.show-project-btn {
    background: #4ea8de;
    color: #fff;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    width: 160px;
    height: 45px;
    transition: background 0.2s;
}

.show-project-btn:hover {
    background: #1e81b0;
}

/* Skills Section */
.falling-badge {
    position: absolute;
    width: 48px;
    height: 48px;
    top: -60px;
    left: var(--start-left, 50%);
    opacity: 0.6;
    /* reduce brightness but keep visible */

    /* IMPORTANT FIX */
    filter: none !important;

    animation: asteroid-fall 5s linear infinite;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    position: relative;
    z-index: 2;
}

.skills-list span {
    background: #e3f2fd;
    color: #1b3a4b;
    padding: 7px 18px;
    border-radius: 12px;
    font-size: 0.99em;
    font-weight: 500;
}

/* Contact List */
.contact-list {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.contact-list a img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    transition: transform 0.18s;
}

.contact-list a:hover img {
    transform: scale(1.15);
}

/* CV Button */
.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-top: 18px;
    color: #1b3a4b;
    background: #f0f8ff;
    border-radius: 18px;
    padding: 12px 26px;
    text-decoration: none;
    border: 1px solid #cfe8ff;
}

.cv-btn:hover {
    background: #e0f0ff;
}

.cv-btn img {
    width: 34px;
    height: 34px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    color: #0c344b;
    font-size: 0.95em;
    margin-top: 40px;
}

footer p::after {
    content: "";
    display: block;
    margin: 10px auto 0;
    width: 60px;
    height: 1px;
    background-color: #4ea8de;
    opacity: 0.4;
}

/* Sections */
section {
    display: none;
}

section.active {
    display: block;
}

section p {
    text-align: justify;
}

/* Certificates */
.certificates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 12px;
}

.certificate-btn {
    background: #4ea8de;
    color: #fff;
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    transition: background 0.3s;
}

.certificate-btn:hover {
    background: #1e81b0;
}

/* Skills Animation */
#skills {
    position: relative;
    overflow: hidden;
}

.skills-badge-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.falling-badge {
    position: absolute;
    width: 48px;
    height: 48px;
    top: -60px;
    animation: asteroid-fall 5s linear infinite;
}

@keyframes asteroid-fall {
    0% {
        top: -60px;
        opacity: 0;
    }

    40% {
        opacity: 1;
    }

    100% {
        top: 110%;
        opacity: 0.4;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .project-card {
        flex: 1 1 100%;
    }
}

@media (max-width: 600px) {
    .profile-img {
        width: 110px;
        height: 110px;
    }

    .projects {
        flex-direction: column;
    }

    h1 {
        font-size: 1.55em;
    }
}