/* Define CSS variables for a consistent color scheme */
:root {
    --primary-bg: #31363E; /* Dark background for header */
    --secondary-bg: #1D2025; /* Darker background for nav bar */
    --text-light: #FFFFFF;
    --text-dark: #333333;
    --accent-color: #326EA1; /* Blue for links and highlights */
    --container-border-color: #202429;
    --sidebar-border-color: #505357;
    --body-bg: #f0f0f0;
    --container-bg: #ffffff;
}

/* --- Global Resets and Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    color: var(--text-dark);
    font: 0.875em/1.6em "Lucida Grande", Lucida, Verdana, sans-serif; /* Slightly larger base font */
    background-color: var(--body-bg);
    text-align: center; /* Center the container */
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Main Layout Structure --- */
#container {
    max-width: 960px;
    margin: 20px auto;
    text-align: left; /* Reset text-align for content */
    background-color: var(--container-bg);
    border: 10px solid var(--container-border-color);
    border-top: none; /* Header will provide the top visual */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.main-wrapper {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    gap: 30px;
}

main#contentContainer {
    flex: 1;
    min-width: 60%; /* Ensure content has enough space */
}

aside#sidebarContainer {
    width: 220px;
    flex-shrink: 0;
}

/* --- Header and Navigation --- */
#pageHeader {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    background-color: var(--primary-bg);
    color: var(--text-light);
    padding: 20px;
}

#pageHeader img {
    flex-shrink: 0;
}

#pageHeader > div {
    flex-grow: 1;
}

#pageHeader h1 {
    font-size: 2em;
    line-height: 1.2;
    letter-spacing: 1px;
}

#pageHeader h2 {
    font-size: 1em;
    font-weight: normal;
    opacity: 0.9;
}

nav#navcontainer {
    width: 100%;
    background-color: var(--secondary-bg);
    border-top: 1px solid var(--sidebar-border-color);
    border-bottom: 3px solid var(--container-border-color);
}

#navcontainer ul {
    list-style: none;
    display: flex;
}

#navcontainer li {
    flex-grow: 1; /* Make items share space */
    text-align: center;
}

#navcontainer a {
    display: block;
    padding: 12px 15px;
    color: var(--text-light);
    font-weight: bold;
    text-decoration: none;
    border-left: 1px solid var(--primary-bg);
}

#navcontainer li:first-child a {
    border-left: none;
}

#navcontainer a:hover {
    background-color: var(--accent-color);
    color: var(--text-light);
    text-decoration: none;
}

#navcontainer a#current {
    background-color: var(--accent-color);
    color: var(--text-light);
}

/* --- Content and Sidebar --- */
#content h1, #content h2 {
    font-family: Georgia, serif;
    font-weight: normal;
    letter-spacing: 1px;
    margin-bottom: 0.5em;
    color: var(--text-dark);
}

#content h1 { font-size: 1.8em; }
#content h2 { font-size: 1.5em; margin-top: 1em; }

#content ul.square {
    list-style-position: outside;
    padding-left: 20px;
}

#content ul.square li {
    margin-bottom: 1em;
}

/* People Page Specific Styles */
.members-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 2rem;
	padding-bottom: 2rem;
}

.member {
	text-align: center;
}

.member h3 {
	margin-bottom: 5px;
}

.member-photo-container {
	width: 150px;
	height: 150px;
	border-radius: 50%;
	background-color: var(--body-bg);
	color: var(--text-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1em;
	overflow: hidden;
	font-size: 3rem;
	font-weight: bold;
	text-transform: uppercase;
}
.member-photo-container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Publications Page Specific Styles */
.publication-authors {
    font-weight: bold;
}
.journal-title, .book-title {
    font-style: italic;
}
.publication-link {
    font-weight: bold;
}

#sidebar .sideHeader {
    font-family: Georgia, serif;
    font-weight: normal;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--sidebar-border-color);
    margin-bottom: 10px;
    padding-bottom: 5px;
}

/* --- Footer --- */
#footer {
    background-color: var(--container-border-color);
    color: var(--text-light);
    padding: 20px;
    text-align: center;
    font-size: 0.9em;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    body {
        font-size: 1em; /* Increase base font size on mobile for readability */
    }

    #container {
        width: 100%;
        margin: 0;
        border: none;
    }

    #pageHeader {
        flex-direction: column;
        text-align: center;
    }

    #navcontainer ul {
        flex-direction: column;
    }

    #navcontainer li a {
        border-left: none;
        border-top: 1px solid var(--primary-bg);
    }

    .main-wrapper {
        flex-direction: column;
        padding: 15px;
    }

    aside#sidebarContainer {
        width: 100%;
        order: -1; /* Move sidebar to top on mobile */
    }
}

/* --- Other Possible Styling (to be implemented as needed) --- */
/* #content blockquote, .standout { ... } - For any blockquotes or callouts */
/* table { ... } - For styling tables */
/* .imageStyle { ... } - If you need specific styles for images in content */
/* And so on for other elements as they appear */
