/* General styles */
body {
    font-family: 'Roboto', Arial, sans-serif; /* Use Roboto with fallbacks */
    line-height: 1.6;
    color: #333333; /* Dark gray text for readability */
    background-color: #f4f4f9; /* Light grayish background for a clean look */
    margin: 0;
    padding: 0;
}

/* Enable smooth scrolling for the entire document */
html {
    scroll-behavior: smooth;
}

/* Headings */
h1, h2, h3 {
    font-weight: 700; /* Bold for headings */
    color: #1a73e8; /* Bright blue for contrast */
}

/* Header styles */
header {
    background-color: #0c47a1; /* Darker blue for a less bright look */
    color: #ffffff; /* White text for contrast */
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    position: -webkit-sticky; /* Safari */
    position: sticky; /* Standard */
    top: 0;
    z-index: 1000;
}

header h1 {
    font-size: 2rem; /* Larger font size for emphasis */
    margin: 0;
    font-weight: 700; /* Bold for prominence */
    letter-spacing: 1px; /* Slight spacing for readability */
    color: #ffffff; /* White for header emphasis */
}

/* Navigation bar styles */
nav ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    justify-content: center;
    gap: 2rem; /* Increased spacing between links */
}

nav a {
    color: #ffffff; /* White links for contrast */
    text-decoration: none;
    font-weight: 500; /* Medium weight for readability */
    font-size: 1rem; /* Standard font size */
    padding: 0.5rem 1rem; /* Padding for clickable area */
    border-radius: 4px; /* Rounded corners for links */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth hover effect */
    -webkit-transition: background-color 0.3s ease, color 0.3s ease; /* Safari */
}

nav a:hover,
nav a:focus {
    background-color: #0c47a1; /* Darker blue on hover */
    color: #e3f2fd; /* Light blue text for contrast */
    text-decoration: none; /* Ensure no underline on hover */
}

/* Active link styles */
nav a.active {
    background-color: #0c47a1; /* Highlight active link */
    color: #e3f2fd; /* Light blue text */
    font-weight: 700; /* Bold for active link */
}

/* Hamburger icon styles */
.hamburger {
    color: #ffffff; /* White color for the icon */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: none; /* Hidden by default */
}

/* Main content styles */
main {
    padding: 2rem;
}

h2 {
    color: #1a73e8; /* Bright blue headings */
}

p {
    font-weight: 400; /* Regular weight for body text */
    margin-bottom: 1rem;
    color: #333333; /* Dark gray for readability */
}

/* Projects section */
figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc; /* Light border for better visibility */
}

figcaption {
    text-align: center;
    font-style: italic;
    color: #555; /* Medium gray for contrast */
}

/* Projects section styles */
#projects {
    background-color: #ffffff; /* White background for the section */
    padding: 2rem; /* Add spacing around the section */
    border-radius: 8px; /* Rounded corners for a softer look */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    margin-bottom: 2rem; /* Space below the section */
}

#projects h2 {
    font-size: 2rem; /* Larger font size for the heading */
    text-align: center; /* Center-align the heading */
    color: #1a73e8; /* Bright blue for contrast */
    margin-bottom: 2rem; /* Space below the heading */
}

#projects .project-list {
    display: flex; /* Flexbox layout for cards */
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
    gap: 2rem; /* Space between cards */
    justify-content: center; /* Center the cards */
}

#projects .project-card {
    background-color: #f9f9f9; /* Light gray background for cards */
    border: 1px solid #ddd; /* Light border for separation */
    border-radius: 8px; /* Rounded corners for cards */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    padding: 1.5rem; /* Inner spacing for content */
    width: 300px; /* Fixed width for cards */
    text-align: center; /* Center-align content */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effect */
    -webkit-transition: transform 0.3s ease, box-shadow 0.3s ease; /* Safari */
}

#projects .project-card:hover {
    transform: translateY(-5px); /* Slight lift on hover */
    -webkit-transform: translateY(-5px); /* Safari */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
    -webkit-box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); /* Safari */
}

#projects .project-card img {
    max-width: 100%; /* Ensure images fit within the card */
    height: auto;
    border-radius: 4px; /* Slight rounding for images */
    margin-bottom: 1rem; /* Space below the image */
}

#projects .project-card h3 {
    font-size: 1.5rem; /* Larger font size for project titles */
    color: #1a73e8; /* Bright blue for contrast */
    margin-bottom: 0.5rem; /* Space below the title */
}

#projects .project-card p {
    font-size: 1rem; /* Standard font size for descriptions */
    color: #555555; /* Medium gray for readability */
    margin-bottom: 1rem; /* Space below the description */
}

#projects .project-card a {
    display: inline-block; /* Make the link a button-like element */
    background-color: #004080; /* Dark blue background */
    color: #ffffff; /* White text for contrast */
    padding: 0.5rem 1rem; /* Padding for the button */
    border-radius: 4px; /* Rounded corners for the button */
    text-decoration: none; /* Remove underline */
    font-weight: 500; /* Medium weight for readability */
    transition: background-color 0.3s ease; /* Smooth hover effect */
}

#projects .project-card a:hover {
    background-color: #003366; /* Slightly darker blue on hover */
}

/* Filter buttons styles */
.filter-buttons {
    text-align: center;
    margin-bottom: 1.5rem;
}

.filter-buttons button {
    background-color: #1a73e8; /* Bright blue buttons */
    color: #ffffff; /* White text for contrast */
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-buttons button:hover {
    background-color: #0c47a1; /* Darker blue on hover */
}

/* Contact form */
form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

form input,
form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Contact form button */
form button {
    background-color: #1a73e8; /* Bright blue buttons */
    color: #ffffff; /* White text for contrast */
    padding: 0.5rem 1rem; /* Padding for the button */
    border: none;
    border-radius: 4px; /* Rounded corners for consistency */
    cursor: pointer;
    text-decoration: none; /* Remove underline */
    transition: background-color 0.3s ease; /* Smooth hover effect */
}

form button:hover {
    background-color: #003366; /* Slightly darker blue on hover (same as project buttons) */
}

/* Error message styles */
.error-message {
    color: #ff0000; /* Red for error messages */
    font-size: 0.875rem; /* Smaller font size */
    margin-top: 0.25rem;
    display: none; /* Hidden by default */
}

/* Error input field styles */
input.error,
textarea.error {
    border-color: #ff0000; /* Red border for invalid fields */
    background-color: #ffe6e6; /* Light red background for invalid fields */
}

/* Footer styles */
footer {
    background-color: #0c47a1; /* Darker blue for a less bright look */
    color: #e3f2fd; /* Light blue text for contrast */
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem; /* Slightly smaller font size for footer text */
}

footer p {
    margin: 0;
    color: #e3f2fd; /* Ensure footer text contrasts well with the background */
}

/* About Me section styles */
#about-me {
    background-color: #ffffff; /* White background for a clean look */
    padding: 2rem; /* Add spacing around the section */
    border-radius: 8px; /* Rounded corners for a softer look */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    margin-bottom: 2rem; /* Space below the section */
}

#about-me h2 {
    font-size: 2rem; /* Larger font size for the heading */
    text-align: center; /* Center-align the heading */
    color: #1a73e8; /* Bright blue for contrast */
    margin-bottom: 1rem; /* Space below the heading */
}

#about-me p {
    font-size: 1.125rem; /* Slightly larger font size for readability */
    line-height: 1.8; /* Increase line height for better readability */
    text-align: justify; /* Justify text for a clean look */
    margin-bottom: 1.5rem; /* Space below the paragraph */
    color: #333333; /* Dark gray for readability */
}

/* Skills list styles */
#about-me ul {
    list-style: none; /* Remove default bullet points */
    padding-left: 0; /* Remove default padding */
    margin-top: 1rem; /* Space above the list */
}

#about-me ul li {
    font-size: 1rem; /* Standard font size for list items */
    line-height: 1.6; /* Line height for better spacing */
    margin-bottom: 0.5rem; /* Space between list items */
    position: relative; /* Position for the icon */
    padding-left: 2rem; /* Space for the icon */
}

#about-me ul li::before {
    content: "✔"; /* Add a checkmark icon */
    color: #008000; /* Green color for the icon */
    font-size: 1.2rem; /* Slightly larger icon size */
    position: absolute; /* Position the icon */
    left: 0; /* Align the icon to the left */
    top: 0.1rem; /* Adjust vertical alignment */
}

/* Responsive images */
img {
    max-width: 100%; /* Ensure images scale down to fit their container */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove inline spacing below images */
    -webkit-user-drag: none; /* Prevent image dragging in Safari */
}

/* Responsive videos */
video {
    max-width: 100%; /* Ensure videos scale down to fit their container */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove inline spacing below videos */
}

/* Lightbox styles */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent black background */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px; /* Rounded corners for the image */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
}

.lightbox:target {
    display: flex; /* Show the lightbox when targeted */
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #ffffff;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Media Queries */

/* For tablets (768px and below) */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem; /* Reduce header font size */
    }

    nav ul {
        flex-direction: column; /* Stack navigation links vertically */
        gap: 1rem; /* Reduce spacing between links */
        -webkit-flex-direction: column; /* Safari */
        -webkit-gap: 1rem; /* Safari */
    }

    nav ul {
        display: none; /* Hide menu by default */
        flex-direction: column; /* Stack menu items vertically */
        gap: 1rem;
    }

    nav ul.visible {
        display: flex; /* Show menu when 'visible' class is added */
    }

    .hamburger {
        display: block;
    }

    #projects .project-list {
        flex-direction: column; /* Stack project cards vertically */
        -webkit-flex-direction: column; /* Safari */
        gap: 1.5rem; /* Reduce spacing between cards */
    }

    #projects .project-card {
        width: 100%; /* Make cards take full width */
    }

    #about-me {
        padding: 1.5rem; /* Reduce padding for smaller screens */
    }

    form input,
    form textarea {
        font-size: 0.9rem; /* Adjust input font size */
    }

    form button {
        padding: 0.5rem 1rem; /* Reduce button padding */
    }
}

/* For mobile devices (480px and below) */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem; /* Further reduce header font size */
    }

    nav ul {
        gap: 0.5rem; /* Reduce spacing between links */
        -webkit-gap: 0.5rem; /* Safari */
    }

    #projects h2,
    #about-me h2 {
        font-size: 1.5rem; /* Reduce section heading font size */
    }

    #projects .project-card {
        padding: 1rem; /* Reduce card padding */
    }

    #about-me p {
        font-size: 1rem; /* Adjust paragraph font size */
    }

    form input,
    form textarea {
        font-size: 0.8rem; /* Further adjust input font size */
    }

    form button {
        font-size: 0.9rem; /* Adjust button font size */
    }
}