@font-face {
  font-family: "a";
  /*中文字体*/
  src: url();
  font-display: swap;
}

@font-face {
  font-family: "b";

  src: url(../fonts/Ubuntu-Regular.ttf);
  font-display: swap;
}

@font-face {
  font-family: "title";
  /*英文字体*/
  src: url(../fonts/Pacifico-Regular.ttf);
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  transition: background-color 0.2s ease;
}

a:hover,
a:link,
a:visited,
a:active,
a:focus {
  text-decoration: none;
  outline: none;
  border: none;
  color: inherit;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* scrollbar */
::-webkit-scrollbar {
  width: 0px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--main_text_color, #000000);
  border-radius: 8px;
  height: 20%;
}

::-webkit-scrollbar-track {
  background-color: var(
    --main_bg_color,
    linear-gradient(50deg, #a2d0ff, #ffffff)
  );
}

body {
  height: 100%;
  min-height: 100vh;
  width: 100%;
  position: relative;
  font-family: "b", "a", sans-serif;
  background: var(--main_bg_color);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  transition: color 0.1s ease;
  color: var(--main_text_color);
}

#mh-loading {
  background: transparent;

  height: 100%;
  width: 100%;
  position: fixed;
  z-index: 999999;
  margin-top: 0px;
  top: 0px;
  pointer-events: none;
  opacity: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

#mh-loading-center {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #472eff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* navbar css */
.navbar {
  position: fixed;
  top: 20px; /* 距离顶部留出间隙，产生悬浮感 */
  left: 50%;
  transform: translateX(-50%); /* 居中 */
  width: 90%; /* 宽度 */
  max-width: 1200px;
  height: 60px;
  z-index: 1000;

  /* 关键：毛玻璃效果 */
  background: rgba(255, 255, 255, 0.2); /* 半透明白色背景 */
  backdrop-filter: blur(10px); /* 背景模糊 */
  -webkit-backdrop-filter: blur(10px);

  /* 关键：边框与圆角 */
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px; /* 大圆角 */
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1); /* 柔和阴影 */
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 30px;
}

/* navbar text */
.gradientText {
  font-weight: bold;
  background: var(--gradient);
  -webkit-background-clip: text;
  color: transparent;
}
/* navbar font size */
.nav-container .gradientText {
  font-size: 20px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 15px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--main_text_color);
  font-size: 15px;
  font-weight: 500;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links a:hover {
  color: var(--purple_text_color); /* 悬停变色 */
  text-shadow: 0 0 10px rgba(116, 123, 255, 0.5);
}

/* navbar theme button */
.theme-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 999;
  background: transparent;
  backdrop-filter: none;
  border-radius: 6px;
  padding: 2px;
  box-shadow: none;
  border: none;
  height: auto;
}

.theme-controls-li {
  display: flex;
  align-items: center;
  margin-left: 10px;
  list-style: none;
}

.theme-controls button#theme-toggle-button {
  padding: 6px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 18px;
  width: auto;
  height: auto;
  color: var(--main_text_color);
  border: 1px solid transparent;
  text-decoration: none;
}

.theme-controls button#theme-toggle-button:hover {
  color: var(--purple_text_color);
  text-shadow: 0 0 10px rgba(116, 123, 255, 0.5);
}

.burger {
  display: none;
  cursor: pointer;
}

.burger div {
  width: 25px;
  height: 3px;
  background-color: var(--main_text_color);
  margin: 5px;
  transition: all 0.3s ease;
}
.toggle .line1 {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
  opacity: 0;
}

.toggle .line3 {
  transform: rotate(45deg) translate(-5px, -6px);
}

.mh-filter {
  position: fixed;
  width: 100%;
  height: 100%;
  background: var(--back_filter_color);
  backdrop-filter: blur(var(--back_filter));
  -webkit-backdrop-filter: blur(var(--back_filter));
  z-index: -99999999;
  transition: all 0.3s ease;
}

.mh-main {
  width: 100%;
  margin: 0 auto;
  transition: transform 0.5s ease;
  max-width: 1150px;
  position: relative;
  display: flex;
  flex-direction: row;
  padding-top: 60px;
}

.mh-left {
  overflow-y: scroll;
  width: 230px;
  height: 100vh;
  display: flex;
  padding: 0 15px;
  position: sticky;
  top: 0;
  left: 0;
  align-items: center;
  flex-direction: column;
}

.mh-left::-webkit-scrollbar {
  display: none;
}

.mh-avatar {
  flex-shrink: 0;
  width: 90%;
  position: relative;
  aspect-ratio: 1/1;
  margin-top: 50px;
  background-size: cover;
  border-radius: 50%;
}

.left-div {
  flex-shrink: 0;
  width: 100%;
  border-radius: 13px;
  margin-top: 15px;
  padding: 20px;
  backdrop-filter: blur(var(--card_filter));
  -webkit-backdrop-filter: blur(var(--card_filter));
  background: var(--item_bg_color);
}

.left-des {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.left-des-item {
  display: flex;
  align-items: center;
  line-height: 20px;
  font-size: 15px;
  margin-bottom: 5px;
  overflow: hidden;
}

.left-des-item i,
.left-des-item svg {
  width: 16px;
  height: 16px;
  fill: var(--fill);
  font-size: 18px;
  margin-right: 10px;
}
.left-tag {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 14px;
}

.left-tag-item {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 28px;
  margin: 0px 5px 5px 0;
  padding: 10px;
  font-size: 13px;
  border-radius: 10px;
  background: var(--left_tag_item);
}

#line {
  width: 100%;
  height: 200px;
  font-size: 13px;
  padding-left: 8px;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
}

#line li {
  list-style: none;
  position: relative;
  padding: 15px 0px 0px 15px;
  border-left: 2px solid #d5d5d5;
  border-radius: 0;
  scroll-snap-align: end;
  color: var(--main_text_color);
}

.focus {
  width: 8px;
  height: 8px;
  border-radius: 22px;
  background-color: rgb(255 255 255);
  border: 2px solid #fff;
  position: absolute;
  left: -5px;
  top: 50%;
}

#line li:first-child .focus:first-child {
  background-color: #aaffcd;
  animation: focus 1.8s ease infinite;
}

#line::-webkit-scrollbar {
  display: none;
}

.mh-right {
  width: calc(100% - 230px);
  display: flex;
  padding: 20px;
  position: relative;
  padding-bottom: 50px;
  flex-direction: column;
}
.welcome {
  font-size: 56px;
  font-weight: 800;
  margin: 16px 0;
  text-align: center;
}

.mh-avatar-wap {
  flex-shrink: 0;
  width: 40%;
  margin-top: 30px;
  position: relative;
  max-width: 200px;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 50%;
  border: 0.5px solid #ffffff;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 800px) {
  .mh-avatar-wap {
    display: none;
  }
}

.tagline {
  font-size: 20px;
  margin-top: 7px;
  text-align: center;
  color: var(--main_text_color);
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.hero-taglines {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gradientText {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200%;
  background-position: 0%;
  font-family: "title";
  animation: backgroundSizeAnimation 10s ease-in-out infinite;
  background-image: var(--gradient);
}

.tagline-label {
  font-size: 18px;
  color: var(--main_text_color);
  opacity: 0.8;
}

.tagline {
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  font-weight: 600;
  text-align: center;
  color: var(--main_text_color);
}

@keyframes backgroundSizeAnimation {
  0% {
    background-position: 100%;
  }

  25% {
    background-position: 50%;
  }

  50% {
    background-position: 0%;
  }

  75% {
    background-position: 50%;
  }

  100% {
    background-position: 100%;
  }
}

.purpleText {
  color: var(--purple_text_color);
  font-weight: 800;
}

.textBackground {
  font-weight: 800;
  background: var(--text_bg_color);
  border-radius: 5px;
  font-size: 17px;
  margin: 0 3px;
  padding: 2px 4px;
}

.iconContainer {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: scroll;
  margin-top: 12px;
}

.iconContainer::-webkit-scrollbar {
  display: none;
}

.iconItem {
  width: 49px;
  height: 43px;
  box-sizing: border-box;
  border-radius: 7px;
  display: flex;
  margin-left: 10px;

  backdrop-filter: blur(var(--card_filter));
  -webkit-backdrop-filter: blur(var(--card_filter));
  background: var(--item_bg_color);
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}
.iconItem i,
.iconItem svg {
  width: 22px;
  height: 22px;
  fill: var(--fill);
  font-size: 22px;
  margin-right: 3px;
}

.iconTip {
  white-space: nowrap;
  display: none;
  color: var(--main_text_color);
}

.iconItem:hover {
  width: 95px;
  transform: translateY(-2px);
  background: var(--item_hover_color);
}

.iconItem:hover .iconTip {
  display: block;
}

.tanChiShe {
  width: 85%;
  max-width: 800px;
  margin: 12px auto;
}

.tanChiShe img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.title {
  display: flex;
  align-items: center;
  font-size: 26px;
  font-weight: 800;
  margin: 20px 0;
  transition: transform 0.4s ease;
}
.title i,
.title svg {
  margin-right: 8px;
  height: 26px;
  width: 26px;
  fill: var(--fill);
}
.title:hover {
  transform: translateY(-5px);
}

.projectList {
  display: flex;
  flex-wrap: wrap;
}

.projectItem {
  margin: 7px;
  display: flex;
  background-color: var(--item_bg_color);
  border-radius: 8px;
  padding: 15px;
  height: 95px;
  width: calc(25% - 15px);
  backdrop-filter: blur(var(--card_filter));
  -webkit-backdrop-filter: blur(var(--card_filter));
  -webkit-backdrop-filter: blur(var(--card_filter));
  -webkit-backdrop-filter: blur(var(--card_filter));
  transition: opacity 0.3s ease, background-color 0.3s ease, border 0.3s ease,
    transform 0.2s ease;
}

.projectItem {
  display: flex;
  background-color: var(--item_bg_color);
  border-radius: 8px;
  padding: 15px;
  height: 100px;
  width: calc(25% - 15px);
  backdrop-filter: blur(var(--card_filter));
  -webkit-backdrop-filter: blur(var(--card_filter));
  transition: opacity 0.5s ease, background-color 0.2s ease, border 0.2s ease,
    transform 0.3s ease;
}

.projectItem:hover {
  box-shadow: 0 8px 16px -4px #2c2d300c;
  transform: translateY(-2px);
}

.projectItem.pressed {
  transform: scale(0.9);
  /* 缩小到原来的0.9倍 */
  background-color: var(--item_hover_color);
}

.projectItem:hover .projectItemLeft {
  width: 100%;
}

.projectItem:hover .projectItemRight {
  width: 0%;
}

.projectItem:hover .projectItemRight img {
  transform: rotate(40deg);
}

.projectItem:hover h1 {
  font-size: 18px;
}

.projectItemLeft p {
  font-size: 12px;
  margin-top: 15px;
  color: var(--item_left_text_color);
}

.projectItemLeft h1 {
  font-weight: normal;
  font-size: 16px;
  margin: 0px;

  transition: font-size 0.4s ease;
  color: var(--item_left_title_color);
}

.projectItemLeft {
  transition: width 0.4s ease;
  height: 100%;
  width: 80%;
}

.projectItemRight {
  overflow: hidden;
  transition: width 0.4s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 20%;
  height: 100%;
}

.projectItemRight img {
  height: 39px;
  width: 39px;
}

.skill {
  padding: 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skill img {
  width: 85%;
  max-width: 960px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.skill #skillWap {
  display: none;
}

footer {
  position: absolute;
  padding: 10px;
  text-align: center;
  width: 100%;
  backdrop-filter: blur(var(--card_filter));
  -webkit-backdrop-filter: blur(var(--card_filter));
  background: var(--item_bg_color);
  color: var(--footer_text_color);
  font-size: 13px;
  bottom: 0;
}

.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.2s ease;
}

.nav-open .nav-backdrop {
  opacity: 1;
  pointer-events: auto;
}


@media (max-width: 1150px) {
  .a {
    width: calc(50% - 20px);
  }
  .projectItem {
    margin: 10px;
  }
  .b {
    width: calc(50% - 20px);
  }
}

@media (max-width: 800px) {
  body {
    background-attachment: scroll;
  }
  .hero-header {
    flex-direction: column;
    gap: 8px;
  }
  .hero-taglines {
    align-items: center;
  }
  .mh-left {
    display: none;
  }

  .burger {
    display: block;
    position: fixed;
    right: 20px;
    top: 26px;
    z-index: 2002;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 70%;
    max-width: 340px;
    background: var(--item_bg_color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    padding: 80px 20px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 2001;
  }

  .nav-links li {
    opacity: 0;
  }

  .nav-active li {
    opacity: 1;
  }
  .theme-controls {
    background: var(--item_bg_color);
    border: 1px solid rgba(0,0,0,0.08);
    padding: 6px 8px;
    border-radius: 12px;
  }
  .theme-controls button#theme-toggle-button {
    font-size: 16px;
  }

  .a .projectItemRight {
    display: none;
  }

  .a .projectItemRight img {
    display: none;
  }

  .a .projectItemLeft {
    width: 100%;
  }

  .a {
    width: calc(50% - 18px);
    margin: 9px;
  }

  .b {
    height: 110px;
    margin: 8px 15px;
    width: calc(100% - 30px);
  }

  .mh-right {
    width: 100%;
  }

  .tanChiShe {
    width: 100%;
  }

  .tagline {
    font-size: 4vw;
  }

  .welcome {
    font-size: 10vw;
    margin: 2vw 0;
  }
  .iconContainer {
    margin-top: 3vw;
  }
  .projectItem {
    padding: 10px;
  }
  .projectItemLeft p {
    font-size: 13px;
  }

  .projectItemLeft h1 {
    font-size: 18px;
  }

  .projectItem:hover h1 {
    font-size: 20px;
  }

  .skill #skillWap {
    display: block;
  }

  .skill #skillPc {
    display: none;
  }
  .skill img {
    width: 92%;
    max-width: 360px;
  }
}

.tc {
  position: fixed;

  display: flex;
  visibility: hidden;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(20, 20, 20, 0.5);
  z-index: 99999;
  align-items: center;
  top: 0;
  justify-content: center;
  flex-direction: column;
}

.tc-main {
  z-index: 100000;

  width: 80%;
  max-width: 800px;
  min-height: 500px;
  background-color: #ffffff;
  border-radius: 15px;

  display: flex;
  transition: transform 0.2s linear;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform: translateY(30%) scale(0.5);
}

.tc-img {
  width: 100%;
  height: 100%;
}

.tc.active {
  visibility: visible;
}

.tc-main.active {
  transform: translateY(0) scale(1);
}

.nav-active {
  transform: translateX(0%) !important;
}

@keyframes navLinkFade {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0px);
  }
}
