/* General Body Styles */
@font-face {
    font-family: 'Gandhi Serif';
    src: url('GandhiSerif-BoldItalic.woff2') format('woff2'),
        url('GandhiSerif-BoldItalic.woff') format('woff');
    font-weight: bold;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Gandhi Serif';
    src: url('GandhiSerif-Italic.woff2') format('woff2'),
        url('GandhiSerif-Italic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Gandhi Serif';
    src: url('GandhiSerif-Bold.woff2') format('woff2'),
        url('GandhiSerif-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gandhi Serif';
    src: url('GandhiSerif-Regular.woff2') format('woff2'),
        url('GandhiSerif-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --tamu-maroon: #500000;
    --uh-red: #C8102E;
    --brand-gradient: linear-gradient(90deg, var(--tamu-maroon), var(--uh-red));
    --brand-gradient-v: linear-gradient(var(--tamu-maroon), var(--uh-red));
}

body {
    font-family: 'Gandhi Serif';
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Gandhi Serif';
}

/* Container for centered content */
.container {
    max-width: 960px;
    margin: auto;
    overflow: auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1900px;
}

/* Header and Navigation */
.site-header {
    background: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
    border-bottom: 4px solid;
    border-image: var(--brand-gradient) 1; /* TAMU Maroon to UH Red */
}

.site-header h1 {
    margin: 0;
    font-size: 2.5rem;
}

.site-header .subtitle {
    font-size: 1.2rem;
    font-weight: 300;
}

nav ul {
    padding: 0;
    list-style: none;
    background: #444;
    text-align: center;
    margin: 0;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    padding: 15px 20px;
    display: inline-block;
    transition: background-color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    background: var(--brand-gradient);
}

/* Main Content Area */
main {
    padding: 20px 0;
}

.page-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.card {
    background: #fff;
    padding: 2rem;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card h2 {
    margin-top: 0;
    color: var(--tamu-maroon);
}

/* Specific Layouts */
.bio-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.bio-text {
    flex: 3;
    min-width: 300px;
}

.bio-contact {
    flex: 1; /* Takes up 1/3 of the space */
    min-width: 400px;
    background: #e9ecef;
    padding: 20px;
    border-radius: 5px;
}

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

/* Lists for Awards, Publications */
.data-list li {
    background: #fff;
    border-left: 5px solid;
    border-image: var(--brand-gradient-v) 1;
    padding: 15px;
    margin-bottom: 10px;
    list-style-type: none;
}

.data-list .year {
    font-weight: bold;
    display: block;
    color: #333;
    margin-bottom: 5px;
}

/* Gallery Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.gallery-item p {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: #333;
    color: #fff;
    margin-top: 30px;
    border-top: 4px solid;
    border-image: var(--brand-gradient) 1;
}

/* Profile Picture Styles */
.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%; /* Makes the image circular */
    object-fit: cover;
    object-position: center center;
    display: block;
    margin: 0 auto 20px; /* Centers the image */
    border: 3px solid var(--uh-red);
    object-position: 50% 10%; /* Default, but explicit. Try others below! */
}

/* Header for the links section */
.links-header {
    margin-top: 30px;
}

/* Styles for Social Links List */
.social-links {
    list-style: none;
    padding: 0;
    text-align: center; /* Centers the link text */
}

.social-links li {
    margin-bottom: 10px;
}

.social-links a {
    text-decoration: none;
    color: var(--tamu-maroon);
    font-weight: bold;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--uh-red);
    text-decoration: underline;
}

/* Styling for CSL bibliography output (from generated list) */
.csl-entry {
    background: #fff;
    border-left: 5px solid;
    border-image: var(--brand-gradient-v) 1;
    padding: 15px;
    margin-bottom: 10px;
    line-height: 1.5; /* Improve readability */
}

/* For the hanging indent, if desired */
.hanging-indent .csl-entry {
    padding-left: 30px; /* Adjust as needed */
    text-indent: -15px; /* Pull the first line back to the left */
}

/* Styling for the italics in the titles (e.g., journal names) */
.csl-entry em {
    font-style: italic;
}

/* Optional: Make the titles bold if you prefer */
.csl-entry span {
    font-weight: normal; /* Default */
}

/* Optional: Video style for gallery page */
.gallery-item video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}