main.home {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  color: var(--primary-color);

  .header {
    display: block;
    background-color: white;
    background-image: var(--gradient-light);
    color: var(--primary-color);
    overflow: auto;
    padding: 0;
    padding-bottom: var(--section-padding-h-normal);
    text-align: center;
    position: relative;

    img {
      height: clamp(4rem, 16vw, 6rem);
      margin-top: var(--section-padding-h-normal);
    }

    h1 {
      font-size: var(--h1-font-size);
      margin-bottom: 0.5rem;
      margin-top: 0;
      white-space: nowrap;
      text-shadow: 0px 0px 12rem rgb(38, 53, 170);
      color: var(--primary-color);
    }

    h1 + span {
      font-weight: 400;
      font-size: 125%;
      line-height: 1.25;
    }
  }

  section.nav {
    display: flex;
    flex-direction: row;
    position: sticky;
    top: 0;
    z-index: 951000;
    order: -1;
    background-color: white;
    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
    align-items: center;
    justify-content: space-between;
    padding-top: 0;
    padding-bottom: 0;

    img {
      height: 2.8rem;
    }

    a {
      align-items: center;
      display: inline-flex;
      gap: 0.6rem;
      justify-content: center;
      text-decoration: none;

      h1 {
        color: var(--primary-color);
      }
    }

    ul {
      list-style: none;
      display: flex;
      flex-direction: row;
      gap: 1.6rem;

      li a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 500;
      }
    }
  }
}

/* Home page nav: color overrides (mechanics are in styles.css) */
@media (max-width: 768px) {
  main.home section.nav {
    .nav-toggle svg line {
      stroke: var(--primary-color);
    }

    nav {
      background-color: white;
      box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);

      li a {
        color: var(--primary-color);
      }
    }
  }
}

.intro {
  background-image: var(--gradient-dark);
  background-size: var(--bg-dark-size);
  color: white;
  font-size: 112.5%;
  font-weight: 325;
  padding-bottom: var(--section-padding-h-normal);

  p {
    width: var(--width);
    margin: 0 auto;
    text-align: center;

    br {
      display: none;
    }

    br.mobile {
      display: initial;
    }
  }
}

.focus {
  --icon-padding: 1rem;
  --icon-margin-right: 1rem;
  --icon-size: 1.6rem;

  background-image: var(--gradient-light);

  ul {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 4vw, 3rem);
    justify-content: space-around;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    width: var(--width);

    li {
      flex: 1;
      padding: 1rem 0;
      padding-top: 0;
      text-align: center;
      padding-bottom: 0;

      svg {
        background-color: white;
        border-radius: 50%;
        box-shadow: 0px 0px 3rem rgba(0, 0, 0, 0.05);
        overflow: visible;
        float: left;
        height: var(--icon-size);
        width: var(--icon-size);
        padding: var(--icon-padding);
        vertical-align: middle;
        margin-right: var(--icon-margin-right);
      }

      svg + h3 {
        text-align: left;
        vertical-align: middle;
        line-height: calc(var(--icon-size) + 2 * var(--icon-padding));
        margin: 0;
        margin-bottom: -0.4rem;
      }

      i.mdi {
        font-size: 8rem;
        font-weight: 100;
        color: var(--primary-color);
      }

      p {
        font-weight: 325;
        filter: contrast(0.5);
        text-align: left;
        margin: 0;
        margin-left: calc(var(--icon-size) + 2 * var(--icon-padding) + var(--icon-margin-right));
      }

      p.focus-link {
        filter: none;
        margin-top: 1rem;
        text-align: center;

        a {
          background-color: var(--primary-color);
          border-radius: 0.4rem;
          box-shadow: 0 0 2rem rgba(38, 53, 170, 0.2);
          color: white;
          display: inline-block;
          font-size: 1.1rem;
          font-weight: 500;
          padding: 0.4rem 1.5rem;
          text-decoration: none;

          &:hover {
            box-shadow: 0 0 2rem rgba(38, 53, 170, 0.4);
            text-decoration: none;
          }

          &:visited {
            color: white;
          }
        }
      }
    }
  }
}

.featured-project {
  background-image: var(--gradient-dark);
  background-size: var(--bg-dark-size);
  color: white;
  overflow-x: hidden;

  h2 {
    color: white;
  }

  & > div {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 0 auto;
    width: var(--width);

    div:first-of-type {
      flex: 1;
      order: 2;
    }

    div:first-of-type + div {
      order: 1;
      flex: 2;
      display: flex;
      flex-direction: column;
    }

    div:last-of-type {
      flex: 3;
      order: 3;
      flex-basis: 100%;
    }
  }

  img {
    filter: drop-shadow(0px 0px 3rem rgba(255, 255, 255, 0.1));
    width: clamp(15rem, 80%, 30rem);
    margin-right: -5rem;
    margin-top: 0.5rem;
    transform: rotate(-5deg);
  }

  ul {
    padding: 0;
    margin: 0;
    font-weight: 325;
    list-style-type: none;
    line-height: 1.5;

    li {
      padding-left: 2rem;
    }
  }

  ul li::before {
    content: '\2022';
    font-size: 1rem;
    line-height: 1.5;
    display: inline-block;
    width: 1rem;
    margin-left: -1rem;
    margin-right: 0;
  }

  p:first-of-type {
    margin-top: 0;
  }

  p:has(a.button) {
    margin-bottom: 0;
    text-align: center;
  }

  a.button {
    background-color: white;
    border-radius: 0.5rem;
    color: var(--primary-color);
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 500;
    padding: 0.5rem 2rem;
    text-decoration: none;
    text-align: center;
    margin: 2rem auto;
    align-self: center;
    box-shadow: 0px 0px 3rem rgba(255, 255, 255, 0.25);
  }
}

@media (min-width: 769px) {
  .header {
    h1 + span {
      font-size: 150%;
    }
  }

  .intro {
    font-size: 133%;

    p br.mobile {
      display: none;
    }
  }
}

@media (min-width: 992px) {
  .featured-project {
    overflow-x: unset;

    & > div {
      div:first-of-type {
        order: 1;
        text-align: center;
      }

      div + div {
        order: 2;
      }
    }

    img {
      margin-right: 0;
      margin-top: 0;
      transform: none;
    }
  }
}

@media (min-width: 1022px) {
  .focus {
    --icon-size: 4rem;
    --icon-padding: 1.5rem;

    ul {
      flex-direction: row;

      li {
        display: flex;
        flex-direction: column;

        svg {
          float: none;
          align-self: center;
        }

        svg + h3 {
          text-align: center;
          line-height: initial;
          margin-top: 2rem;
          margin-bottom: 1rem;
          font-size: clamp(1rem, 2.5vw, var(--h3-font-size));
        }

        p {
          text-align: center;
          margin-left: 0;
        }

        p.focus-link {
          margin-top: auto;
          padding-top: 1rem;
        }
      }
    }
  }

  .featured-project {
    & > div {
      display: grid;
      grid-template-columns: 1fr 2fr;

      div:first-of-type {
        grid-row: 1 / span 2;
      }

      div:last-of-type {
        grid-row: 2;
        grid-column: 2;
      }
    }
  }
}