/* Academic Website Styles - Updated Version */

/* --------------------------------------------
   Import Inter font for better typography
   -------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

/* --------------------------------------------
   CSS Variables
   -------------------------------------------- */
:root {
    --color-primary: #0b2e59;         /* Hopkins Blue */
    --color-link: #0066cc;
    --color-text-primary: #333333;
    --color-text-secondary: #666666;
    --color-bg-light: #f8f9fa;
    --color-border: #e5e5e5;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Source Serif 4', Georgia, serif;
    --container-width: 960px;
}

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

/* --------------------------------------------
   Base Styles
   -------------------------------------------- */
body {
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* UI elements stay in Inter */
h1, h2, h3, h4, h5, h6,
nav, .header-text, .header-links,
.highlight-box, footer,
.institution-heading,
.interests-list {
    font-family: var(--font-main);
}

/* Publication/talk titles in serif */
.publication-item h4 {
    font-family: var(--font-serif);
    font-weight: 600;
}

/* Header credential line in serif */
.header-text .title {
    font-family: var(--font-serif);
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* --------------------------------------------
   Container
   -------------------------------------------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------
   Header Styles
   -------------------------------------------- */
header {
    background-color: var(--color-bg-light);
    border-bottom: 1px solid var(--color-border);
    padding: 2rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Smaller photo for sub-pages */
.profile-photo-small {
    width: 80px;
    height: 80px;
}

.header-text h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.1rem;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.header-text .title {
    color: var(--color-text-secondary);
    font-weight: 500;
    margin-bottom: 0;
    line-height: 1.4;
}

.header-text .affiliation {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.4;
}

.header-links {
    margin-top: 0.4rem;
    font-size: 0.9rem;
}

.header-links a {
    color: var(--color-link);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.header-links a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.header-links .divider {
    color: #ccc;
    margin: 0 0.5rem;
    font-weight: 300;
}

/* --------------------------------------------
   Navigation
   -------------------------------------------- */
nav {
    background-color: #fff;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

nav a:hover {
    background-color: var(--color-bg-light);
    color: var(--color-link);
}

nav a.active {
    font-weight: 600;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background-color: var(--color-primary);
}

/* --------------------------------------------
   Main Content
   -------------------------------------------- */
main {
    padding: 2.5rem 0;
}

/* Section styling for general pages */
section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Headings in main content */
main h2 {
    color: var(--color-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

main h3 {
    color: var(--color-primary);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

/* --------------------------------------------
   Highlight Box (Recent/Notifications)
   -------------------------------------------- */
.highlight-box {
    border-left: 4px solid var(--color-primary);
    background: #f9fbfd;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0.25rem;
}

.highlight-box p {
    margin: 0;
}

.recent-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.recent-list li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.recent-list li:last-child {
    margin-bottom: 0;
}

.highlight-box strong {
    color: var(--color-primary);
}

/* --------------------------------------------
   Section Spacing (used on Publications, Talks, Teaching, Contact pages)
   -------------------------------------------- */
.section-spacing {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.section-spacing:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* --------------------------------------------
   Publication Items (List entries on Publications page)
   -------------------------------------------- */
.publication-item {
    border-left: 3px solid var(--color-border);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s ease;
}

.publication-item:hover {
    border-left-color: var(--color-link);
}

.publication-item h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-text-primary);
}

.publication-item p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* --------------------------------------------
   Footer
   -------------------------------------------- */
footer {
    background-color: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

footer p {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* --------------------------------------------
   Contact Page Styles
   -------------------------------------------- */
address {
    font-style: italic;
    color: #555;
    line-height: 1.5;
    margin-left: 0.25rem;
}

ul.styled-list {
    list-style: none;
    padding: 0;
    margin-left: 0;
}

ul.styled-list li {
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
}

ul.styled-list li a {
    color: var(--color-link);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, padding-left 0.2s ease;
    padding-left: 0.25rem;
    position: relative;
}

ul.styled-list li a::before {
    content: "→";
    color: var(--color-primary);
    font-size: 0.8rem;
    position: absolute;
    left: -1.2rem;
    top: 0.05rem;
    transition: left 0.2s ease;
}

ul.styled-list li a:hover::before {
    left: -1.5rem;
}

ul.styled-list li:last-of-type {
    margin-bottom: 0;
}

/* --------------------------------------------
   Utility Classes
   -------------------------------------------- */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-text-secondary); }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

/* --------------------------------------------
   Research Interests (Minimal Style)
   -------------------------------------------- */
.research-interests {
    background-color: transparent;    /* no gray box */
    padding: 0;                       /* no extra vertical padding */
    margin: 2rem 0;                   /* small top/bottom spacing */
    border-radius: 0;                 /* no rounding */
    box-shadow: none;                 /* no drop shadow */
}

.research-interests .container {
    padding: 0;                       /* match other sections */
    max-width: 900px;
    margin: 0 auto;
}

.research-interests h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
    /* Optional: add underline if desired
    border-bottom: 1px solid var(--color-border);
    */
}

.interests-list {
    list-style: none;
    margin: 1rem 0 1.5rem 0;
    padding: 0.75rem 1rem;  /* keep some padding for readability */
}

.interests-list li {
    position: relative;
    padding-left: 1.25rem;           /* slightly less indent */
    margin-bottom: 0.5rem;           /* tighter spacing */
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text-primary);
}

.interests-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6rem;                      /* adjust for tighter line-height */
    width: 0.4rem;                    /* slightly smaller dot */
    height: 0.4rem;
    background-color: var(--color-primary);
    border-radius: 50%;
}

@media (max-width: 600px) {
    .research-interests h2 {
        font-size: 1.5rem;
    }
    .interests-list li {
        padding-left: 1rem;
        font-size: 0.95rem;
    }
    .interests-list li::before {
        top: 0.55rem;
        width: 0.35rem;
        height: 0.35rem;
    }
}

/* --------------------------------------------
   Timeline Style for Research Page (Optional)
   -------------------------------------------- */
.timeline-item {
    position: relative;
    padding-left: 2rem;               /* make room for the dot on the left */
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
}

.timeline-item:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;                     /* adjust so it aligns with h2’s baseline */
    width: 0.75rem;
    height: 0.75rem;
    background-color: var(--color-primary);
    border-radius: 50%;
}

.timeline-item .research-date {
    margin-left: 0.75rem;            /* prevent overlap with the dot */
}

.timeline-item h2,
.timeline-item .research-role,
.timeline-item ul {
    margin-left: 0.75rem;            /* shift content rightward */
}

/* --------------------------------------------
   Research Page Specific Styles
   -------------------------------------------- */
/* Page Title */
.research-page-title {
    font-size: 1.75rem;              /* slightly larger than a default h2 */
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1.5rem;           /* space before first research section */
}

/* Each Research Section */
.research-section {
    margin-bottom: 2rem;
}

/* Institution + Date */
.institution-heading {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.date {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-left: 0.5rem;
}

/* Role Title */
.role-text {
    font-size: 1rem;
    font-style: italic;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}

/* Responsibilities List */
.responsibilities-list {
    list-style-type: disc;
    margin-left: 1.5rem;             /* indent bullets */
    color: var(--color-text-secondary);
}

.responsibilities-list li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    font-size: 1rem;
}

/* Definition List for Current Research Areas */
.areas-list {
    margin-left: 0;                  /* remove default <dl> indentation */
    padding-left: 1.5rem;            /* indent entire block slightly */
}

.areas-modeling-list dt,
.areas-list dt {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-top: 1rem;
}

.areas-modeling-list dd,
.areas-list dd {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-left: 1rem;               /* indent description under each dt */
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* --------------------------------------------
   Responsive Design
   -------------------------------------------- */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-photo {
        width: 100px;
        height: 100px;
    }
    
    .header-text h1 {
        font-size: 1.75rem;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav a {
        text-align: center;
        padding: 0.75rem;
    }
    
    nav a.active::after {
        display: none;
    }

    /* Adjust heading sizes for small screens */
    h1 {
        font-size: 1.75rem;
    }
    h2 {
        font-size: 1.5rem;
    }

    /* Reduce spacing on research page for mobile */
    .research-page-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    .institution-heading {
        font-size: 1.125rem;
    }
    .date {
        font-size: 0.9rem;
    }
    .responsibilities-list li,
    .areas-list dt,
    .areas-list dd {
        font-size: 0.95rem;
    }
    .areas-list dt {
        margin-top: 0.75rem;
    }
    .areas-list dd {
        margin-bottom: 0.5rem;
        margin-left: 0.75rem;
    }
}

/* Navbar base */
.navbar {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 0.25em 0;
}

.nav-links {
  display: flex;
  gap: .75em;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #002D72;
  font-weight: 500;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5em;
}

/* Mobile styles */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    margin-top: 1em;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }
}


/* Contact page: muted qualifier next to each email address */
.email-note {
    color: var(--color-text-secondary);
    font-size: 0.9em;
}
