/* Basic layout classes */
  /* Stack */
    .stack-xxs > * + * { margin-top: var(--space-xxs); }
    .stack-xs  > * + * { margin-top: var(--space-xs); }
    .stack-sm  > * + * { margin-top: var(--space-sm); }
    .stack-md  > * + * { margin-top: var(--space-md); }
    .stack-lg  > * + * { margin-top: var(--space-lg); }
    .stack-xl  > * + * { margin-top: var(--space-xl); }
    .stack-2xl > * + * { margin-top: var(--space-2xl); }
    .stack-3xl > * + * { margin-top: var(--space-3xl); }
    .stack-4xl > * + * { margin-top: var(--space-4xl); }


.homepage .content {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center; /* center the intro + list block */
}

@media (max-width: 752px) {
  /* Add 80px top margin to homepage content when nav stacks */
  .homepage .content {
    margin-top: 0;
  }
}



/* Page container: sits to the right of fixed nav with specified thumbnail container padding
   Nav occupies 180px at left; thumbnail container has 8px left, 160px top, 180px right padding. */
.work-projects-responsive {
    /* make the page container take the space to the right of the fixed nav
      so inner content can be centered without overlapping the nav */
    width: calc(100% - 239px);
    max-width: none; /* allow the container to span the available area to the right of the nav */
    margin-left: 239px; /* sit directly right of the nav */
    box-sizing: border-box;
}

@media (max-width: 752px) {
  .work-projects-responsive {
    margin-left: 0;
    width: 100%; /* fill the viewport width when stacked */
    max-width: none;
    --page-container-top-padding: 48px;
    padding-top: 0;
    box-sizing: border-box;
  }
}

@media (max-width: 1199px) {
  .work-projects-responsive {
    --page-container-top-padding: 30px;
  }
}

@media (min-width: 753px) {
  /* When nav is fixed/desktop, ensure projects content starts 40px from top */
  body.projects .work-projects-responsive {
    padding-top: 48px !important;
    max-width: none;
  }
}

@media (min-width: 1200px) {
  .work-projects-responsive {
    --page-container-top-padding: 30px;
    max-width: 1520px;
  }
}

/* Content container for about and fun pages with nav offset */
.content-page-with-nav-offset {
    width: calc(100% - 180px);
    max-width: none;
    margin-left: 180px;
    padding: var(--page-container-top-padding) 48px 30px 48px;
    box-sizing: border-box;
}

@media (max-width: 752px) {
  .content-page-with-nav-offset {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    padding: 0 20px 48px 20px !important;
    box-sizing: border-box;
    overflow-x: hidden;
  }
}

@media (max-width: 1199px) {
  .content-page-with-nav-offset {
    --page-container-top-padding: 30px;
    padding: var(--page-container-top-padding) 48px 30px 48px;
  }
}

@media (min-width: 1200px) {
  .content-page-with-nav-offset {
    --page-container-top-padding: 30px;
    max-width: 1520px;
    padding: var(--page-container-top-padding) 140px 30px 140px;
  }
}

/* Homepage: vertically center page content */
.homepage.page-container {
  padding-top: 80px !important; /* let inner container center vertically */
  padding-bottom: 0 !important;
  padding-left: 180px !important; /* account for fixed nav */
  min-height: 100%;
  height: 100%;
  display: flex;
  align-items: center; /* vertical center */
  justify-content: center; /* center content horizontally within the container area */
  box-sizing: border-box;
  max-width: none;
}

@media (max-width: 752px) {
  .homepage.page-container {
    min-height: auto !important;
    height: auto !important;
    display: block !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    box-sizing: border-box;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 424px !important;
    padding-top: 24px !important;
    padding-bottom: 40px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* Set page container padding for about and fun pages */
.about .content-page-with-nav-offset,
.fun .content-page-with-nav-offset {
  padding: 48px 0 !important;
  max-width: none;
}

@media (max-width: 752px) {
  .about .content-page-with-nav-offset {
    padding: 24px 20px 48px 20px !important;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  .fun .content-page-with-nav-offset {
    padding: 48px 20px 48px 20px !important;
  }
}
