body {
  background-color: black;
  color: #2a2a2a;
  font-family: "Roboto", sans-serif;
  margin: 0;
  padding: 0;
  border: 0;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  background-color: #000000;
}

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

nav a,
nav a:visited {
  display: inline-block;
  padding: 1vh 2vw;
  text-decoration: none;
  color: #999999;
  font-size: 20px;
}

nav ul li:hover {
  background-color: white;
}

nav ul li:hover a {
  color: black;
}

header {
  background: black;
  background-image: var(--bannerImage);
  background-size: contain;
  background-position: center;
  background-position-y: center;
  background-repeat: no-repeat;
  height: 35vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

header span {
  background-color: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: xx-large;
  font-family: "Roboto", sans-serif;
}

@media (max-width: 1400px) {
  header {
    background-size: cover;
    background-position: center;
  }
}

@media (max-width: 800px) {
  header {
    height: 30vh;
  }
  
  header span {
    font-size: large;
  }
}

@media (max-width: 315px) {
  header {
    display: none;
  }
}

.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .flow {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
  }
}

.twoColumn {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-evenly;
}

.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .flow {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
  }
}

/* Modern responsive layout system */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Legacy support for existing classes */
.tightlyCentered {
  max-width: 400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.twoColumn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .container,
  .container-narrow,
  .container-wide {
    padding: 0 1.5rem;
  }
  
  .twoColumn {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .tightlyCentered {
    padding: 0 1rem;
  }
  
  main {
    padding-top: 2vh;
    padding-bottom: 4vh;
  }
  
  #content {
    padding: 2rem;
    margin: 0 1rem;
    border-radius: 4px;
  }
}

.lead {
  max-width: 100% !important;
  font-size: 1.25rem;
  font-weight: 300;
  margin: 0 auto;
  text-align: center;
}

main {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 3vh;
  padding-bottom: 8vh;
  background-color: #e8e8e8;
  min-height: 60vh;
}

/* Updated content container for consistency */
#content {
  width: 100%;
  max-width: 1000px;
  padding: 3rem;
  margin: 0 auto;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  position: relative;
}

/* Single column content (like blog posts, about page) - using wider layout for better readability */

#content.single-column {
  max-width: 1200px;
}

/* Two column content (like homepage, blog index) */
#content.two-column {
  max-width: 1200px;
}

/* Responsive typography - optimized for readability */
main #content p {
  line-height: 1.6;
}

/* Apply max-width only to single-column content for optimal reading */
main #content.single-column p {
  max-width: 700px;
}

/* Allow wider content for specific elements and layouts */
main #content .lead,
main #content .flow,
main #content .twoColumn,
main #content .blog-index {
  max-width: 100%;
}

/* Allow full width for content within two-column layouts */
main #content .twoColumn p,
main #content .twoColumn ul,
main #content .twoColumn ol,
main #content .flow p,
main #content .flow ul,
main #content .flow ol {
  max-width: 100%;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  background-color: #000000;
  color: #999999;
  padding-top: 2vh;
}

footer ul {
  padding: 0;
  list-style-type: none;
}

footer span {
  color: #999999;
  font-size: medium;
  padding-top: 1vh;
}

#offsite-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

#offsite-links div {
  padding-left: 3vw;
  padding-right: 3vw;
}

#offsite-links a,
footer a:visited {
  display: inline-block;
  text-decoration: none;
  color: #999999;
}

#offsite-links ul li:hover {
  background-color: white;
}

#offsite-links ul li:hover a {
  color: black;
}

main h1,
main h2,
main h3 {
  font-size: xx-large;
  padding-top: 1vh;
  padding-bottom: 1vh;
  color: black;
}

main h4 {
  font-size: x-large;
  color: black;
}

hr {
  height: 1px;
  border: 0;
  background-color: rgba(0, 0, 0, 0.6);
}

a,
a:visited {
  color: #2c4477;
  text-decoration: none;
}

a,
a:hover {
  text-decoration: none;
  color: #2c4477;
}

.blog-entry-content {
  overflow: hidden;
  max-width: 100%;
  line-height: 1.6;
  font-size: 16px;
}

.blog-post-on-index,
.post {
  padding-bottom: 4vh;
  max-width: 680px;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e5e5;
}

.blog-post-on-index:last-child {
  border-bottom: none;
}

.blog-post-on-index h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.3;
}

.blog-post-on-index h2 a {
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.blog-post-on-index h2 a:hover {
  border-bottom-color: #666666;
}

.blog-post-on-index small {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: block;
}

.blog-post-on-index p,
.post p {
  padding-bottom: 1vh;
  color: #2a2a2a;
  line-height: 1.6;
}

/* Blog layout improvements */
.blog-index {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.blog-index-entries {
  max-width: 100%;
  min-width: 0; /* Prevents grid overflow */
}

.recent-post-links {
  padding: 2rem;
  background-color: #fafafa;
  border-radius: 8px;
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.recent-post-links h3 {
  margin-top: 0;
  color: #1a1a1a;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.recent-post-links ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.recent-post-links ul li {
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.recent-post-links ul li:last-child {
  border-bottom: none;
}

.recent-post-links a {
  color: #2c4477;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
  display: block;
}

.recent-post-links a:hover {
  text-decoration: underline;
}

/* All blog posts page - tabular layout */
.all-posts-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: #2c4477;
}

.all-posts-table {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 3rem auto;
}

.all-posts-link {
    color: #2c4477;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}


@media (max-width: 600px) {
  .all-posts-table th, .all-posts-table td {
    padding: 0.5rem 0.5rem;
    font-size: 0.95rem;
  }
  .all-posts-title {
    font-size: 1.3rem;
  }
}
@media (max-width: 900px) {
  .blog-index {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .recent-post-links {
    position: static;
    order: -1; /* Move sidebar above content on mobile */
  }
}

.all-posts-table th, .all-posts-table td {
  padding: 0.75rem 1rem;
  text-align: left;
}
.all-posts-table th {
  background: #e8e8e8;
  color: #2c4477;
  font-size: 1.05rem;
  font-weight: 600;
  border-bottom: 2px solid #e5e5e5;
}
.all-posts-table td {
  font-size: 1rem;
  border-bottom: 1px solid #e5e5e5;
}
.all-posts-table tr:last-child td {
  border-bottom: none;
}
.all-posts-date {
  color: #666;
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .all-posts-table th, .all-posts-table td {
    padding: 0.5rem 0.5rem;
    font-size: 0.95rem;
  }
  .all-posts-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 900px) {
  .blog-index {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .recent-post-links {
    position: static;
    order: -1; /* Move sidebar above content on mobile */
  }
/* End of media queries and file */
}