/* Base Layout */
body {
    font-size: 1.05em;
    line-height: 1.8;
    font-weight: 400;
    margin: 0px;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #ffffff;
    color: #222;
}

.layout-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2em;
  display: block;
  justify-content: center;
  align-items: center;
}

/* Header */
header {
  background: #A51C30;
  color: #fff;
  padding: 1.2em 0.5em;
  text-align: left;
}
header h1, header h2 {
  margin: 0;
  color: white;
}

/* Navigation Bar */
nav#main-nav {
  background: #000000;
  color: #fff;
  padding: 1em 0;
  width: 100%;
}

nav#main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2em;
}

nav#main-nav li {
  margin: 0;
}

nav#main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-bottom 0.2s;
}

nav#main-nav a:hover,
nav#main-nav a.active {
  border-bottom: 2px solid #fff;
}

@media (max-width: 600px) {
  nav#main-nav ul {
    gap: 1em;  /* tighter spacing on small screens */
  }

  nav#main-nav a {
    font-size: 0.95em;  /* optional: slightly smaller text */
  }
}

.nav-spacer {
  height: 4em;     /* match fixed nav height */
  display: none;   /* hidden by default */
}


/* Sticky Nav */
nav#main-nav.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #000000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 1000;
  width: 100%;
}

/* Main Content */
#main-content {
  max-width: 1050px;   /* was probably ~800px; bump as you like (e.g., 1200) */
  margin: 2rem auto;   /* keep centered */
  padding: 1.5rem;     /* comfy inner padding */
  /* max-width: 700px;
  margin: 2em auto;
  padding: 1em 1em 0.1em; */
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 2px 12px rgba(20,40,80,0.06);
}

main {
    max-width: 700px;
    margin: 2em auto;
    padding: 0 1em 1em;
    background: #fff;
    border-radius: 7px;
    box-shadow: 0 2px 12px rgba(20,40,80,0.06);
}

h1, h2, h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
  line-height: 1.3;
}

h2, h3 {
  color: #A51C30;
}
a {
  color: #A51C30;
}
a:hover {
  color: #7a1626;
}

a {
  color: #004080; /* dark blue with high contrast */
}
a:focus, button:focus {
  outline: 3px solid #ffcc00; /* or any bright/high-contrast color */
  outline-offset: 2px;
}

/* Sections */
.intro, .news, .pubs, .team, .projects {
  margin-bottom: 2em;
}

.intro h2, .pubs h2, .team h2, .projects h2 {
  color: #234073;
  margin-top: 0;
}

.news ul, .pubs ul, .projects ul, .people-list {
  padding-left: 1.2em;
  line-height: 2.2em;
}

.people-list li {
  margin-bottom: 1.5em;
}

.projects li {
  line-height: 2.2em;
  margin-top: 1.2em;
}

/*new blog style*/
#news-list {
  display: flex;
  flex-direction: column;
  gap: 2em;
  margin-top: 1em;
}

.news-post {
  display: flex;
  gap: 1.5em;
  align-items: flex-start;
  border-bottom: 1px solid #ccc;
  padding-bottom: 1.5em;
}

.news-post img {
  width: 180px;
  height: auto;
  border-radius: 4px;
}

.news-text h4 {
  margin: 0 0 0.3em 0;
  color: #234073;
}

.news-text .news-date {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 0.5em;
}

.contact h2 {
  color: #234073;
  margin-top: 0;
}

.contact p {
  line-height: 1.6;
}

/*people section*/
.people-grid {
  padding: 0 1em 2.1em;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5em;
  margin-top: 2em;
}

.person-card {
  background: #f8f8f8;
  border-radius: 8px;
  padding: 1em;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  font-size: 0.9em;
}

.person-card .role {
  font-weight: 600;
  color: #646464;
  margin-bottom: 0.5em;
  font-size: 0.9em;
}

.person-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  margin-bottom: 0.8em;
}

.person-card h4 {
  margin: 0.3em 0 0.2em;
  font-size: 1.05rem;
  font-weight: 700;
  color: #234073; 
  line-height: 1.2;
  text-wrap: balance;                  
}

.person-card p {
  font-size: 0.85em;
  color: #333;
  margin: 0.5em 0 0;
}

.person-card:hover {
  background: #eef2fb;
  transform: translateY(-2px);
  transition: 0.2s ease;
}

.toggle-hint {
  font-size: 0.8em;
  color: #666;
  margin-top: 0.4em;
}

.person-card {
  cursor: pointer;
}

/*research section*/
.project-grid {
  padding: 0 1em 2.1em;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.5em;
  margin-top: 2em;
}

.project-card {
  background: #f8f8f8;
  border-radius: 8px;
  padding: 1em;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  font-size: 0.95em;
}

.project-card p {
  font-size: 0.85em;
  color: #333;
  margin: 0.5em 0 0;
}

.project-card:hover {
  background: #eef2fb;
  transform: translateY(-2px);
  transition: 0.2s ease;
}

.toggle-hint {
  font-size: 0.8em;
  color: #666;
  margin-top: 0.4em;
}

.project-card {
  cursor: pointer;
}

/*responsive design*/
@media (max-width: 600px) {
  body {
    font-size: 1em;
    padding: 1em;
  }

  #main-content {
    padding: 1em;
  }

  nav ul li {
    display: block;
    margin: 0.5em 0;
  }
}

/*images*/
.centered-image {
  text-align: center;
  margin: 2em 0;
}
.centered-image img {
  max-width: 100%;
  height: auto;
}

figcaption {
    font-size: 0.9em;
    color: #000000;
    margin-top: 0;
    text-align: center;
}

/*accessibility: skip link*/
.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 1em;
  top: 1em;
  background: #fff;
  color: #000;
  padding: 0.5em;
  border: 2px solid #000;
  z-index: 1000;
}

/*Footer*/
footer {
    margin-top: 2em;
    text-align: center;
    color: #333;
    font-size: 0.96em;
    padding: 1.2em 0;
    background: #eef2fb;
    border-top: 1px solid #0c3483;
}

/* Tabs (shared with People) */
.tabs {
  display: flex; gap: .5rem; margin: 1rem 0 0.5rem;
}
.tab {
  background: #f1f5ff; border: 1px solid #c7d2fe; padding: .5rem .8rem; border-radius: 999px;
  cursor: pointer; font-weight: 600;
}
.tab.active { background: #234073; color: #fff; border-color: #234073; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* News list: keep left column width even without an image */
.news-post {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  border-bottom: 1px solid #ccc;
  padding-bottom: 1.5rem;
}

.news-thumb {
  flex: 0 0 180px;      /* fixed column */
  width: 180px;
  height: 120px;        /* choose a height you like */
  border-radius: 4px;
  object-fit: cover;    /* crops tall/wide images nicely */
  background: #f3f5fb;  /* base bg so loads don’t jump */
}

.news-thumb.placeholder {
  /* border: 1px dashed #f8faff;  /* subtle placeholder */
  background: #ffffff;
}

.news-text h4 {
  margin: 0;
}

@media (max-width: 720px) {
  .news-post { flex-direction: column; }
  .news-thumb {
    width: 100%;
    height: 200px;   /* taller thumb on mobile */
    flex-basis: auto;
  }
}

/* Emphasis for names in news items */
.news-text strong {
  font-weight: 600;        /* slightly less heavy than bold-700 */
  color: #234073;          /* matches your Harvard brand navy */
  background: #f1f5ff;     /* light highlight to make names pop */
  padding: 0 2px;
  border-radius: 3px;
}
/* Contact cards grid */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;          /* space between cards */
  margin-top: 1rem;
}

.contact-card {
  flex: 1 1 280px;      /* grow, shrink, minimum width */
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.contact-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #234073;
  font-weight: 600;
}

.contact-card p {
  margin: 0;
  font-size: 0.95em;
}

.project-pubs {
  margin-top: .5rem;
  font-size: 0.92em;
}
.project-pubs strong {
  color: #234073;
}

/* Publications Harvard-style */
.pubs-year { margin: 2rem 0; }
.pubs-year h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: .6rem;
  color: #000;
}

.pubs-list {
  list-style: disc;
  padding-left: 1.5rem;
}

.pub-entry {
  margin: .5rem 0;
  line-height: 1.6;
  font-size: 1rem;            /* adjust font size */
  font-family: Georgia, "Times New Roman", serif; /* match Harvard style */
}

.pub-authors strong {
  font-weight: 700;
}

.pub-entry em {
  font-style: italic;
}

.pub-links a {
  margin-left: .4rem;
  color: #234073;
  text-decoration: none;
}
.pub-links a:hover {
  text-decoration: underline;
}

/* People cards */

/* Linked names (site= provided) */
.person-card h4 a {
  color: #234073;          
  text-decoration: underline;
}

.person-card h4 a:hover {
  color: #732b11;          /* darker blue on hover */
}

/* slate-ish */
.person-card .role {
  font-size: .8rem;
  font-weight: 600;
  color: #4a5568;                       
  line-height: 1.35;
  text-wrap: balance;
}

/* Make cards visually consistent even when some have no image */
.person-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 6px;
}

/* Turn the dissertation link into a compact tag/button */
.person-card .dissertation a {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  font-size: .75rem;
  text-decoration: none;
}
.person-card .dissertation a:hover {
  background: #f1f5f9;
}
