/* Wider content to reduce side whitespace */

/* Reduce top spacing for main content area */
#main {
  margin-top: -3em;
}

#main article {
  margin-top: -1em;
}

/* Reduce navigation wrapper padding */
.navigation-wrapper {
  padding: 0.2em 0 0.5em !important;
}

/* Reduce author bio top spacing */
.article-author-top {
  margin-bottom: 0.5em !important;
}

/* Reduce site name bottom margin */
.site-name {
  margin-bottom: 0.2em !important;
}

/* Reduce top navigation margin */
.top-navigation {
  margin-bottom: 0.2em !important;
}

.headline-wrap h1 {
  margin-top: 0;
  margin-bottom: 0.5em;
}

/* Override paragraph spacing for publications */
.article-wrap p {
  margin: 0 0 1em !important;
  line-height: 1.6 !important;
}

.article-wrap blockquote p {
  margin: 0 !important;
  line-height: 1.4 !important;
}

/* Reduce top margin for h1 in publications */
.article-wrap h1 {
  margin-top: 0 !important;
  margin-bottom: 0.5em !important;
}

/* Optimize publication page layout */
body.page .article-author-top {
  margin-bottom: 0 !important;
  padding: 0.5em !important;
  margin-top: 0 !important; /* Remove top margin */
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  height: auto !important;
}

body.page #main {
  margin-top: -1em; /* Reduced negative margin to work with moved author info */
  display: flex !important;
  align-items: flex-start !important;
}

/* Adjust main content positioning for better alignment */
body.page #main article {
  margin-top: 0 !important; /* Reset article margin */
  flex: 1 !important;
  align-self: flex-start !important;
  margin-left: 5% !important; /* Further reduce left margin for page layout */
  margin-right: 5% !important;
}

/* Ensure article-wrap starts at the same level as author bio */
body.page .article-wrap {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Align h2 titles with author bio top */
body.page .article-wrap h2 {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Apply similar adjustments to home page and other layouts */
body.home .article-author-top,
body.post .article-author-top {
  margin-top: 0.5em !important; /* Reduced from 1.5em to 0.5em */
  padding-bottom: 1em !important; /* Add bottom padding to extend author bio area */
}

body.home #main,
body.post #main {
  margin-top: -2em; /* Increased negative margin */
}

/* Ensure main content starts at the same level as author bio */
body.home #main article,
body.post #main article {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Adjust main content to align with author bio */
body.home .article-wrap,
body.post .article-wrap {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Ensure h2 titles start at proper level */
body.home .article-wrap h2,
body.post .article-wrap h2 {
  margin-top: 0 !important;
}

/* Reduce author bio photo size and spacing */
.article-author-top .bio-photo {
  width: 80px !important;
  height: 80px !important;
  margin-bottom: 0.5em !important;
}

/* Reduce author bio link spacing */
.article-author-top p {
  margin: 0.2em 0 !important;
  font-size: 0.9em !important;
}

.article-author-top p[style*="margin-top:1.5em"] {
  margin-top: 0.5em !important;
}

/* Make author bio more compact */
.article-author-top {
  width: 120px !important;
  padding: 0.5em !important;
  min-height: 200px !important; /* Ensure minimum height for better alignment */
}

/* Specific adjustments for page layout */
body.page .article-author-top {
  width: 120px !important;
  padding: 0.5em !important;
  min-height: auto !important;
  height: auto !important;
  flex-shrink: 0 !important;
}

/* Base: narrow gutters on small screens */
#main article,
#index,
.related-articles,
.footer-wrap footer {
  display:inline;
  float:left;
  width:92%;
  margin-left:4%;
  margin-right:4%;
}

/* ≥600px (~37.5em): increase content width */
@media only screen and (min-width:37.5em){
  #main article,
  #index,
  .related-articles,
  .footer-wrap footer {
    width:70%;
    margin-left:15%;
    margin-right:15%;
  }
  /* keep article side-by-side with left author sidebar */
  #main article {
    margin-left:15%; /* Reduced from 20% to 15% */
    margin-right:5%;
  }
  
  /* Override main.css for page layout */
  body.page #main article {
    margin-left: 5% !important;
    margin-right: 5% !important;
  }
  
  /* Make author bio even more compact on larger screens */
  .article-author-top {
    width: 100px !important;
    padding: 0.3em !important;
  }
  
  .article-author-top .bio-photo {
    width: 70px !important;
    height: 70px !important;
  }
}

/* ≥1382px (~86.375em): keep it comfortably wide */
@media only screen and (min-width:86.375em){
  #main article,
  #index,
  .related-articles,
  .footer-wrap footer {
    width:72%;
    margin-left:14%;
    margin-right:14%;
  }
  /* align with larger author sidebar geometry at wide screens */
  #main article {
    width:70%;
    margin-left:15%; /* Reduced from 25% to 20% */
    margin-right:0;
  }
  
  /* Further optimize author bio for very wide screens */
  .article-author-top {
    width: 90px !important;
    padding: 0.2em !important;
  }
  
  .article-author-top .bio-photo {
    width: 80px !important;
    height: 80px !important;
  }
  
  .article-author-top p {
    font-size: 0.8em !important;
  }
  
  /* Adjust page layout for very wide screens */
  body.page #main article {
    margin-left: 0% !important;
    margin-right: 0 !important;
  }
}


