* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite, wavyBackground 10s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    padding-bottom: 50px; /* Added padding at the bottom */
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes wavyBackground {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.3)" fill-opacity="0.5" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    animation: wave 10s linear infinite;
    opacity: 0.5;
}

@keyframes wave {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1440px;
    }
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border: none;
    border-radius: 30px;
    overflow: hidden;
    animation: fadeIn 1s ease-out;
    background-color: #fff; /* Ensure the card has a background color */
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.project-card .card-body {
    display: block !important; /* Ensure the card body is always visible */
}

.skill-bar {
    height: 30px;
    background-color: #e9ecef;
    margin-bottom: 20px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(45deg, #007bff, #00bcd4);
    width: 0;
    transition: width 1.5s ease-in-out;
    border-radius: 15px;
    animation: skillPulse 2s infinite;
}

@keyframes skillPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.skill-name {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-weight: bold;
    z-index: 1;
}

.social-icons a {
    font-size: 24px;
    transition: all 0.3s ease;
    display: inline-block;
}

.social-icons a:hover {
    color: #00bcd4 !important;
    transform: translateY(-5px) scale(1.1);
}

/* Add smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Add a subtle animation to buttons */
.btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 150px; /* Ensure the timeline doesn't overflow into the next section */
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #007bff;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    margin-bottom: 50px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: white;
    border: 4px solid #007bff;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(even)::after {
    left: -16px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 6px;
}

@media screen and (max-width: 600px) {
    /* Adjust the position of the timeline's vertical line */
    .timeline::after {
        left: 20px; /* Position the vertical line closer to the left edge */
    }
    
    /* Ensure timeline items take full width and have appropriate padding */
    .timeline-item {
        width: 100%;
        padding-left: 60px; /* Increased padding to accommodate the circle */
        padding-right: 25px;
        margin-bottom: 30px;
        box-sizing: border-box; /* Add space between timeline items */
    }
    
    /* Adjust the position and size of the timeline circles */
    .timeline-item::after {
        left: 0px; /* Align circles directly on the vertical line */
        width: 15px; /* Reduce size for better fit */
        height: 15px;
        border-width: 3px; /* Adjust border thickness if needed */
    }
    
    /* Ensure even timeline items align correctly */
    .timeline-item:nth-child(even) {
        left: 0; /* Remove left offset for even items */
    }
    
    .timeline-item:nth-child(even)::after {
        left: 0px; /* Align circles directly on the vertical line */
    }
    
    /* Optional: Adjust the timeline content for better readability */
    .timeline-content {
        padding: 15px 25px; /* Reduce padding for smaller screens */
        border-radius: 5px; /* Slightly smaller border radius */
    }
    
    /* Optional: Adjust text alignment if needed */
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        text-align: left; /* Align text to the left for consistency */
    }
}


@media (max-width: 767px) {
    #about .col-md-6:last-child {
        margin-top: 2rem;
    }
    
    /* Ensure all content stays within mobile bounds */
    .container, .container-fluid {
        max-width: 100% !important;
        overflow-x: hidden;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Prevent hero content from being too wide */
    .hero-content {
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* Ensure particles container doesn't cause overflow */
    #particles-js {
        max-width: 100vw;
        overflow: hidden;
    }
}

.badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* Enhanced background effect */
.hero {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite, wavyBackground 10s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Scroll-triggered animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20vh);
    visibility: hidden;
    transition: opacity 1200ms ease-out, transform 600ms ease-out,
    visibility 1200ms ease-out;
    will-change: opacity, transform, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
    visibility: visible;
}

/* Parallax effect for sections */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Animated underline for section headers */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #0087ca;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.animated-underline:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Floating animation for project cards */
@keyframes float {
    0% { transform: translatey(0px); }
    50% { transform: translatey(-20px); }
    100% { transform: translatey(0px); }
}

.project-card {
    animation: float 6s ease-in-out infinite;
}

/* Glowing effect for buttons */
@keyframes glowing {
    0% { box-shadow: 0 0 -10px #00bcd4; }
    40% { box-shadow: 0 0 20px #00bcd4; }
    60% { box-shadow: 0 0 20px #00bcd4; }
    100% { box-shadow: 0 0 -10px #00bcd4; }
}

.btn-glow:hover {
    animation: glowing 5000ms infinite;
}

section {
    padding-top: 40px; /* Further decreased padding-top */
    margin-top: -40px; /* Adjusted margin to match the new padding */
}

/* Adjust specific styling for the About section */
#about {
    padding-top: 100px; /* Increased padding at the top */
    padding-bottom: 100px; /* Add padding at the bottom */
    margin-top: 50px; /* Add margin at the top to create space after the hero */
    margin-bottom: 50px; /* Add margin at the bottom */
}

#about .row {
    display: flex;
    align-items: stretch;
}

#about .col-md-6 {
    display: flex;
    flex-direction: column;
}

.about-content {
    background-color: #f8f9fa;
    padding: 30px; /* Increased padding */
    border-radius: 15px; /* Slightly increased border radius */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Added subtle shadow */
}

#about .list-group {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#about .list-group-item {
    border: none;
    background-color: transparent;
    padding: 10px 0;
}

.nav-link.active {
    color: #00bcd4;
    border-bottom: 2px solid #00bcd4;
}

.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #007bff;
    color: #fff;
    padding: 12px;
    border-radius: 50%;
    z-index: 9999; /* Increased z-index */
    display: none;
    transition: background-color 0.3s ease;
    cursor: pointer; /* Add cursor pointer */
}

.back-to-top i {
    font-size: 20px; /* Ensure the icon is visible */
}

.back-to-top:hover {
    background-color: #0056b3;
}

#skills {
    padding-top: 100px;
    padding-bottom: 100px;
    margin-bottom: 50px; /* Add margin at the bottom */
    margin-top: 35px;
}

#projects {
    padding-top: 100px; /* Add padding at the top */
    margin-top: 50px; /* Add margin at the top */
}



