/* General Styles */
/* General background color for the body */
body {
    background-color: #fdf5f5; /* Light tan background */
    color: #795548; /* Dark text for readability */
    font-family: "Marcellus", serif; /* Ensure consistent font */
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Center items vertically */
    padding: 20px 20px; /* Adjust padding for better spacing */
    z-index: 9999; /* Ensure the navbar is on top of all other elements */
    position: sticky; /* Keep the navbar at the top while scrolling */
    top: 0; /* Stick the navbar to the top of the viewport */
}

.logo {
    font-size: 1.75rem;
    font-weight: bold;
    letter-spacing: 5px;
    display: flex;
    align-items: center; /* Center the logo text vertically */
}

ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center; /* Center the list items vertically */
}

ul li {
    margin-right: 20px;
}

ul li a {
    font-size: 1.75rem;
    text-decoration: none;
    transition: color 0.1s;
    display: flex;
    align-items: center; /* Center the link text vertically */
    height: 100%; /* Ensure the links take up the full height of the navbar */
}

.active {
    background-color: #795548;
    padding: 10px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-shadow: 0px 0px 2px rgba(0, 0, 0, 5); /* Subtle shadow */
}

.active:hover {
    padding: 10px;
    text-decoration: none;
    color: white;
}

.not-active {
    color: #795548;
    padding: 10px;
    text-decoration: none;
}

.not-active:hover {
    background-color: #795548;
    color: white;
}

.checkbtn {
    font-size: 30px;
    color: #333;
    cursor: pointer;
    display: none;
}

#check {
    display: none;
}

/* Image Grid */
.image-fit {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.writing-fit {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

#image-text {
    background-color: transparent !important;
    /* No background */
    color: white;
    /* White text for contrast */
    text-shadow: 4px 4px 10px rgba(0, 0, 0, 1);
    /* Stronger shadow for better visibility */
    text-align: center;
    /* Center-align the text */
    padding: 5px;
    /* Add padding for better readability */
    font-size: 18px;
    /* Slightly larger font size for better visibility */
    line-height: 1.5;
    /* Adjust line height for spacing between lines */
    display: none;
    /* Hide the text by default */
    position: absolute;
    /* Position the text over the image */
    bottom: 0;
    /* Align the text at the bottom of the image */
    left: 50%;
    /* Start positioning from the center horizontally */
    transform: translateX(-50%);
    /* Center the text horizontally */
    width: auto;
    /* Adjust the width to fit the text content */
    max-width: 90%;
    /* Prevent the text from overflowing the image */
    font-weight: bold;
    /* Make the text bold for better emphasis */
    z-index: 2;
    /* Ensure the text is above any other elements */
}

#image-container:hover #image-text {
    display: block;
    /* Show the text when hovering over the image */
}

/* Optional: Add a subtle gradient overlay to darken the image */
#image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
    /* Subtle gradient */
    z-index: 1;
    /* Place the gradient below the text */
    opacity: 0;
    /* Hide the gradient by default */
    transition: opacity 0.3s ease;
    /* Smooth transition */
}

#image-container:hover::before {
    opacity: 1;
    /* Show the gradient when hovering over the image */
}

/* Responsive Styles */
@media (max-width: 768px) {
    .checkbtn {
        display: block;
        order: 1;
        margin-right: 20px;
    }

    ul {
        position: fixed;
        top: 90px;
        right: -100%;
        background-color: white;
        width: 100%;
        height: 70px;
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
        align-items: center;
        transition: all 0.3s;
    }

    ul li {
        margin: 20px 0;
    }

    ul li a {
        font-size: 20px;
    }

    #check:checked~ul {
        right: 0;
    }

    #image-text {
        display: block !important;
        /* Always show the text */
        position: absolute;
        /* Ensure the text is positioned over the image */
        bottom: 0;
        /* Align the text at the bottom of the image */
        left: 50%;
        /* Center the text horizontally */
        transform: translateX(-50%);
        /* Adjust for centering */
        width: auto;
        /* Adjust the width to fit the text content */
        max-width: 90%;
        /* Prevent the text from overflowing the image */
        font-weight: bold;
        /* Make the text bold for better emphasis */
        z-index: 2;
        /* Ensure the text is above any other elements */
    }

    #image-container::before {
        opacity: 1 !important;
        /* Always show the #333 background */
    }

    .w3-margin-bottom {
        margin-bottom: 40px !important;
    }

    /* Default state for mobile view */
    #image-container::before {
        opacity: 0;
        /* Hide the #333 background by default */
        transition: opacity 0.3s ease;
        /* Smooth transition */
    }

    #image-container.visible::before {
        opacity: 1;
        /* Show the #333 background when in view */
    }

    #image-text {
        display: none;
        /* Hide the text by default */
        transition: opacity 0.3s ease;
        /* Smooth transition */
    }

    #image-container.visible #image-text {
        display: block;
        /* Show the text when in view */
    }
}

@media (min-width: 769px) {
    #image-text {
        display: none;
    }

    #image-container:hover #image-text {
        display: block;
    }
}

/* Portfolio Section */
#portfolio .name {
    font-size: 30px;
    text-align: center;
    margin: 0em 0 1em;
    font-weight:bold;
}
#portfolio .date {
    font-size: 18px;
    text-align: center;
    margin: 0em 0 1em;
}
#portfolio p {
    font-size: 20px;
    text-align: left;
    margin: 0em 0 1em;
}

#portfolio a {
    color: #795548;
    text-decoration: underline #795548;
    text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.3); /* Subtle shadow */

}

#portfolio a:hover {
    background-color: #795548;
    color: white;
    text-decoration: none;
}

/* Footer */
/* Footer background color */
footer {
    color: #333; /* Dark text for contrast */
    padding: 20px;
}

.footer:hover {
    filter: drop-shadow(2px 2px 2px #795548);
}

#image-container:hover #image-text {
    display: block;
    /* Show the text when hovering over the image */
    position: absolute;
    /* Position the text over the image */
    bottom: 0;
    /* Align the text at the bottom of the image */
    width: 100%;
    /* Ensure the text spans the full width of the image */
}

/* Add spacing below the navbar */
.w3-center.w3-margin-bottom {
    margin-top: 100px;
    /* Increase the top margin for the sorting dropdown */
}

#projects-container {
    margin-top: 0px;
    /* Add spacing above the projects grid */
}

footer {
    margin-top: 100px;
    /* Add spacing above the footer */
}

/* Styled Dropdown */
.styled-dropdown {
    appearance: none;
    /* Remove default browser styles */
    -webkit-appearance: none;
    /* For Safari */
    -moz-appearance: none;
    /* For Firefox */
    background-color: #fff;
    /* White background */
    border: 1px solid #ccc;
    /* Light gray border */
    border-radius: 5px;
    /* Rounded corners */
    padding: 10px 15px;
    /* Padding inside the dropdown */
    font-size: 16px;
    /* Font size */
    color: #333;
    /* Text color */
    cursor: pointer;
    /* Pointer cursor on hover */
    width: 100%;
    /* Full width */
    max-width: 250px;
    /* Limit the width */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Subtle shadow */
    transition: all 0.3s ease;
    /* Smooth transition */
    position: relative;
    /* For custom arrow positioning */
}

.styled-dropdown:focus {
    outline: none;
    /* Remove focus outline */
    border-color: #795548;
    /* Highlight border on focus */
    box-shadow: 0 0 5px rgba(121, 85, 72, 0.5);
    /* Glow effect */
}

.styled-dropdown:hover {
    background-color: #f9f9f9;
    /* Slightly lighter background on hover */
}

/* Add a custom dropdown arrow */
.styled-dropdown::after {
    content: '▼';
    /* Unicode for a down arrow */
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    /* Prevent interaction with the arrow */
    font-size: 12px;
    color: #333;
}

/* Dropdown Button */
.dropbtn {
    background-color: #4CAF50;
    /* Green background */
    color: white;
    /* White text */
    padding: 10px 20px;
    /* Padding inside the button */
    font-size: 16px;
    /* Font size */
    border: none;
    /* Remove border */
    cursor: pointer;
    /* Pointer cursor on hover */
    border-radius: 5px;
    /* Rounded corners */
}

/* Dropdown Container */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown Content */
.dropdown-content {
    display: none;
    /* Hidden by default */
    position: absolute;
    background-color: #f9f9f9;
    /* Light background */
    min-width: 160px;
    /* Minimum width */
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    /* Subtle shadow */
    z-index: 1;
    /* Ensure it appears above other elements */
    border-radius: 5px;
    /* Rounded corners */
}

/* Dropdown Links */
.dropdown-content a {
    color: #333;
    /* #333 text */
    padding: 12px 16px;
    /* Padding inside each link */
    text-decoration: none;
    /* Remove underline */
    display: block;
    /* Block-level links */
    font-size: 14px;
    /* Font size */
}

/* Hover Effects */
.dropdown-content a:hover {
    background-color: #f1f1f1;
    /* Slightly darker background on hover */
}

.dropdown:hover .dropdown-content {
    display: block;
    /* Show the dropdown content on hover */
}

.dropdown:hover .dropbtn {
    background-color: #3e8e41;
    /* Darker green on hover */
}

/* Links */
a {
    color: #795548; /* Brown text color */
    text-decoration: none;
}

a:hover {
    color: #5d4037; /* Darker brown on hover */
}

/* Buttons or Highlights */
button, .highlight {
    background-color: #e8dfd6; /* Soft cream */
    color: #333; /* Dark text */
    border: 1px solid #795548; /* Brown border */
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

button:hover, .highlight:hover {
    background-color: #795548; /* Brown background */
    color: #fff; /* White text */
}

/* Footer icons */
footer a img {
    filter: grayscale(50%); /* Subtle grayscale effect */
    transition: filter 0.3s ease;
}

footer a img:hover {
    filter: grayscale(0%); /* Remove grayscale on hover */
}

/* About Section */
.about-section {
    padding: 50px 20px;
    background-color: #F4EAE6; /* Light tan background */
}

.about-container {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping on larger screens */
    gap: 20px; /* Add spacing between text and image */
    align-items: center; /* Align items vertically */
    max-width: 1200px;
    margin: 0 auto; /* Center the container */
}

.about-text {
    flex: 1 1 50%; /* Text takes up 50% of the width */
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333; /* Dark gray text */
}

.about-text h2 {
    font-size: 2rem;
    color: #795548; /* Brown heading */
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
}

.about-image {
    flex: 1 1 50%; /* Image takes up 50% of the width */
    text-align: center; /* Center the image */
}

.about-image img {
    max-width: 100%; /* Ensure the image doesn’t overflow */
    height: auto; /* Maintain aspect ratio */
    border-radius: 10px; /* Add rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
}

.about-text a:hover::after {
    content: " →"; /* Add an arrow icon on hover */
    color: #D84315; /* Match the hover color */
    transition: color 0.3s ease;
}

/* Links in About Text */
.about-text a {
    color: #5D4037; /* Soft brown */
    font-weight: bold; /* Keep the links bold for emphasis */
    text-decoration: none; /* Remove underline */
    border-bottom: 1px solid #5D4037; /* Add a subtle bottom border */
    transition: color 0.3s ease, border-color 0.3s ease; /* Smooth hover effect */
}

.about-text a:hover {
    color: #795548; /* Slightly darker brown on hover */
    border-bottom: 1px solid #795548; /* Change border color on hover */
    background-color: #F4EAE6; /* Light tan background highlight */
    padding: 2px 4px; /* Add padding for the highlight */
    border-radius: 3px; /* Round the edges of the highlight */
}

/* Responsive Design for Smaller Screens */
@media (max-width: 768px) {
    .about-container {
        flex-direction: column; /* Stack text and image vertically */
    }

    .about-text, .about-image {
        flex: 1 1 100%; /* Make both elements take full width */
    }
}

/* Sort Dropdown Styling */
.sort-dropdown {
  position: relative;
  display: inline-block;
}

#sort-button {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 150px; /* Set a fixed width for the button */
  justify-content: space-between; /* Align text and icon properly */
}

#sort-icon {
  font-size: 12px;
}

.sort-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 10px;
  z-index: 100;
  width: 150px; /* Match the width of the button */
}

.sort-menu label {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
  cursor: pointer;
}

.sort-menu input[type="radio"] {
  margin-right: 10px;
}