html {
    scroll-behavior: smooth;
}

/* General Body Styling */
body {
    background: #f0f4f8;
    background: var(--main-bg, #f0f4f8);
    /* Fallback */
    color: #2c3e50;
    /* Light text for contrast */
    font-family: 'Arial', sans-serif;
    padding-top: 60px;
}

/* Custom Navbar Styles */
.custom-navbar {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 0.8rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.custom-navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.custom-navbar .logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    transition: color 0.3s ease;
}

.custom-navbar .logo:hover {
    color: #1abc9c; /* Subtle teal color for a modern feel */
    transform: translateY(-2px); /* Slight upward movement remains */
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Soft shadow effect */
}

.custom-navbar .nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    transition: all 0.3s ease-in-out;
}

.custom-navbar .nav-links li {
    display: inline;
}

.custom-navbar .nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    transition: color 0.3s ease;
}

.custom-navbar .nav-links a:hover {
    color: #1abc9c; /* Subtle teal for consistency with the logo */
    letter-spacing: 0.5px; /* Slight increase in letter spacing */
    position: relative; /* Enable positioning for border animation */
}

.custom-navbar .nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px; /* Just below the text */
    width: 0;
    height: 2px; /* Thin underline */
    background: linear-gradient(90deg, #1abc9c, #16a085); /* Gradient underline */
    transition: width 0.3s ease-in-out;
}

.custom-navbar .nav-links a:hover::after {
    width: 100%; /* Full width underline on hover */
}


/* Menu Toggle (Bars) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.menu-toggle .bar:hover {
    background-color: #1abc9c; /* Consistent hover color */
    transform: scale(1.1); /* Slight enlargement for interactivity */
}

/* Menu Toggle (Cross) */
.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Header Section */
#header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 15px;
    margin-bottom: 10px;
}

#header img {
    width: 175px;
    height: 175px;
    border-radius: 50%;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin: 10px 0;
    text-transform: uppercase;
}

h3 {
    font-size: 1.75rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    margin: 5px 0 15px;
}

.bio {
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

.bio-text {
    font-family: 'Poppins', sans-serif;
    /* Clean and modern font */
    font-size: 1rem;
    /* Adjust the font size */
    line-height: 1.8;
    /* Spacing between lines */
    text-align: center;
    /* Centers the text horizontally */
    color: #2c3e50;
    /* Neutral text color */
    margin: 20px auto;
    /* Centers the paragraph block */
    width: 60%;
    /* Restricts the paragraph width to keep it on 3 lines */
    word-wrap: break-word;
    /* Ensures words wrap to the next line */
}


.bio i {
    margin-right: 8px;
}

#social-media {
    display: flex;
    justify-content: center;
    /* Center icons horizontally */
    align-items: center;
    /* Center icons vertically */
    gap: 20px;
    /* Even spacing between icons */
}

#social-media a {
    font-size: 32px;
    margin: 0 10px;
    color: #2c3e50;
    padding: 10px;
    display: inline-block;
    transition: color 0.3s ease;
}

#social-media a:hover {
    color: #8499ad;
    transform: scale(1.1) rotate(3deg);
    transition: transform 0.3s ease, color 0.3s ease;
}

.btn:focus,
#social-media a:focus {
    outline: 3px dashed #007bff;
    outline-offset: 2px;
}


hr {
    width: 70%;
    margin: 20px auto;
    border-top: 2px solid #b0bec5;
}

/* Skill Set Section */
#skill-set {
    text-align: center;
    margin-top: 0px;
    margin: 0;
    /* Reduced margin */
    padding-top: 0px;
    padding-bottom: 20px;
    padding-right: 20px;
    padding-left: 20px;
    font-family: 'Roboto', sans-serif;
}

h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-top: 0;
    /* Reduced top margin */
    margin-bottom: 20px;
    /* Reduced bottom margin */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    /* For positioning the underline */
    overflow: hidden;
    /* Ensures the line doesn't overflow the element */
    transition: color 0.3s ease;
    /* Smooth transition for text color */
}

h2:hover {
    color: #575f68;
    /* Change text color on hover */
}

.skills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 2 columns of equal width */
    gap: 20px;
    /* Space between items */
    justify-content: center;
    /* Horizontally center the grid */
    align-items: center;
    /* Vertically align items inside the grid */
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 900px;
    /* Adjust max-width to fit the content */
}

.skills li {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #2c3e50;
    /* font-weight: 600; */
    line-height: 1.6;
    padding: 10px;
}

.skills li img {
    width: 50px;
    height: 50px;
    margin-right: 15px;
}

.skills li:hover {
    background-color: #eef2f6;
    transform: translateY(-5px);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.skills li a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.3s ease-in-out;
}

.skills li a:hover {
    color: #007bff;
}

/* Projects Section */
#project-list {
    margin-top: 0px;
    padding-top: 0px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 0px;
    overflow: hidden;
}

#project-list h2 {
    font-weight: 600;
    font-size: 2.5rem;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-align: center;
    color: #333;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-content: center;
    /* Ensures single project stays centered */
    overflow: hidden;
    /* Prevents hover scaling from affecting layout */
}

.card {
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Subtle shadow */
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    /* Smooth transitions */
}

.card:hover {
    box-shadow: 0 10px 20px rgba(10, 146, 180, 0.4);
    border-color: rgba(10, 146, 180, 0.7);
    background-color: #f7fafd;
    /* Softer background color */
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.card-text {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: #666;
}

.card-body ul {
    padding: 0;
    list-style: none;
    margin-bottom: 15px;
}

.card-body ul li {
    margin-bottom: 5px;
}

.card-body ul li::before {
    content: "✔";
    color: green;
    margin-right: 10px;
}

.btn {
    display: inline-block;
    padding: 10px 15px;
    background-color: #0072ED;
    color: white;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}

/* Contact Section */
#contact {
    padding: 20px 20px;
    text-align: center;
}

#contact h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
}

#contact .form-group {
    margin-bottom: 20px;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

#contact label {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

#contact input,
#contact textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 30px;
    margin-bottom: 10px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: #2c3e50;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact textarea{
    resize: none;
    margin-bottom: 0px;
}

#contact input:focus,
#contact textarea:focus {
    border-color: #28a745; /* Bootstrap success color */
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.25);
    outline: none;
}

#contact .error-txt{
    display: none;
}

#contact .btn {
    display: inline-block;
    padding: 14px 24px;
    background-color: #0072ED;
    color: white;
    text-align: center;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 1rem;
    margin-top: 20px;
}

#contact .btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Custom Dialog Box */
#contact .form-response {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    text-align: center;
    margin-top: 20px;
}

#contact .error-txt {
    display: none;
    color: red;
    font-size: 0.9rem;
    margin-top: 5px;
    font-family: 'Roboto', sans-serif;
}

#formError {
    color: #d9534f; /* Bootstrap danger color */
    font-weight: bold;
}
.modal-header.bg-success {
    background-color: #28a745 !important; /* Bootstrap success green */
    border-bottom: none;
}

.modal-body p {
    font-size: 1.2rem;
    font-family: 'Roboto', sans-serif;
    color: #333;
    margin-bottom: 20px;
}

.modal-body i {
    color: #28a745; /* Green checkmark */
    margin-top: 10px;
}

.modal-footer .btn-primary {
    border-radius: 30px;
    padding: 10px 30px;
    font-size: 1rem;
}

/* Footer Styling */
footer {
    text-align: center;
    font-size: 0.85rem;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 20px;
    padding-left: 20px;
    background-color: rgba(0, 0, 0, 0.158);
    /* Matches body background */
    color: #2c3e50;
}


/* Responsive Styling */
@media (max-width: 1024px) {
    .skills {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on medium screens */
    }
}

@media (max-width: 768px) {
    .custom-navbar .nav-links {
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.9);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
    }

    .custom-navbar .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .menu-toggle {
        display: flex;
    }

    .custom-navbar .container {
        justify-content: space-between;
    }


    #header img {
        width: 120px;
        height: 120px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .bio {
        font-size: 0.9rem;
    }

    .skills {
        grid-template-columns: 1fr 1fr;
        /* Stack items in 1 column on smaller screens */
    }

    #project-list {
        padding: 20px 10px;
    }

    .card img {
        height: 180px;
    }

    .card-body {
        padding: 15px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-text {
        font-size: 0.85rem;
    }

    .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    #contact {
        padding: 40px 10px;
    }

    #contact h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    #contact .form-group {
        max-width: 100%;
    }

    #contact input,
    #contact textarea {
        padding: 10px;
        font-size: 0.9rem;
    }

    #contact .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .card img {
        height: 120px;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-text {
        font-size: 0.8rem;
    }

    .btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    #contact {
        padding: 30px 5px;
    }

    #contact h2 {
        font-size: 1.75rem;
        margin-bottom: 25px;
    }

    #contact input,
    #contact textarea {
        padding: 8px;
        font-size: 0.85rem;
    }

    #contact .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}