.topnav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: white;
  border-bottom: 1px solid #e5e5e5;
  z-index: 999;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding-left: calc((100vw - 960px) / 2);
  padding-right: calc((100vw - 960px) / 2);
}

/* 只作用于logo链接 */
.topnav > a:first-child {
  display: flex;
  align-items: center;
  margin: 0;
}

.topnav img {
  height: 42px;
  width: auto;
  display: block;
}

.topnav #myLinks {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
}

.topnav a.normal {
  color: #333;
  text-decoration: none;
  font-size: 16px;
  line-height: 1;
  padding: 8px 0;
}

.topnav a.normal:hover {
  color: black;
}

.wrapper {
  margin-top: 95px;
}

/* 默认隐藏汉堡按钮 */
.topnav a.icon {
  display: none;
}


/* ========================= */
/* 手机窄屏版本 */
/* ========================= */

@media print, screen and (max-width: 960px) {

  .topnav {
    padding-left: 20px;
    padding-right: 20px;
    justify-content: flex-start;
  }

  .topnav img {
    height: 36px;
  }

  .topnav #myLinks {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-in-out;

    position: absolute;
    top: 70px;
    left: 0;
    right: 0;

    background: white;
    padding: 0 20px;
    box-sizing: border-box;
  }

  .topnav #myLinks.open {
    max-height: 400px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .topnav a.normal,
  .topnav a.normal.right {
    display: block;
    width: 100%;
    padding: 12px 0;
    margin: 0;
  }

  .topnav a.icon {
    display: block;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);

    color: #333;
    text-decoration: none;
    font-size: 18px;
    margin: 0;
    line-height: 1;
  }

  .topnav a.icon .icon-wrap {
    position: relative;
    display: inline-block;
    width: 1em;
    height: 1em;
  }

  .topnav a.icon .icon-bars,
  .topnav a.icon .icon-xmark {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .topnav a.icon .icon-bars {
    opacity: 1;
    transform: rotate(0deg);
  }

  .topnav a.icon .icon-xmark {
    opacity: 0;
    transform: rotate(-90deg);
  }

  .topnav a.icon.active .icon-bars {
    opacity: 0;
    transform: rotate(90deg);
  }

  .topnav a.icon.active .icon-xmark {
    opacity: 1;
    transform: rotate(0deg);
  }

  /* 防止头像被navbar挡住 */
  .wrapper {
    margin-top: 120px;
  }

}
