body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s;
    color: #333; 
}

body.light-mode {
    background-color: #f4f4f4;
}

body.dark-mode {
    background-color: #333;
    color: #f4f4f4; /* Change the default text color in dark mode */
}

/* Header */
header {
    position: relative;
    background-color: inherit;
    color: inherit;
    text-align: center;
    padding: 1.5rem 0;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    transition: color 0.3s; 
}

body.light-mode header h1,
body.light-mode nav ul li a,
body.light-mode #email {
    color: #333;
}

body.dark-mode header h1,
body.dark-mode nav ul li a,
body.dark-mode #email {
    color: #f4f4f4; /* Header and link colors in dark mode */
}

nav {
    margin-top: 10px;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

nav ul li a,
#email {
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    cursor: pointer; 
}

nav ul li a:hover,
#email:hover {
    color: #555;
}

/* Main Container */
.container {
    width: 80%;
    margin: 20px auto;
    padding: 0 10px;
    padding-bottom: 60px; /* Add padding to the bottom of the container */
}

@media (max-width: 768px) {
    .container {
        width: 90%;
        padding: 0 5%;
        padding-bottom: 80px; /* Increase padding for mobile devices */
    }

    header h1 {
        font-size: 2rem; 
    }

    .about-me h2, .skills h2, .projects h2 {
        font-size: 1.8rem; 
    }

    .about-me p, .skills ul, .projects ul {
        font-size: 1rem; 
    }

    #backToTop {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    footer {
        padding: 15px 0; /* Adjust footer padding for mobile */
    }
}

/* Sections: About Me, Skills, Projects */
.about-me, .skills, .projects {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #333;
}

.about-me h2, .skills h2, .projects h2 {
    color: #333;
    font-size: 2rem;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.skills ul, .projects ul {
    list-style: none;
    padding: 0;
}

.skills li, .projects li {
    background-color: #f4f4f4;
    margin: 10px 0;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

/* Footer */
footer {
    text-align: center;
    padding: 15px;
    background-color: #333;
    color: #fff;
    position: fixed;
    width: 100%;
    bottom: 0;
}

footer p {
    margin: 0;
    font-size: 1rem;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 10px 15px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
}

#backToTop:hover {
    background-color: #555;
}

/* Dark Mode Adjustments */
body.dark-mode .about-me, 
body.dark-mode .skills, 
body.dark-mode .projects {
    background-color: #444;
    color: #f4f4f4; /* Text color for sections in dark mode */
}

body.dark-mode .skills li, 
body.dark-mode .projects li {
    background-color: #666;
    color: #f4f4f4;
}

body.dark-mode .about-me h2, 
body.dark-mode .skills h2, 
body.dark-mode .projects h2 {
    color: #f4f4f4; /* Section headings in dark mode */
}

body.dark-mode .contact-me {
    background-color: #444;
    color: #f4f4f4; /* Text color for contact form in dark mode */
}

body.dark-mode .contact-me input,
body.dark-mode .contact-me textarea {
    background-color: #666;
    color: #f4f4f4; /* Input and textarea text color in dark mode */
}

body.dark-mode .contact-me button {
    background-color: #555;
    color: #fff; /* Button text color in dark mode */
}

/* Form Styles */
.contact-me {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-me input,
.contact-me textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.contact-me input:focus,
.contact-me textarea:focus {
    border-color: #555;
}

/* Dark Mode for Contact Form */
body.dark-mode .contact-me {
    background-color: #444;
    color: #f4f4f4;
}

body.dark-mode .contact-me input,
body.dark-mode .contact-me textarea {
    background-color: #666;
    color: #f4f4f4;
    border: 1px solid #888;
}

body.dark-mode .contact-me input::placeholder,
body.dark-mode .contact-me textarea::placeholder {
    color: #ccc;
}

body.dark-mode .contact-me button {
    background-color: #555;
    color: #fff;
}

body.dark-mode .contact-me button:hover {
    background-color: #777;
}

/* Email Validation Message */
#emailValidationResult {
    font-size: 1rem;
    margin-top: 5px;
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Notification */
.notification {
    display: none; /* Initially hidden */
    background-color: #4CAF50; /* Green background */
    color: white; /* White text */
    padding: 15px; /* Some padding */
    position: fixed; /* Fixed position */
    top: 20px; /* 20px from the top */
    right: 20px; /* 20px from the right */
    z-index: 1000; /* Ensure it appears above other content */
    border-radius: 5px; /* Rounded corners */
}

.notification.show {
    visibility: visible;
    opacity: 1;
}

/* Theme Switch */
.theme-switch-wrapper {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-icon {
    width: 20px; 
    height: 20px;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #555;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.icon {
    width: 24px; /* Adjust size as needed */
    height: 24px; /* Adjust size as needed */
    vertical-align: middle; /* Aligns the icon with text */
}
