  /* Basic Reset & Typography */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            /* Light Theme Variables */
            --background-color-light: #f4f7fa;
            --text-color-light: #333;
            --primary-color-light: #007bff; /* Blue */
            --secondary-color-light: #6c757d; /* Gray */
            --card-background-light: #fff;
            --border-color-light: #e0e0e0;
            --shadow-color-light: rgba(0, 0, 0, 0.05);
            --hero-text-color-light: #fff;

            /* Dark Theme Variables */
            --background-color-dark: #1a202c; /* Dark Slate */
            --text-color-dark: #e2e8f0; /* Light Gray */
            --primary-color-dark: #63b3ed; /* Lighter Blue */
            --secondary-color-dark: #a0aec0; /* Muted Gray */
            --card-background-dark: #2d3748; /* Darker Slate */
            --border-color-dark: #4a5568;
            --shadow-color-dark: rgba(0, 0, 0, 0.2);
            --hero-text-color-dark: #fff; /* Hero text remains white for contrast */

            /* Current Theme Variables (Default to light) */
            --background-color: var(--background-color-light);
            --text-color: var(--text-color-light);
            --primary-color: var(--primary-color-light);
            --secondary-color: var(--secondary-color-light);
            --card-background: var(--card-background-light);
            --border-color: var(--border-color-light);
            --shadow-color: var(--shadow-color-light);
            --hero-text-color: var(--hero-text-color-light);

            --font-family: 'Inter', sans-serif;
            --transition-speed: 0.3s ease-in-out;
            --border-radius: 8px;
        }
        






        img {
    max-width: 100%;
    height: auto;
    display: block; /* Removes extra space below images */
}
@media (max-width: 768px) {
    .profile-image img {
        width: 200px; /* or a percentage like 60% */
        height: 200px;
        margin-bottom: 20px; /* Add space if content stacks */
    }
}
@media (max-width: 850px) { /* Adjust this breakpoint as needed */
    .nav-links {
        /* Existing styles */
        display: none; /* Hide by default on mobile */
        flex-direction: column;
        /* ... other mobile nav styles */
    }
    .nav-links.active {
        display: flex; /* Show when active */
    }
    .burger-menu {
        display: flex; /* Show burger menu */
    }
}

        body {
            font-family: var(--font-family);
            line-height: 1.6;
            color: var(--text-color);
            background-color: var(--background-color);
            transition: background-color var(--transition-speed), color var(--transition-speed);
            overflow-x: hidden; /* Prevent horizontal scroll */
        }

        /* Dark Theme specific styles */
        body.dark-theme {
            --background-color: var(--background-color-dark);
            --text-color: var(--text-color-dark);
            --primary-color: var(--primary-color-dark);
            --secondary-color: var(--secondary-color-dark);
            --card-background: var(--card-background-dark);
            --border-color: var(--border-color-dark);
            --shadow-color: var(--shadow-color-dark);
            --hero-text-color: var(--hero-text-color-dark);
        }

     /* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    display: flex;
    flex-direction: column; /* Stack text and spinner vertically */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    word-break: break-word;
    white-space: normal;
    padding: 0 20px; /* Increased horizontal padding slightly for more buffer */
    box-sizing: border-box;
}

/* This is your loading circle (spinner) */
#preloader::after {
    content:'';
    /* Using fixed pixels here, but you can adjust based on testing */
    width: 60px;   /* Set a fixed size for the spinner */
    height: 60px;  /* Ensure width and height are EXACTLY equal */
    border: 6px solid var(--primary-color); /* Adjust border thickness */
    border-top: 6px solid transparent; /* This creates the gap */
    border-radius: 50%; /* Essential for a perfect circle */
    animation: spin 1s linear infinite;
    margin-top: 25px; /* Adjust spacing between text and spinner */
    box-sizing: border-box; /* Crucial for consistency, even if default is border-box */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Media Queries for Font Size Adjustment on Smaller Screens */
@media (max-width: 600px) {
    #preloader {
        font-size: 1.8rem;
    }
}

@media (max-width: 400px) {
    #preloader {
        font-size: 1.4rem;
    }
}


        /* Header & Navigation */
        header {
            background-color: var(--card-background);
            box-shadow: 0 2px 10px var(--shadow-color);
            position: sticky;
            top: 0;
            z-index: 1000;
            transition: background-color var(--transition-speed);
            border-bottom-left-radius: var(--border-radius);
            border-bottom-right-radius: var(--border-radius);
        }

        nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 5%;
            max-width: 1200px;
            margin: 0 auto;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--primary-color);
        }

        .nav-links {
            display: flex;
            list-style: none;
            gap: 2rem;
        }

        .nav-links a {
            text-decoration: none;
            color: var(--text-color);
            font-weight: 500;
            transition: color var(--transition-speed);
            padding: 0.5rem 0;
            position: relative;
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background-color: var(--primary-color);
            transition: width var(--transition-speed);
        }

        .nav-links a:hover::after {
            width: 100%;
        }

        .nav-links a:hover {
            color: var(--primary-color);
        }

        .btn {
            display: inline-block;
            padding: 0.6rem 1.2rem;
            border-radius: var(--border-radius);
            text-decoration: none;
            font-weight: 500;
            cursor: pointer;
            transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
            border: 2px solid transparent;
        }

        .btn-primary {
            background-color: var(--primary-color);
            color: #fff;
            border-color: var(--primary-color);
        }

        .btn-primary:hover {
            background-color: transparent;
            color: var(--primary-color);
        }

        /* Theme Toggle */
        .theme-toggle-wrapper {
            position: relative;
            width: 50px;
            height: 25px;
            margin-left: 2rem;
        }

        .theme-toggle {
            display: none;
        }

        .toggle-label {
            width: 100%;
            height: 100%;
            background-color: var(--secondary-color);
            border-radius: 25px;
            position: absolute;
            cursor: pointer;
            transition: background-color var(--transition-speed);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 5px;
        }

        .toggle-label::before {
            content: '☀️'; /* Sun icon for light */
            font-size: 1rem;
            color: #fff;
            position: absolute;
            left: 5px;
        }

        .toggle-label::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 21px;
            height: 21px;
            background-color: #fff;
            border-radius: 50%;
            transition: transform var(--transition-speed);
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }

        .theme-toggle:checked + .toggle-label {
            background-color: var(--primary-color);
        }

        .theme-toggle:checked + .toggle-label::before {
            content: '🌙'; /* Moon icon for dark */
            left: auto;
            right: 5px;
        }

        .theme-toggle:checked + .toggle-label::after {
            transform: translateX(25px);
        }

        /* Burger Menu (for mobile) */
        .burger-menu {
            display: none; /* Hidden by default */
            cursor: pointer;
            flex-direction: column;
            justify-content: space-around;
            width: 30px;
            height: 25px;
            z-index: 1001; /* Ensure it's above nav links when open */
        }

        .burger-menu div {
            width: 100%;
            height: 3px;
            background-color: var(--text-color);
            border-radius: 5px;
            transition: all 0.3s ease;
        }

        /* Burger menu animation */
        .burger-menu.toggle .line1 {
            transform: rotate(-45deg) translate(-5px, 6px);
        }
        .burger-menu.toggle .line2 {
            opacity: 0;
        }
        .burger-menu.toggle .line3 {
            transform: rotate(45deg) translate(-5px, -6px);
        }

        /* Sections General Styling */
        section {
            padding: 80px 5%;
            background-color: var(--background-color);
            max-width: 1200px;
            margin: 0 auto;
            min-height: calc(100vh - 80px); /* Adjust for header height */
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
        }

        h2 {
            font-size: 2.5rem;
            margin-bottom: 40px;
            color: var(--primary-color);
            position: relative;
            font-weight: 700;
        }

        h2::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 4px;
            background-color: var(--primary-color);
            border-radius: 2px;
        }

        /* Hero Section */
        .hero-section {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/back.jpg'); /* use your local image here */
    background-size: cover;
    background-position: center;
    color: var(--hero-text-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    padding: 40px 10px;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content .professional-title {
    font-size: 1.2rem;
  }

  .social-links a {
    font-size: 1.5rem;
    margin: 0 0.6rem;
  }
}
/*@media (max-width: 480px) {
  .skills-grid,
  .projects-grid,
  .blog-grid {
    grid-template-columns: 1fr; /* Single column layout 
  }
}*/
@media (max-width: 480px) {
  .hero-content {
    padding: 20px;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content .professional-title {
    font-size: 1rem;
  }
}



        .hero-content h1 {
            font-size: 3.8rem;
            margin-bottom: 1rem;
            font-weight: 700;
        }

        .hero-content .name {
            color: var(--primary-color);
        }

        .hero-content .professional-title {
            font-size: 2.2rem;
            margin-bottom: 2rem;
            min-height: 2.5rem; /* Prevent layout shift during typing */
            font-weight: 500;
        }

        .social-links {
            margin-top: 2rem;
        }

        .social-links a {
            color: var(--hero-text-color);
            font-size: 2.2rem;
            margin: 0 1rem;
            transition: color var(--transition-speed), transform 0.2s ease;
        }

        .social-links a:hover {
            color: var(--primary-color);
            transform: translateY(-5px);
        }

        /* About Me Section */
       .about-section {
    background-color: var(--card-background);
    box-shadow: 0 4px 20px var(--shadow-color);
    border-radius: var(--border-radius);
    padding: 75px; /* Keep original padding for desktop */
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.about-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start; /* Align items to the start for better flow */
    justify-content: center;
    width: 100%; /* Ensure it takes full width */
    max-width: 1000px; /* Optional: constrain max width for content */
}
.profile-image {
    /* Ensure the profile image container itself is centered if it's a block element */
    margin-left: auto;
    margin-right: auto;
    margin-top: auto;
    margin-bottom: auto;

    text-align: center; /* For any potential inline content inside */
}
.profile-image img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.profile-image img:hover {
    transform: scale(1.05);
}

.about-text {
    flex: 1;
    min-width: 300px;
    max-width: 700px;
    padding-top: 10px; /* Adjust if needed to align with image top */
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

/* --- NEW/UPDATED TIMELINE STYLES --- */
.timeline {
    position: relative;
    padding-left: 60px; /* Increased padding for the line and dots */
    margin-top: 40px; /* More space from previous content */
    width: 100%;
    max-width: 600px; /* Constrain timeline width for better readability */
    margin-left: auto; /* Center timeline within about-text */
    margin-right: auto;
    box-sizing: border-box;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 25px; /* Position of the main vertical line */
    top: 0;
    height: 100%;
    width: 2px;
    background-color: var(--border-color); /* Subtle line color */
    border-radius: 1px;
}

.timeline-item {
    margin-bottom: 40px; /* Increased space between items */
    position: relative;
    padding-left: 35px; /* Space for the dot and its shadow */
    background-color: var(--card-background); /* Item background */
    border-radius: var(--border-radius);
    padding: 15px 20px; /* Padding inside each item */
    box-shadow: 0 2px 10px var(--shadow-color); /* Subtle shadow for each item */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    /* Position the dot on the vertical line */
    left: -10px; /* Adjusted to sit on the line (25px line - 16px dot / 2 = 17px. Using -10px relative to item's left edge) */
    top: 25px; /* Vertically align dot with content start */
    width: 16px;
    height: 16px;
    background-color: var(--primary-color); /* Dot color */
    border-radius: 50%;
    border: 3px solid var(--background-color); /* Inner border to match card background */
    box-shadow: 0 0 0 3px var(--primary-color); /* Outer ring/glow */
    z-index: 2; /* Ensure dot is above line and item shadow */
}

.timeline-item h3 {
    margin-bottom: 8px; /* More space below heading */
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.3rem; /* Slightly larger heading */
}

.timeline-item p {
    font-size: 1rem; /* Slightly larger paragraph text */
    color: var(--text-color); /* Use text-color for main paragraphs */
    margin-bottom: 0.5rem;
}

.timeline-item p em {
    font-size: 0.9rem; /* Smaller for italic text */
    color: var(--secondary-color);
}

/* Responsive adjustments for timeline */
@media (max-width: 992px) {
    .about-section {
        padding: 60px 20px; /* Adjust padding for tablets */
    }

    .timeline {
        padding-left: 40px; /* Reduced padding for smaller screens */
        max-width: 100%; /* Allow timeline to take full width */
    }

    .timeline::before {
        left: 15px; /* Adjust line position */
    }

    .timeline-item {
        padding-left: 30px; /* Adjust item padding */
        margin-bottom: 30px;
    }

    .timeline-item::before {
        left: -5px; /* Adjust dot position relative to item */
        top: 20px; /* Adjust dot vertical position */
    }

    .timeline-item h3 {
        font-size: 1.2rem;
    }

    .timeline-item p {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 30px; /* Further reduce padding for mobile */
    }

    .timeline::before {
        left: 10px; /* Further adjust line position */
    }

    .timeline-item {
        padding-left: 25px; /* Further adjust item padding */
    }

    .timeline-item::before {
        left: -5px; /* Keep dot position consistent */
        top: 18px; /* Fine-tune dot vertical position for smaller screens */
        width: 14px; /* Slightly smaller dot */
        height: 14px;
        border: 2px solid var(--background-color);
        box-shadow: 0 0 0 2px var(--primary-color);
    }

    .timeline-item h3 {
        font-size: 1.1rem;
    }

    .timeline-item p {
        font-size: 0.9rem;
    }
}
        /* Skills Section */
        .skills-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            width: 100%;
        }

        .skill-category {
            background-color: var(--card-background);
            padding: 30px;
            border-radius: var(--border-radius);
            box-shadow: 0 4px 15px var(--shadow-color);
            text-align: left;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .skill-category:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px var(--shadow-color);
        }

        .skill-category h3 {
            color: var(--primary-color);
            margin-bottom: 25px;
            text-align: center;
            font-weight: 600;
            font-size: 1.4rem;
        }

        .skill-item {
            margin-bottom: 18px;
        }

        .skill-item span {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 500;
            margin-bottom: 8px;
            color: var(--text-color);
        }

        .skill-item span::after {
            content: attr(data-percent); /* Display percentage from data attribute */
            font-size: 0.9rem;
            color: var(--secondary-color);
        }

        .progress-bar-container {
            width: 100%;
            background-color: var(--border-color);
            border-radius: 5px;
            overflow: hidden;
            height: 12px;
        }

        .progress-bar {
            height: 100%;
            background-color: var(--primary-color);
            border-radius: 5px;
            width: 0; /* Will be set by JavaScript/animation */
            transition: width 1s ease-out; /* Animation for skill bars */
        }

        /* Projects Section */
        .projects-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            width: 100%;
        }

        .project-card {
            background-color: var(--card-background);
            border-radius: var(--border-radius);
            box-shadow: 0 4px 15px var(--shadow-color);
            overflow: hidden;
            text-align: left;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            display: flex;
            flex-direction: column;
        }

        .project-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 8px 25px var(--shadow-color);
        }

        .project-card img {
            width: 100%;
            height: 220px;
            object-fit: cover;
            border-bottom: 1px solid var(--border-color);
        }

        .project-card h3 {
            color: var(--primary-color);
            margin: 20px 20px 10px;
            font-weight: 600;
            font-size: 1.5rem;
        }

        .project-card p {
            padding: 0 20px 15px;
            font-size: 1rem;
            color: var(--secondary-color);
            flex-grow: 1; /* Allow description to take available space */
        }

        .technologies-used {
            padding: 0 20px 15px;
        }

        .technologies-used span {
            display: inline-block;
            background-color: var(--border-color);
            color: var(--text-color);
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            margin-right: 8px;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .project-links {
            display: flex;
            justify-content: space-around;
            padding: 0 20px 20px;
            margin-top: auto; /* Push links to the bottom */
            flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
            gap: 10px; /* Space between buttons */
        }

        .btn-demo, .btn-github, .btn-enhance-desc {
            flex: 1;
            text-align: center;
            padding: 12px 15px;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: var(--border-radius);
            font-weight: 500;
            min-width: 120px; /* Ensure buttons don't get too small */
        }

        .btn-demo {
            background-color: var(--primary-color);
            color: #fff;
            border: 2px solid var(--primary-color);
        }
        .btn-demo:hover {
            background-color: transparent;
            color: var(--primary-color);
        }

        .btn-github {
            background-color: #333;
            color: #fff;
            border: 2px solid #333;
        }
        body.dark-theme .btn-github {
            background-color: #6a737d; /* GitHub button color in dark theme */
            border-color: #6a737d;
        }
        .btn-github:hover {
            background-color: transparent;
            border-color: var(--text-color);
            color: var(--text-color);
        }
        .btn-github i, .btn-demo i {
            margin-left: 8px;
        }

        .btn-enhance-desc {
            background-color: #ffc107; /* Yellow for sparkle button */
            color: #333;
            border: 2px solid #ffc107;
            margin-top: 10px; /* Separate from other links */
        }
        .btn-enhance-desc:hover {
            background-color: transparent;
            color: #ffc107;
        }
        .btn-enhance-desc i {
            margin-right: 8px;
        }

        /* Blog Section */
        .blog-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            width: 100%;
        }

        .blog-card {
            background-color: var(--card-background);
            border-radius: var(--border-radius);
            box-shadow: 0 4px 15px var(--shadow-color);
            overflow: hidden;
            text-align: left;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            display: flex;
            flex-direction: column;
        }

        .blog-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 8px 25px var(--shadow-color);
        }

        .blog-card img {
            width: 100%;
            height: 180px;
            object-fit: cover;
            border-bottom: 1px solid var(--border-color);
        }

        .blog-card h3 {
            color: var(--primary-color);
            margin: 20px 20px 10px;
            font-weight: 600;
            font-size: 1.4rem;
        }

        .blog-card p {
            padding: 0 20px 15px;
            font-size: 1rem;
            color: var(--secondary-color);
            flex-grow: 1;
        }

        .btn-readmore {
            display: block;
            text-align: center;
            margin: 0 20px 20px;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px;
            border-radius: var(--border-radius);
            text-decoration: none;
            font-weight: 500;
            border: 2px solid var(--primary-color);
            transition: background-color var(--transition-speed), color var(--transition-speed);
            margin-top: auto; /* Push to bottom */
        }

        .btn-readmore:hover {
            background-color: transparent;
            color: var(--primary-color);
        }
        .btn-readmore i {
            margin-left: 8px;
        }


        /* Contact Section */
        .contact-section {
            text-align: center;
        }

        #contact-form {
            max-width: 700px;
            margin: 40px auto;
            padding: 40px;
            background-color: var(--card-background);
            border-radius: var(--border-radius);
            box-shadow: 0 4px 15px var(--shadow-color);
            text-align: left;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--primary-color);
            font-size: 1.1rem;
        }

        .form-group input[type="text"],
        .form-group input[type="email"],
        .form-group input[type="subject"],
        .form-group textarea {
            width: 100%;
            padding: 12px;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            background-color: var(--background-color); /* Input background */
            color: var(--text-color);
            font-size: 1rem;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
        }

        .form-group textarea {
            resize: vertical;
            min-height: 120px;
        }

        .error-message {
            color: #dc3545; /* Red for errors */
            font-size: 0.9rem;
            margin-top: 5px;
            display: none; /* Hidden by default */
        }

        .btn-submit {
            display: block;
            width: 100%;
            padding: 15px;
            background-color: var(--primary-color);
            color: #fff;
            border: none;
            border-radius: var(--border-radius);
            font-size: 1.1rem;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.2s ease;
            font-weight: 600;
        }

        .btn-submit:hover {
            background-color: #0056b3; /* Darker blue on hover */
            transform: translateY(-2px);
        }

        .form-status {
            margin-top: 20px;
            font-weight: 500;
            text-align: center;
        }

        /* Footer */
        footer {
            background-color: var(--card-background);
            color: var(--text-color);
            padding: 30px 5%;
            text-align: center;
            border-top: 1px solid var(--border-color);
            transition: background-color var(--transition-speed), color var(--transition-speed);
            border-top-left-radius: var(--border-radius);
            border-top-right-radius: var(--border-radius);
        }

        .footer-social-links {
            margin-top: 15px;
        }

        .footer-social-links a {
            color: var(--text-color);
            font-size: 1.6rem;
            margin: 0 12px;
            transition: color 0.3s ease, transform 0.2s ease;
        }

        .footer-social-links a:hover {
            color: var(--primary-color);
            transform: translateY(-3px);
        }

        /* Scroll to Top Button */
        #scrollToTopBtn {
            display: none; /* Hidden by default */
            position: fixed;
            bottom: 30px;
            right: 30px;
            z-index: 99;
            font-size: 1.6rem;
            border: none;
            outline: none;
            background-color: var(--primary-color);
            color: white;
            cursor: pointer;
            padding: 15px;
            border-radius: 50%;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            transition: background-color 0.3s ease, transform 0.2s ease;
        }

        #scrollToTopBtn:hover {
            background-color: #0056b3;
            transform: translateY(-3px);
        }

        /* Modal for Enhanced Description */
        .modal-overlay {
            display: none; /* Hidden by default */
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            z-index: 10000;
            justify-content: center;
            align-items: center;
            opacity: 0;
            transition: opacity 0.3s ease-in-out;
        }

        .modal-overlay.active {
            display: flex;
            opacity: 1;
        }

        .modal-content {
            background-color: var(--card-background);
            padding: 30px;
            border-radius: var(--border-radius);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
            max-width: 600px;
            width: 90%;
            position: relative;
            transform: translateY(-20px);
            opacity: 0;
            transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
            text-align: left;
        }

        .modal-overlay.active .modal-content {
            transform: translateY(0);
            opacity: 1;
        }

        .modal-close-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
            font-size: 1.8rem;
            color: var(--text-color);
            cursor: pointer;
            transition: color 0.2s ease;
        }

        .modal-close-btn:hover {
            color: var(--primary-color);
        }

        .modal-content h3 {
            color: var(--primary-color);
            margin-bottom: 15px;
            font-size: 1.8rem;
            font-weight: 600;
        }

        .modal-content p {
            color: var(--text-color);
            line-height: 1.7;
            font-size: 1rem;
            margin-bottom: 20px;
        }

        .modal-loading-spinner {
            display: none; /* Hidden by default */
            border: 4px solid var(--border-color);
            border-top: 4px solid var(--primary-color);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 20px auto;
        }

        /* Responsive Design (Media Queries) */
        @media (max-width: 992px) {
            .nav-links {
                display: none;
                flex-direction: column;
                width: 100%;
                background-color: var(--card-background);
                position: absolute;
                top: 65px; /* Adjust based on header height */
                left: 0;
                padding: 1.5rem 0;
                box-shadow: 0 2px 10px var(--shadow-color);
                border-bottom-left-radius: var(--border-radius);
                border-bottom-right-radius: var(--border-radius);
            }

            .nav-links.active {
                display: flex;
            }

            .nav-links li {
                margin: 0.8rem 0;
                text-align: center;
            }

            .burger-menu {
                display: flex;
            }

            .theme-toggle-wrapper {
                margin-left: 1rem; /* Adjust margin for mobile */
            }

            .hero-content h1 {
                font-size: 3rem;
            }

            .hero-content .professional-title {
                font-size: 1.8rem;
            }

            .about-content {
                flex-direction: column;
                text-align: center;
            }

            .profile-image {
                margin-bottom: 30px;
            }

            .timeline {
                padding-left: 0;
                width: 100%;
                max-width: 400px; /* Constrain timeline width */
            }

            .timeline::before {
                left: 50%;
                transform: translateX(-50%);
            }

            .timeline-item {
                padding-left: 0;
                text-align: center;
            }

            .timeline-item::before {
                left: 50%;
                transform: translateX(-50%);
                top: -10px;
            }
        }

        @media (max-width: 768px) {
            h2 {
                font-size: 2.2rem;
                margin-bottom: 30px;
            }

            section {
                padding: 60px 3%;
                min-height: unset; /* Allow sections to shrink on smaller screens */
            }

            .hero-content h1 {
                font-size: 2.5rem;
            }

            .hero-content .professional-title {
                font-size: 1.4rem;
            }

            .social-links a {
                font-size: 1.8rem;
                margin: 0 0.8rem;
            }

            .projects-grid, .skills-grid, .blog-grid {
                grid-template-columns: 1fr; /* Stack columns on smaller screens */
            }

            .project-card .project-links {
                flex-direction: column;
            }

            .btn-demo, .btn-github, .btn-enhance-desc {
                width: 90%;
                margin: 5px auto;
            }

            #contact-form {
                padding: 25px;
            }

            .modal-content {
                width: 95%;
                padding: 20px;
            }
            .modal-content h3 {
                font-size: 1.5rem;
            }
        }

        @media (max-width: 480px) {
            nav {
                padding: 0.8rem 3%;
            }

            .logo {
                font-size: 1.5rem;
            }

            .hero-content h1 {
                font-size: 2rem;
            }

            .hero-content .professional-title {
                font-size: 1.1rem;
            }

            .social-links a {
                font-size: 1.5rem;
                margin: 0 0.6rem;
            }

            .profile-image img {
                width: 200px;
                height: 200px;
            }

            .about-text p {
                font-size: 1rem;
            }

            .timeline-item h3 {
                font-size: 1.1rem;
            }

            .skill-category {
                padding: 20px;
            }

            .project-card h3, .blog-card h3 {
                font-size: 1.3rem;
                margin: 15px 15px 8px;
            }

            .project-card p, .blog-card p {
                font-size: 0.95rem;
                padding: 0 15px 10px;
            }

            .technologies-used {
                padding: 0 15px 10px;
            }

            .btn-demo, .btn-github, .btn-readmore, .btn-submit, .btn-enhance-desc {
                padding: 10px;
                font-size: 0.9rem;
            }

            #scrollToTopBtn {
                bottom: 20px;
                right: 20px;
                padding: 12px;
                font-size: 1.3rem;
            }
        }
