*, *::before, *::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  background-color: #fffcf3;
  color: #0a0a0a;
  padding: 0;
  margin: 0;
  font-family: 'Assistant', Arial, Helvetica, sans-serif;
  font-size: 16px;
}

a {
  text-decoration: none;
  color: #5277ff;
}

header {
  height: 160px;
  padding: 70px 0 0 0;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background-color: #002060;
  background-image: url(/images/logo_bg.png);
  background-repeat: no-repeat;
  background-size: contain;
  background-position-x: 60%;
}

.header-content {
  max-width: 960px;
  margin: 0 auto;
}

.header-content h1 {
  color: #f8fff8;
  margin: 0;
  font-size: 2em;
}

main {
  padding-bottom: 20px;
}

section {
  padding: 40px 0;
}

section h1, section h2, section p, .content-wrap {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

footer {
  background-color: #000035;
  color: #fff;
  padding: 40px 0;
}

footer p {
  display: block;
  max-width: 840px;
  text-align: center;
  margin: 10px auto;
  position: relative;
}

h1, h3 {
  font-family: 'Besley', 'Playfair Display', 'Times New Roman', serif;
  font-weight: 500;
}

h1 {
  margin: 0;
  font-size: 1.5em;
}

h2 {
  font-size: 16px;
  margin: 0;
}

p {
  line-height: 1.5;
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 20px;
}

.bg-highlight {
  background: #5277ff;
  color: #f8fff8;
}

.bg-highlight h2 {
  color: #96dde8;
}

.text-em {
  color: #5277ff;
}

p .text-em {
  font-weight: 700;
}

.bg-highlight .text-em {
  color: #96dde8;
}

.offset-target {
  display: block;
  width: 0;
  height: 0;
  opacity: 0;
  position: relative;
  top: -160px;
}

.hr {
  margin: 10px 0;
  border-bottom: 1px solid #ddd;
}

.logo-block {
  margin: 0 auto 10px auto;
  text-align: center;
}
.logo {
  display: inline-block;
  width: 100px;
  height: 100px;
}

.nav-items {
  list-style: none;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  max-width: 960px;
  padding: 0;
  margin: 0 auto;
  font-size: 20px;
  font-weight: 500;
}
.nav-items li {
  display: block;
  position: relative;
  padding-bottom: 4px;
  
  margin-right: 40px;
}
.nav-items li::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background-color: #f8fff8;
  transition: height 0.2s ease-out;
}
.nav-items li:hover::after {
  height: 2px;
}
.nav-items a {
  color: #f8fff8;
}

/* bio */
.bio {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  margin-top: 40px;
}

.bio-block {
}

.bio-photo {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #333;
  background-color: #eee;
}

.bio-name {
  font-weight: 500;
  font-size: 24px;
  margin: 0 10px;
}

.bio-links {
  margin: 10px;
}

.bio-text {
  margin: 10px 0;
  font-size: 16px;
}

.content-align-start {
  margin-right: 25%;
}

.content-align-end {
  margin-left: 25%;
}
.content-align-end .bio {
  justify-content: flex-end;
  text-align: right;
}

/* portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 160px);
  justify-content: space-between;
  grid-gap: 20px;
}
.portfolio-grid:not(:last-child) {
  border-bottom: 1px solid #dddddd;
}

.portfolio-item {
  width: 160px;
  text-align: center;
  padding: 20px 0;
}

.portfolio-logo {
  width: 120px;
  height: 120px;
  display: block;
  margin: 0 auto 10px auto;
}
.portfolio-logo img {
  width: 120px;
  height: 120px;
  display: block;
}

.portfolio-details {
  height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.portfolio-desc {
  font-size: 14px;
}

footer p:nth-child(1) {
  left: -270px;
}
footer p:nth-child(2) {
  left: -140px;
}
footer p:nth-child(3) {
  left: 80px;
}
footer p:nth-child(4) {
  padding-top: 40px;
}

@media (max-width: 1000px) {
  section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .content-align-start {
    margin-right: 0;
  }

  .content-align-end {
    margin-left: 0;
  }

  .header-content {
    padding: 0 14px;
  }
}

@media (max-width: 850px) {
  footer p {
    font-size: 14px;
  }
  footer p:nth-child(1) {
    left: -170px;
  }
  footer p:nth-child(2) {
    left: -100px;
  }
  footer p:nth-child(3) {
    left: 60px;
  }

  header {
    background-position-x: 80%;
  }

  h1 {
    font-size: 1.2em;
  }

  p {
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  footer {
    display: none;
  }

  header {
    height: 100px;
    padding-top: 10px;
  }
}

@media (max-width: 400px) {
  header {
    background-position-x: 90%;
  }

  .portfolio-grid {
    grid-gap: 10px;
  }

  .narrow-drop {
    display: none !important;
  }

  .logo {
    width: 50px;
    height: 50px;
  }

  .offset-target {
    top: -110px;
  }
}
