/* General Styles */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background-color: #f5f5f5; /* Light mode background */
    color: #333; /* Dark text color */
}

a {
    text-decoration: none;
    color: inherit;
}

#themeToggleButton {
    background-color: transparent;
    color: #333; /* Dark icon color for light mode */
    font-size: 24px;
    cursor: pointer;
    border: none;
    position: fixed;
    top: 20px;
    right: 20px;
    transition: color 0.3s;
}

#themeToggleButton:hover {
    color: #4CAF50;
}

.title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

/* Projects Section */
#projects {
    padding: 4rem 2rem;
    position: relative;
}

.projects-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    width: 300px; /* Match card width */
}

.project-card {
    background-color: #fff; /* Light card background */
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 100%; /* Full width inside the link */
    height: 450px; /* Fixed height */
    padding: 1rem;
    box-sizing: border-box;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

/* Project Image */
.project-img {
    width: 100%;
    height: 200px; /* Fixed height */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Project Title */
.project-title {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    color: #333; /* Dark text color */
}

/* Project Description */
.project-description {
    font-size: 1rem;
    color: #666; /* Darker gray for description */
    flex-grow: 1;
    margin-bottom: 1rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Limit to 4 lines */
    -webkit-box-orient: vertical;
}

/* Responsive Design */
@media (max-width: 768px) {
    .projects-container {
        flex-direction: column;
        align-items: center;
    }

    .project-card-link {
        width: 100%;
        max-width: 400px;
    }

    .project-card {
        height: auto; /* Let height adjust for mobile */
    }
}

/* Dark Theme Styles */
body.dark-theme {
    background-color: #121212; /* Dark mode background */
    color: #f5f5f5; /* Light text color */
}

body.dark-theme #themeToggleButton {
    color: #f5f5f5; /* Light icon color for dark mode */
}

body.dark-theme .project-card {
    background-color: #1e1e1e; /* Dark card background */
    border-color: #333;
}

body.dark-theme .project-card:hover {
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

body.dark-theme .project-title {
    color: #f5f5f5; /* Light text color */
}

body.dark-theme .project-description {
    color: #ccc; /* Lighter gray for description */
}



/* Header Buttons Container */
.header-buttons {
    display: flex;
    align-items: center;
    position: fixed;
    top: 20px;
    right: 20px;
}

/* Style for Both Buttons */
#backButton,
#themeToggleButton {
    background-color: transparent;
    color: #f5f5f5; /* Adjust color based on theme */
    font-size: 24px;
    cursor: pointer;
    border: none;
    margin-left: 10px;
    transition: color 0.3s;
}

/* Hover Effects */
#backButton:hover,
#themeToggleButton:hover {
    color: #4CAF50;
}

/* Light Theme Adjustments */
body:not(.dark-theme) #backButton,
body:not(.dark-theme) #themeToggleButton {
    color: #333;
}


/* Header Buttons Container */
.header-buttons {
    display: flex;
    justify-content: space-between; /* Spread buttons across the available space */
    position: fixed;
    top: 20px;
    width: 100%; /* Make the container span the entire width */
    padding: 0 20px; /* Add padding for spacing */
    box-sizing: border-box;
}


/* Style for Both Buttons */
#backButton,
#themeToggleButton {
    background-color: transparent;
    color: #f5f5f5; /* Adjust color based on theme */
    font-size: 24px;
    cursor: pointer;
    border: none;
    margin-left: 10px;
    transition: color 0.3s;
}

/* Hover Effects */
#backButton:hover,
#themeToggleButton:hover {
    color: #4CAF50;
}

/* Light Theme Adjustments */
body:not(.dark-theme) #backButton,
body:not(.dark-theme) #themeToggleButton {
    color: #333;
}
