/* Basic Reset and Typography */
body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    background-color: #fff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 0;
}

/* Header and Navigation */
header {
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.site-title a {
    text-decoration: none;
    color: #333;
    font-family: 'Merriweather', serif; /* Use the new font */
    font-size: 0.9em; /* Make the font slightly smaller */
    font-weight: normal; /* Remove the bold styling */
    white-space: nowrap; /* Prevent the title from wrapping to a new line */
    text-transform: uppercase;
}

.main-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.main-nav li {
    margin-left: 25px;
    position: relative;
}

.main-nav li a:hover {
    color: #007cba;
    border-bottom-color: #007cba; 
}


/* Dropdown Menu */
.dropdown .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    min-width: 200px;
    z-index: 1000;
    list-style: none;
    padding: 5px 0;
    margin: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dropdown:hover .submenu {
    display: block;
}

.submenu li {
    margin: 0;
}

.submenu li a {
    padding: 8px 15px;
    white-space: nowrap;
}

.submenu li a:hover {
    background-color: #f0f0f0;
}

/* Hero Section Styling */
.hero .container {
    position: relative;
    z-index: 3; /* Ensure content is above the overlay and fader */
}

.hero {
    padding: 120px 0; /* Increased padding for more impact */
    text-align: center;
    background-color: #222; /* Fallback color */
    /* Point to the new local image. Make sure the path and filename are correct. */
    background-image: url('images/grand-canyon-route.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative; /* For the overlay */
    color: #fff; /* Make text white */
}

.hero-background-fader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0; /* Start hidden */
    transition: opacity 2.5s ease-in-out; /* Smooth fade transition */
    z-index: 1; /* Sit at the very bottom */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6); /* Slightly lighter overlay */
    z-index: 2; /* Sit on top of the background images but below the text */
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 0.1em;
    color: #fff; /* Ensure text is white */
}

.hero h2 {
    font-size: 1.8em;
    color: #eee; /* A slightly dimmer white for the subtitle */
    font-weight: normal;
}

/* Bio Section Styling */
.bio {
    padding: 50px 0;
    background: #f7f7f7;
    text-align: center;
}

.bio p {
    margin: 15px auto;
    font-size: 1.1em;
    max-width: 750px; /* Center content */
    text-align: left;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.to-top-link {
    color: #ccc;
    text-decoration: none;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.to-top-link:hover {
    background-color: #555;
}
/* --- Navigation and Menu Styling Update --- */

/* Main Navigation Container */
.main-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap; /* Allow menu items to wrap onto a new line when needed */
    justify-content: flex-end; /* Keep items aligned to the right */
    font-size: 1em; /* Adjust font size for better look */
}

.main-nav li {
    margin-left: 20px; /* Reduced margin slightly */
    position: relative;
}

.main-nav li a {
    text-decoration: none;
    color: #555;
    padding: 10px 5px; /* Add some horizontal padding */
    white-space: nowrap; /* Prevent menu items from wrapping their text */
    display: block;
    transition: color 0.3s ease;
    /* FIX: Reserve 2px space with a transparent border */
    border-bottom: 2px solid transparent; 
}

/* Dropdown Menu (Keep as is, but ensure hover works over it) */
.dropdown .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    min-width: 200px;
    z-index: 1000;
    list-style: none;
    padding: 5px 0;
    margin: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dropdown:hover .submenu {
    display: block;
}

.submenu li {
    margin: 0;
}

.submenu li a {
    padding: 8px 15px;
    white-space: nowrap;
    border-bottom: none !important; /* Important to override the hover effect on submenu items */
}

.submenu li a:hover {
    color: #007cba;
}


/* --- Development/Publications Page Styles --- */

/* Highlight the current page in the menu */
.main-nav li a.current-page {
    border-bottom: 2px solid #555; 
    color: #000;
}

.page-header {
    text-align: center;
    /* Add a subtle background color or image for consistency */
    color: #ddd;
    background: radial-gradient(ellipse at center, #222 60%, #333 100%); /* Fades from center to edge */
    border-bottom: 1px solid #eee;
}

.page-header .container {
    /* Reduce vertical padding to make the header shorter */
    padding-top: 2px;
    padding-bottom: 2px;
}

.page-header h1 {
    font-size: 2.5em;
    margin-bottom: 2px;
}

.page-header p {
    color: #999;
    font-size: 1.1em;
}

/* Projects List Styling */
.projects-list .container {
    padding-top: 40px;
    padding-bottom: 40px;
}

.project-item {
    padding: 15px 0;
}

.project-item h2 {
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 5px;
}

.project-item h2 a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.project-item h2 a:hover {
    color: #007cba; /* A nice hover color for titles */
    border-bottom: none; /* Override menu hover border */
}

.project-meta {
    font-size: 0.9em;
    color: #888;
    margin-top: 0;
    margin-bottom: 15px;
}

/* Separator line between projects */
.projects-list hr {
    border: 0;
    height: 1px;
    background-color: #eee;
    margin: 10px 0;
}

.read-more {
    display: inline-block;
    color: #007cba;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: margin-left 0.2s;
}

.read-more:hover {
    margin-left: 5px; /* Subtle movement on hover */
    border-bottom: none; /* Override menu hover border */
}

/* Highlight Author Name */
.my-name {
    font-weight: bold; /* Make it bold */
    color: #333; /* A slightly darker color */
    background-color: #e0f2f7; /* Light blue background for emphasis */
    border-radius: 3px; /* Slightly rounded corners */
}


/* --- Contact Page Styles --- */

.contact-info .container {
    padding: 40px 0;
    max-width: 800px; /* Keep content focused */
    text-align: center;
}

.contact-method {
    margin-bottom: 40px;
    padding: 20px;
}

.contact-method h2 {
    font-size: 1.5em;
    margin-top: 0;
    color: #333;
}

.contact-method p {
    font-size: 1.1em;
    color: #666;
}

.contact-method ul {
    list-style: none;
    padding: 0;
}

.contact-method ul li a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 1.1em;
    padding: 5px;
    display: inline-block;
}

/* --- Contact Form Styles --- */
.contact-form {
    margin-top: 20px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box; /* Important for padding and width */
}

.contact-form button.large-button {
    border: none;
    cursor: pointer;
}

/* --- Responsive Design & Mobile Styles --- */

/* Styles for the mobile navigation toggle (hamburger button) */
.mobile-nav-toggle {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001; /* Ensure it's above other header content */
}

.mobile-nav-toggle .hamburger-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* For screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.post-meta {
    margin: 0;
}

.custom-official-quote {
    /* Main Indentation & Background */
    margin: 2em 0; /* Add vertical space */
    padding: 1.5em 2em 1.5em 2em; /* Padding inside the quote */
    background-color: #f7f7f7; /* Light grey background to separate it */
    border-radius: 8px; /* Slightly rounded corners */
    
    /* Left Border (The defining quote line) */
    border-left: 5px solid #005A32; /* A strong color (e.g., dark green for environment/recycling) */
    
    /* Text Styling */
    font-size: 1.05em; /* Slightly larger text */
    line-height: 1.6;
    color: #333; /* Dark gray text for readability */
}

.custom-official-quote p {
    /* Ensures the paragraph within the blockquote is not overly indented */
    margin-bottom: 1em; 
    font-style: italic; /* Keeps the quoted text italic */
}

.custom-official-quote cite {
    /* Styles the source line */
    display: block; /* Ensures cite is on a new line */
    text-align: right;
    font-style: normal; /* Removes italic from the source */
    color: #666;
    font-size: 0.9em;
    margin-top: 1em;
    padding-top: 0.5em;
    border-top: 1px dashed #ccc; /* Separator line for the citation */
}

.centered-list-container {
    /* 1. Set a fixed or max width for the container */
    max-width: 400px; /* Adjust this value as needed based on your page layout */
    width: 90%; /* Ensures it's responsive on smaller screens */

    /* 2. Center the block */
    margin-left: auto;
    margin-right: auto;
}

.centered-list-container ul {
    /* Optional: Remove any default margin/padding applied by the parent theme if the centering looks off */
    padding-left: 20px; /* Keep default padding for the bullets */
    margin: 0;
}

/* 1. The Flex Container */
.project-summary-flex {
    display: flex;        /* Activates the flex layout */
    align-items: flex-start; /* Aligns items to the top (prevents image from centering if summary is short) */
    gap: 20px;            /* Adds 20px space between the image and the text */
    margin: 15px 0;       /* Adds vertical margin above and below the flex area */
}

/* 2. Styling the Thumbnail */
.project-thumbnail {
    width: 150px;         /* Sets the desired width for the thumbnail */
    max-width: 100%;
    height: auto;         /* Maintains the image's aspect ratio */
    object-fit: cover;    /* Ensures image looks good if using fixed height/width */
    border-radius: 4px;   /* Optional: softens the edges */
    flex-shrink: 0;       /* **Crucial:** Prevents the image from shrinking */
}

/* 3. Styling the Summary Text */
.project-summary-text {
    /* Ensures the paragraph takes up the rest of the available space */
    flex-grow: 1;         
    /* Important: removes the default margin on the paragraph */
    margin-top: 0; 
    margin-bottom: 0; 
}

/* Main breakpoint for mobile devices */
@media all and (max-width: 800px) {

    /* --- Header & Navigation --- */
    header .container {
        flex-wrap: wrap; /* Allow items to wrap */
    }

    header .mobile-nav-toggle {
        display: block; /* Show the hamburger button */
    }

    /* Target the <nav> element, which is the flex item, to reorder it */
    header nav {
        order: 3; /* Move the entire nav container to the end */
        width: 100%; /* Make it take the full width on its own line */
    }

    header nav .main-nav {
        display: none; /* Hide the nav by default */
        flex-direction: column;
        width: 100%;
        margin-top: 15px; /* Add space between button and the menu */
    }

    header nav .main-nav.is-visible {
        display: flex; /* Show the nav when toggled by JS */
    }

    header nav .main-nav li {
        margin-left: 0;
        width: 100%;
    }

    header nav .main-nav li a {
        padding: 15px;
        border-bottom: 1px solid #eee;
        border-left: 2px solid transparent; /* For active state */
    }
    
    header nav .main-nav li a.current-page {
        border-bottom: 1px solid #eee; /* Reset desktop style */
        border-left: 2px solid #555; /* Highlight on the side */
        background-color: #f9f9f9;
    }

    /* Make dropdown work for touch (disable hover, enable JS click) */
    .dropdown:hover .submenu { display: none; }
    .dropdown .submenu {
        position: static;
        display: none;
        border: none; box-shadow: none;
        padding-left: 15px;
        background-color: #f9f9f9;
    }
    .dropdown .submenu.is-visible { display: block; }

    /* --- Typography & Layout --- */
    .hero h1 { font-size: 2.5em; }
    .hero h2 { font-size: 1.3em; }
    .page-header h1 { font-size: 2em; }

    /* --- Footer --- */
    footer .container {
        flex-direction: column;
        gap: 15px;
    }
     /* 1. Stack the image and text */
    .project-summary-flex {
        flex-direction: column;
        align-items: center; /* Center items in the column */
        gap: 10px;
    }

    /* 2. Implement the 50% screen width constraint */
    .project-thumbnail {
        /*
         * Goal: Make the image take up 100% of the parent width,
         * BUT limit its size to 50% of the viewport width (50vw).
         */
        max-width: 80vw; /* <-- This is the key change! */
        width: 100%;
        height: auto;
        
        flex-shrink: 0; /* Already there, but good to keep */
    }

    /* 3. Text can remain as is, or remove unnecessary flex-grow */
    .project-summary-text {
        /* The margin is necessary if you removed the default on desktop */
        margin-top: 0;
    }
}