* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #EEEEEE;
}

a  {
	color: #000;
	font-weight: bold;
}


header {
  background: #000;
  color: white;
  padding: 1rem;
}
nav {
  background: #3E6C4A;
  color: white;
  padding: 1rem;
}
.sticky {
  position: sticky;
  top: 0;
  z-index: 1000;
}
.container {
  display: flex;
  flex: 1;
  flex-direction: row;
}
main {
  flex: 1;
  padding: 1rem;
}
aside {
  background: #3E6C4A;
  color: white;
  padding: 1rem;
  width: 250px;
}
footer {
  background: #000;
  color: white;
  text-align: center;
  padding: 1rem;
}
img {
  width: 90%;
  margin: 1rem;
}

/* Flex Grid System */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.grid-item {
  flex: 1 1 calc(33.333% - 1rem); /* 3 columns by default */
  min-width: 250px;
}

/* Grid variations */
.grid-2 .grid-item {
  flex: 1 1 calc(50% - 1rem); /* 2 columns */
}

.grid-4 .grid-item {
  flex: 1 1 calc(25% - 1rem); /* 4 columns */
}

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

ul.nib-list li {
  padding-left: 1.5em;
  position: relative;
  margin-bottom: 0.5em;
}

ul.nib-list li::before {
  content: "";
  position: absolute;
  left: 0;
  width: 1em;
  height: 1em;
  background-image: url('images/nib.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}


/* Hide nav on desktop */
nav {
  display: none;
}

/* Responsive layout */
@media (max-width: 1240px) {
  .container {
    flex-direction: column;
  }
  aside {
    display: none;
  }
  nav {
    display: block; /* Show nav on mobile */
    position: sticky;
    top: 60px; /* approximate height of header */
  }
}


/* Responsive layout */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  aside {
    display: none;
  }
  nav {
    position: sticky;
    top: 60px; /* approximate height of header */
  }
  
  /* Stack grid on mobile */
  .grid-item {
    flex: 1 1 100%;
  }
}