/* Base styles for the body */
body {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    background-color: #001f3d;
    /* Navy blue */
    color: white;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    /* Full viewport height */
    scroll-behavior: smooth;
    /* Enable smooth scrolling */
}

html {
    scroll-behavior: smooth;
    /* Enable smooth scrolling in all browsers */
    scroll-padding-top: 60px;
    /* Add padding to account for fixed navbar */
}

/* Style for the profile image */
.profile-image {
    width: 150px;
    /* Fixed size for mobile */
    height: 150px;
    /* Fixed size for mobile */
    border-radius: 50%;
    border: 5px solid #fff;
    margin-top: 20px;
    /* Space from the top */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.profile-image:hover {
    transform: scale(1.1);
    /* Enlarge on hover */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    /* Shadow effect */
}

/* Style for the navigation bar */
header {
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
}

.navbar {
    background-color: rgba(128, 0, 128, 0.9);
    /* Semi-transparent purple */
    backdrop-filter: blur(10px);
    /* Blur effect for modern browsers */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    width: 100%;
    position: relative;
    /* For positioning the menu toggle button */
}

.nav-container {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Mobile menu toggle button */
.menu-toggle {
    display: none;
    /* Hidden by default, shown in media query */
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 10px 15px;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    color: #ff6347;
}

/* Nav hidden class for mobile */
.nav-hidden {
    display: none;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link i {
    margin-right: 8px;
    font-size: 1.1em;
}

.nav-link:hover {
    background-color: rgba(255, 99, 71, 0.7);
    /* Tomato color with transparency */
}

.nav-link.active {
    background-color: #ff6347;
    /* Active link background */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Container for the main content */
.container {
    text-align: center;
    max-width: 1200px;
    width: 100%;
    padding: 20px;
    margin: 0 auto;
}

.section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 80px 0 20px;
    /* Top padding accounts for navbar */
}

#home {
    padding-top: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    width: 70px;
    background-color: #ff6347;
}

h1 {
    font-size: 2rem;
    /* Responsive font size */
    margin: 20px 0;
    /* Spacing */
}

p {
    font-size: 1rem;
    /* Responsive font size */
    margin-top: 10px;
    /* Spacing */
    line-height: 1.6;
}

/* Style for social media icons */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    /* Space between icons */
    margin: 20px 0;
}

.social-links a {
    font-size: 24px;
    /* Icon size */
    color: #fcb500;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: #ff5e00;
    /* Hover effect */
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Style for dark mode toggle */
#dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    cursor: pointer;
    border-radius: 30px;
    z-index: 1000;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#dark-mode-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

.dark-mode .navbar {
    background-color: rgba(30, 30, 30, 0.9);
}

.dark-mode .nav-link:hover {
    background-color: rgba(100, 100, 100, 0.3);
}

.dark-mode .nav-link.active {
    background-color: #333;
}

/* Style for statistics */
.stats-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    /* Space between stats */
    margin: 40px 0;
}

.stat {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px 30px;
    border-radius: 8px;
    min-width: 150px;
    transition: all 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.15);
}

.stat h2 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: #ff6347;
}

.stat p {
    font-size: 1rem;
    opacity: 0.9;
}

/* About section styles */
#about ul {
    text-align: left;
    max-width: 600px;
    margin: 20px auto;
    line-height: 1.8;
}

#about h3 {
    margin-top: 30px;
    color: #ff6347;
}

/* Projects section styles */
.projects-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.project {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
}

.project h3 {
    color: #ff6347;
    margin-bottom: 10px;
}

.project-links {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

/* Contact form styles */
.contact-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    text-align: left;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.contact-form button {
    width: 100%;
    padding: 12px;
    background-color: #ff6347;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #e05338;
}

/* Footer styles */
footer {
    width: 100%;
    padding: 20px 0;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.2);
    margin-top: 40px;
}

/* Media Queries for Responsiveness */
@media (min-width: 768px) {

    /* Adjustments for tablets and larger screens */
    .profile-image {
        width: 200px;
        /* Larger image */
        height: 200px;
        /* Larger image */
    }

    h1 {
        font-size: 2.5rem;
        /* Larger font size */
    }

    p {
        font-size: 1.2rem;
        /* Larger font size */
    }

    .nav-link {
        font-size: 1.1rem;
        /* Larger font size */
        padding: 18px 25px;
    }

    .social-links a {
        font-size: 28px;
        /* Larger icons */
        width: 50px;
        height: 50px;
    }
}

@media (min-width: 1024px) {

    /* Adjustments for desktops */
    .profile-image {
        width: 250px;
        /* Even larger image */
        height: 250px;
        /* Even larger image */
    }

    h1 {
        font-size: 3rem;
        /* Even larger font size */
    }

    p {
        font-size: 1.5rem;
        /* Even larger font size */
    }

    .nav-link {
        font-size: 1.2rem;
        /* Even larger font size */
    }

    .social-links a {
        font-size: 32px;
        /* Even larger icons */
    }
}

@media (max-width: 767px) {
    .menu-toggle {
        display: block;
        /* Show the menu toggle on mobile */
    }

    .navbar {
        padding: 10px 0;
    }

    .nav-container {
        flex-direction: column;
        align-items: center;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(128, 0, 128, 0.95);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        padding: 10px 0;
        transition: all 0.3s ease;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .section {
        padding-top: 100px;
        /* Adjust for mobile nav height */
    }

    .social-links {
        flex-wrap: wrap;
    }

    .stats-container {
        flex-direction: column;
        align-items: center;
    }

    .stat {
        width: 80%;
        margin-bottom: 20px;
    }

    .project {
        max-width: 100%;
    }

    .contact-form {
        padding: 20px;
    }
}