/* CSS Variables for Rice University Brand Colors */
:root {
    --primary-blue: #003F87;
    --rice-gray: #5E6A71;
    --light-gray: #f5f5f5;
    --accent-red: #9D2235;
    --text-dark: #1a1a1a;
    --border-light: #e0e0e0;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: var(--primary-blue);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.profile-image {
    width: 160px; /* or whatever max width you want */
    height: auto;
    max-height: 220px; /* optional: control height */
    overflow: hidden;
  }
  
  .profile-photo {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain; /* or "cover" if you want it to fill */
  }

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.header-text .title {
    font-size: 1.1rem;
    opacity: 0.95;
    line-height: 1.4;
}

.header-text .affiliations {
    font-size: 0.95rem;
    margin-top: 0.5rem;
    opacity: 0.85;
}

/* Navigation Styles */
nav {
    background-color: var(--light-gray);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover {
    background-color: white;
    border-bottom-color: var(--accent-red);
}

/* Main Content Styles */
main {
    padding: 3rem 0;
}

section {
    margin-bottom: 4rem;
    scroll-margin-top: 60px;
}

h2 {
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

h3 {
    font-size: 1.3rem;
    color: var(--rice-gray);
    margin: 2rem 0 1rem;
}

h4 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

/* Research Summary Box */
.research-summary {
    background-color: var(--light-gray);
    padding: 2rem;
    border-left: 4px solid var(--accent-red);
    margin-bottom: 2rem;
}

.research-summary p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.research-summary p:last-child {
    margin-bottom: 0;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.stat-card {
    background-color: white;
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5rem;
    color: var(--accent-red);
    font-weight: bold;
}

.stat-label {
    color: var(--rice-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Publications Styles */
.publication-category {
    margin-bottom: 3rem;
}

.publication-list {
    list-style: none;
}

.publication-item {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.publication-item::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent-red);
}

.publication-item .year {
    font-weight: bold;
    color: var(--rice-gray);
    margin-right: 0.5rem;
}

.publication-item .title {
    font-style: italic;
}

.publication-item .venue {
    color: var(--rice-gray);
}

/* Projects Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: var(--light-gray);
    padding: 1.5rem;
    border-radius: 4px;
    border-left: 4px solid var(--primary-blue);
}

.project-card .role {
    font-size: 0.9rem;
    color: var(--rice-gray);
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-info {
    background-color: var(--light-gray);
    padding: 2rem;
    border-radius: 4px;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: var(--primary-blue);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--primary-blue);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav a {
        padding: 0.75rem 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    nav, footer {
        display: none;
    }
    
    body {
        font-size: 11pt;
    }
    
    h2 {
        page-break-before: auto;
        page-break-after: avoid;
    }
    
    .publication-item {
        page-break-inside: avoid;
    }
    
    .stat-card {
        border: 1px solid #000;
    }
    
    a {
        color: var(--text-dark);
        text-decoration: none;
    }
    
    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}