body {
    background-color: #f5f5f5;
}

.navbar a {
    position: relative;
    text-decoration: none;
}

.nav-link {
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease-in-out;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 3px;
    transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
}

.navbar a.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background-color: black;
}

.hero {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 40px;
    height: 100vh;
    animation: fadeIn 2s ease-in-out;
}

.hero-content {
    max-width: 600px;
    animation: slideInLeft 1s ease-in-out;
}

.hero-text {
    max-width: 60vh;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    padding: 10px 20px;
    animation: slideInRight 1s ease-in-out;
}

.blob {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: blobAnimation 5s infinite;
}

.blob svg {
    position: absolute;
    width: 480px;
    z-index: 1;
}

.profile-img {
    width: 340px;
    position: relative;
    z-index: 2;
    margin-top: -90px;
    animation: fadeIn 2s ease-in-out;
}

.project-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
    width: auto;
    padding: 0;
    transition: transform 0.3s ease-in-out;
}

.project-card:hover {
    transform: translateY(-10px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes blobAnimation {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
    }
    .hero-content {
        max-width: 100%;
        justify-content: start;
    }
    .hero-text {
        max-width: 100%;
    }
    .hero-buttons button {
        width: 100%;
        margin-bottom: 10px;
    }
    .blob svg {
        width: 250px;
    }
    .profile-img {
        width: 180px;
    }
    .navbar-collapse {
        position: absolute;
        top: 100%; /* Places it right below the navbar */
        left: 0;
        width: 100%;
        background: white; /* Adjust to match navbar color */
        z-index: 1000; /* Ensures it appears above content */
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Optional: Adds shadow for better visibility */
    }
    .navbar a {
        padding-left: 10px;
    }
}

/* Additional media queries for better responsiveness */
@media (max-width: 576px) {
    .hero {
        padding: 20px;
    }
    .hero-content {
        padding: 10px;
    }
    .hero-text {
        font-size: 1rem;
    }
    .profile-img {
        width: 150px;
        margin-top: -60px;
    }
    .blob svg {
        width: 200px;
    }
    .navbar a {
        padding-left: 5px;
    }
    .navbar-collapse {
        top: 100%; /* Places it right below the navbar */
        left: 0;
        width: 100%;
        background: white; /* Adjust to match navbar color */
        z-index: 1000; /* Ensures it appears above content */
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Optional: Adds shadow for better visibility */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        padding: 30px;
    }
    .hero-content {
        max-width: 80%;
    }
    .hero-text {
        max-width: 80%;
    }
    .profile-img {
        width: 300px;
        margin-top: -80px;
    }
    .blob svg {
        width: 400px;
    }
}

/* Project section style */
.project-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
    width: auto;
    padding: 0;
    transition: transform 0.3s ease-in-out;
}

.project-text {
    padding: 30px;
    margin: auto;
}
.project-title {
    font-size: 1.8rem;
    font-weight: bold;
}
.btn-outline-dark {
    border-radius: 30px;
    padding: 10px 20px;
}
.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes blobAnimation {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}
/*Skills card section*/
.skillCard{
    transition: transform 0.3s ease-in-out;
}
.skillCard:hover{
    cursor: pointer;
    transform: translateY(-10px);
}
/*Contact card animation*/
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.contact-section.show {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure skills and contact sections have proper spacing */
#Skills {
    padding: 50px 0;
    margin-bottom: 50px; /* Ensures spacing before Contact section */
}

#contact {
    padding: 60px 0;
}

@media (max-width: 768px) {
    /* Adjusts skill cards layout for small screens */
    .skillCard {
        width: 100%;
    }

    /* Adds extra space between sections to avoid overlap */
    #Skills {
        margin-bottom: 80px;
    }
}
