/* default */
html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  color: white;
  font-family: "Open Sans";
  background-color: #111222;
  font-weight: lighter;
}

/* default end */

/* particle start */
/* particle的容器 */
#particles-js {
  background: #111222;
  width: 100%;
  min-height: 100vh;
  background-attachment: fixed;
}
/* 这是particle */
#particles-js .particles-js-canvas-el {
  width: 100% !important;
  height: 40rem !important;
}
/* particle end */

/* nav bar start */

/* 父级要有定位参照 */
.navbar-wrapper {
  position: absolute;
  top: 10px;

  /* nav-bar在整个页面上居中 */
  left: 50%;
  transform: translateX(-50%);

  /* 整个nav-bar的宽度 */
  width: 70%;

  /* nav container里的元素 包括每个nav和我的portfolio logo不允许换行 */
  white-space: nowrap;
  /* 强制单行显示 */
}

.navbar-nav {
  display: flex;

  /* 左右两端分布 */
  width: 100%;
  /* 占页面 90% 宽度，可根据视觉微调 */

  margin: 0 auto;
  /* 居中整个菜单块 */
}

/* 
/* 左组占左半，右组占右半 */
.navbar-nav.me-auto,
.navbar-nav.ms-auto {
  gap: 2rem;
  /* 菜单项之间的间距，按需改 */
}

/* 右 */
.navbar-nav.ms-auto {
  justify-content: flex-end;
}

/* 左 */
.navbar-nav.me-auto {
  position: relative;
  flex-wrap: nowrap;
  right: 2rem;
}

/* xiaotong's portfolio的主标题 */
#portfolio-logo {
  margin-top: 10px;
  position: absolute;
  display: inline-block;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  text-decoration: none;
  font-size: clamp(25px, 2.2vw, 35px);
  font-family: "Open Sans Condensed", sans-serif;
  color: white;
  letter-spacing: 5px;
  /* nav container里的元素 包括每个nav和我的portfolio logo不允许换行 */
  white-space: nowrap;
  /* 强制单行显示 */
}

/* nav和主页上的字 */
.nav-item,
.header-p {
  margin-right: 30px;
  box-sizing: border-box;
  text-decoration: none;
  height: 40px;
  margin-top: 10px;
  color: #afb0c0;
  font-size: 12px;
  font-family: "Open Sans";
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 50px;
}

.nav-link:hover:not(.active) {
  padding-bottom: 1px;
  border-bottom-color: #74be35;
  border-bottom-style: solid;
  border-bottom-width: 1px;
  width: fit-content;
}

/* nav bar end  */
/* header start */
.header {
  display: block;
  z-index: 1;
  text-align: center;
  color: #fff;
  position: absolute;
  font-family: "Rubik", sans-serif;
  width: 80%;
  top: 50%;
  left: 50%;
  margin: 0 auto;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

.header-h1 {
  font-family: "Open Sans";
  font-weight: lighter;
  line-height: 48px;
  font-size: clamp(10px, 2vw, 34px);
  letter-spacing: 30px;
  font-size: 54px;
  position: relative;
  top: 93px;
}

/* front-end/backend */
.select-button {
  position: relative;
  top: 110px;
  margin-top: 60px;
  right: 49px;
  margin-left: 70px;
  width: 330px;
}

/* project-list */
#middle-col {
  font-size: 14px;
  line-height: 24px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#last-col {
  font-family: "Rubik", sans-serif;
  opacity: 0.75;
  font-size: 16px;
  color: white;
  letter-spacing: 0.1px;
  line-height: 20px;
  font-weight: lighter;
}

.visit-button {
  color: yellow;
  text-decoration: none;
}

.visit-button:hover:not(.active) {
  color: #74be35;
  padding-bottom: 1px;
  border-bottom-color: #74be35;
  border-bottom-style: solid;
  border-bottom-width: 1px;
  width: fit-content;
}

.skill-section {
  display: block;
  z-index: 1;
  text-align: center;
  color: #fff;
  position: absolute;
  width: 80%;
  top: 60%;
  left: 50%;
  margin: 0 auto;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

#myName {
  font-family: "Merriweather", serif;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
  font-size: 2.5rem;
  text-align: left;
}

#introduce {
  text-align: left;
  line-height: 2rem;
}

.icon-li {
  display: inline-block;
  border-radius: 50%;
  border: 2px solid white;
  transition: all 0.7s;
  margin-right: 20px;
}

.icon {
  font-size: 25px;
  padding: 10px;
  color: white;
}

.icon-li:hover:not(.active) {
  border: 2px solid white;
  background-color: white;
}

.icon:hover:not(.active) {
  color: #111222;
}

.language-li {
  text-align: left;
}

.skill-h4 {
  text-align: left;
  margin-bottom: 30px;
  position: relative;
  left: 10px;
}

.header .split-toggle {
  position: relative;
  top: 137px;
  right: 2rem;

  display: inline-flex;
  /* 用 flex 包裹箭头 */
  align-items: center;
  /* 垂直方向居中 */
  vertical-align: center;
  /* 保证和左侧 Front-End / Back-End 对齐 */
  line-height: 1.2;
}

/* 让右侧小按钮和左侧大按钮高度更一致（可按需要微调） */
.header .split-toggle {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

/* mobile's media */
@media (max-width: 575.98px) {
  /* 若需要：确保纵向展开 */
  .navbar-collapse {
    width: 100%;
    text-align: left;
    position: relative;
    right: 2rem;
    margin-top: 10px;
    background: #111222;
    opacity: 1 !important;
    mix-blend-mode: normal !important; /* 防止混合模式导致“透视” */
    backdrop-filter: none; /* 防止毛玻璃看见底部 */
    z-index: 2000 !important;
  }

  .navbar-wrapper {
    left: 50px;
    transform: none; /* 关掉 translateX(-50%) */
    width: 70%; /* 让导航占满屏 */
    z-index: 1000; /* 可留作备用，主要由 collapse 的 9999 兜底 */
  }

  .navbar-nav {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  /* 打开时同样保持定位（Bootstrap 会加 .show） */
  #navbarSupportedContent.collapse.show {
    display: block; /* 由 Bootstrap 控制，也补一层兜底 */
  }

  .navbar-nav.me-auto {
    position: relative;
    flex-wrap: nowrap;
    right: 0em;
  }

  /* ★ 这两个就是控制 toggle 里“垂直间距”的关键 */
  .navbar-nav .nav-item {
    margin: 10px 0;
  }
  .navbar-nav .nav-link {
    padding: 5px 0;
    line-height: 1.2;
  } /* 单项内部上下留白 */

  .navbar-toggler {
    position: relative;
    right: 3rem;
  }

  /* index页 xiaotong's portfolio的主标题 */
  .index #portfolio-logo {
    left: 50%;
    margin-top: 270px;
    /* nav container里的元素 包括每个nav和我的portfolio logo不允许换行 */
    white-space: nowrap;
    /* 强制单行显示 */
  }

  /* 其他页xiaotong's portfolio的主标题  */
  #portfolio-logo {
    left: 63%;
    top: 0px;
  }

  .header-h1 {
    white-space: nowrap;
    font-family: "Open Sans";
    font-weight: lighter;
    line-height: 10px;
    font-size: 35px;
    letter-spacing: 10px;

    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -73px;
  }

  .data-analytics .header-h1 {
    font-size: 30px;
  }
  .fullstack .select-button {
    position: relative;
    top: -10px;
    margin-top: 30px;
    right: 49px;
    margin-left: 70px;
    width: 230px;
    padding: 13px 13px;
  }

  .fullstack .split-toggle {
    position: relative;
    top: 2px;
    right: 2rem;

    display: inline-flex;
    /* 用 flex 包裹箭头 */
    align-items: center;
    /* 垂直方向居中 */
    vertical-align: center;
    /* 保证和左侧 Front-End / Back-End 对齐 */
    line-height: 1.2;
  }

  .skill-section {
    display: block;

    text-align: center;
    color: #fff;
    position: absolute;
    width: 80%;
    top: 85%;

    left: 50%;
    margin: 0 auto;
  }
}
