:root {
  --primary-color: #275d8c;
  --seconde-color: #e8eff5;
  --text-color: #25364a;
  --muted-color: #66758a;
  --border-color: #dce3ea;
  --surface-color: #ffffff;
  --sidebar-color: #18344f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-color);
  background: #f3f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

.shell {
  width: 100%;
  min-height: 100vh;
  display: block;
  position: relative;
  isolation: isolate;
  overflow: visible;
  background: #f3f5f7;
}

.aside{
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 30%;
  height: 100vh;
  color: #edf3f8;
  background: var(--sidebar-color);
  border-right: 1px solid #294964;
  padding-left: 50px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  &::before {
    content: "ACADEMIC PORTFOLIO";
    position: absolute;
    top: 24px;
    right: 28px;
    left: 50px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(200, 219, 233, 0.2);
    color: #a9c0d3;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.2em;
  }
  .avatar {
    width: 100%;
    height: 25%;
    margin-top: 50px;

    display: flex;
    justify-content: center;
    align-items: end;
    .avatar_img {
      height: 130px;
      width: 112px;
      border: 1px solid rgba(255, 255, 255, 0.45);
      border-radius: 2px;
      margin-bottom: 30px;
      background-image: url("/img/avatar.jpg");
      background-size: cover;
      outline: 1px solid rgba(190, 211, 226, 0.2);
      outline-offset: 5px;
    }
  }
  .base_info {
    width: 100%;
    height: auto;
    min-height: 25%;
    padding: 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    .info_card {
      height: auto;
      min-height: 70%;
      width: 84%;
      position: relative;
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 2px;
      background-color: #1b3a56;
      box-shadow: inset 3px 0 0 #6f91ac;
      display: flex;
      justify-content: space-between;
      flex-direction: column;
      gap: 5px;
      padding: 34px 12px 12px;
      &::before {
        position: absolute;
        top: 11px;
        right: 12px;
        left: 12px;
        padding-bottom: 7px;
        border-bottom: 1px solid rgba(200, 219, 233, 0.16);
        color: #a9c0d3;
        content: "PROFILE";
        font-size: 9px;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 0.16em;
      }
      .info {
        font-size: 0.92rem;
        line-height: 1.4;
        width: 100%;
        display: grid;
        grid-template-columns: 5em minmax(0, 1fr);
        gap: 8px;
      }
      .label {
        text-align: right;
        white-space: nowrap;
      }
      .value {
        min-width: 0;
        text-align: left;
        overflow-wrap: anywhere;
      }
      a {
        text-decoration: none;
        color: #eef5fb;
        &:hover {
          color: rgb(118, 202, 231);
        }
      }
    }
  }
  .skill_labels {
    width: 100%;
    height: auto;
    min-height: 15%;
    padding: 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    .label_card {
      height: auto;
      min-height: 70%;
      width: 84%;
      position: relative;
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 2px;
      background-color: #1b3a56;
      box-shadow: inset 3px 0 0 #6f91ac;
      padding-top: 31px;
      &::before {
        position: absolute;
        top: 10px;
        right: 12px;
        left: 12px;
        padding-bottom: 7px;
        border-bottom: 1px solid rgba(200, 219, 233, 0.16);
        color: #a9c0d3;
        content: "RESEARCH INTERESTS";
        font-size: 9px;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 0.14em;
      }
      ul {
        margin: 0;
        padding: 9px 10px 8px;
        list-style: none;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        li {
          padding: 3px 5px;
          border-radius: 2px;
          font-size: 0.86rem;
          line-height: 1.35;
          color: #dbe8f2;
          background: #254661;
          display: flex;
          align-items: center;
          gap: 5px;
        }
      }
    }
  }
  .history {
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: start;
    .history_card {
      flex: 0 0 auto;
      margin-top: 10px;
      height: calc(100% - 10px);
      min-height: 140px;
      width: 84%;
      max-width: 90%;
      position: relative;
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 2px;
      background-color: #1b3a56;
      box-shadow: inset 3px 0 0 #6f91ac;
      overflow: hidden;
      &::before {
        position: absolute;
        top: 10px;
        right: 12px;
        left: 12px;
        padding-bottom: 7px;
        border-bottom: 1px solid rgba(200, 219, 233, 0.16);
        color: #a9c0d3;
        content: "RECENT UPDATES";
        font-size: 9px;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 0.14em;
      }
      ul {
        position: relative;
        height: calc(100% - 30px);
        margin: 30px 0 0;
        padding: 8px 8px 6px 20px;
        list-style: none;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
        scrollbar-width: thin;
      }
      li {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-height: 54px;
        padding: 0 0 10px 20px;
      }
      li:not(:last-child)::before {
        content: "";
        position: absolute;
        top: 10px;
        bottom: 0;
        left: -1px;
        width: 2px;
        background: rgba(202, 220, 235, 0.36);
      }
      li::after {
        content: "";
        position: absolute;
        top: 3px;
        left: -6px;
        width: 10px;
        height: 10px;
        border: 2px solid var(--sidebar-color);
        border-radius: 50%;
        background: #9fc1db;
      }
      .history_content {
        font-weight: 600;
      }
      time {
        font-size: 0.85em;
      }
    }
  }
}

.main {
  width: 70%;
  margin-left: 30%;
  min-height: 100vh;
  color: var(--text-color);
  background: var(--surface-color);
  display: flex;
  flex-direction: column;
  .name {
    width: 100%;
    flex: 0 0 230px;
    height: 230px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0 5% 24px;
    overflow: visible;
    color: #1b3450;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    .name_content {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }
    .name_english {
      height: auto;
      line-height: 1.2;
      display: flex;
      align-items: center;
      gap: 12px;
      font-family: "Segoe UI", Tahoma, sans-serif;
      font-size: clamp(2rem, 5vw, 4.5rem);
      font-weight: 700;
      letter-spacing: 1px;
      white-space: nowrap;
    }
    .name_chinese {
      margin-top: 4px;
      font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
      font-size: clamp(1rem, 2vw, 1.5rem);
      font-weight: 400;
      letter-spacing: 2px;
      color: #627287;
    }
    .name_signature {
      display: inline-block;
      line-height: 1.25;
      font-family: "Pacifico", cursive;
      font-size: 1.08em;
      font-weight: 300;
      letter-spacing: 0;
      color: transparent;
      background: linear-gradient(120deg, #42d9ff, #1688ff 55%, #625cff);
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      text-shadow: 0 5px 18px rgba(20, 159, 255, 0.3);
      padding: 0.12em 0.1em 0.34em;
      margin: -0.12em -0.1em -0.34em;
      transform: rotate(-3deg);
      transform-origin: left center;
    }
  }
  .describe {
    width: 100%;
    flex: 0 0 375px;
    height: 375px;
    min-height: 375px;
    display: flex;
    flex-direction: column;
    overflow: auto;
    .content {
      flex: none;
      display: block;
      width: 100%;
      padding: 0 5%;
      .self-introduce{
        display: flex;
        flex-direction: column;
        padding-left: 10px;
        >span {
        display: block;
        max-width: 900px;
        margin: 0 0 10px 0;
        color: #34465a;
        font-size: 1.03em;
        line-height: 1.82;
        letter-spacing: 0.005em;
        white-space: pre-line;
        overflow-wrap: anywhere;
      }
      }
    }
    .connect{
      margin-top: 22px;
      display: flex;
      gap: 15px;
      margin-left: 20px;
      div{
        position: relative;
        height: 42px;
        width: 42px;
        border: 1px solid #d7dfe7;
        border-radius: 4px;
        background: #f5f7f9;
        transition: border-color 0.15s ease, background-color 0.15s ease;
        &:hover {
          border-color: #8fa9c1;
          background: #eef3f7;
        }
        a {
          position: absolute;
          inset: 0;
          display: block;
          border-radius: inherit;
        }

        &.github{
          background-size: cover;
          background-image: url("./img/github-line.png");
          &:hover{
            background-size: cover;
            background-image: url("./img/github-fill.png");
          }
        }
        &.csdn{
          background-size: cover;
          background-image: url("./img/markdown-line.png");
          &:hover{
            background-size: cover;
            background-image: url("./img/markdown-fill.png");
          }
        }
        &.vx{
          background-size: cover;
          background-image: url("./img/wechat-line.png");
          &:hover{
            background-size: cover;
            background-image: url("./img/wechat-fill.png");
          }
        }
      }
    }
  }
  .fire {
    width: 100%;
    min-height: 20%;
    height: auto;
    padding: 14px 0 20px;
  }
  .content {
    flex: none;
    min-height: 0;
    display: flex;
    flex-direction: column;
    .learning {
      min-height: 500px;
      height: auto;
      display: flex;
      align-items: stretch;
      height: max-content;
      border-top: 1px solid var(--border-color);
      border-bottom: 1px solid var(--border-color);
      .eduction {
        width: 50%;
        height: auto;
        align-self: stretch;
        padding: 24px 28px;
        color: var(--text-color);
        border-right: 1px solid var(--border-color);
        h2 {
          margin: 0 0 24px;
          padding-bottom: 8px;
          border-bottom: 1px solid #cfd8e2;
          color: #173a5e;
          font-family: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
          font-size: clamp(1.3rem, 1.8vw, 1.65rem);
          font-weight: 600;
        }
        .education_timeline {
          position: relative;
          padding-left: 28px;
          &::before {
            content: "";
            position: absolute;
            top: 8px;
            bottom: 8px;
            left: 5px;
            width: 2px;
            background: #d7e0e9;
          }
        }
        .education_item {
          position: relative;
          padding: 0 0 28px 22px;
          &::before {
            content: "";
            position: absolute;
            top: 5px;
            left: -28px;
            width: 10px;
            height: 10px;
            width: 11px;
            height: 11px;
            border: 2px solid #ffffff;
            border-radius: 50%;
            outline: 1px solid #8ba8c2;
            background: #3c6f9e;
          }
          &:last-child {
            padding-bottom: 0;
          }
        }
        .education_header {
          display: flex;
          align-items: baseline;
          justify-content: space-between;
          gap: 16px;
          h3 {
            margin: 0 0 8px;
            font-size: clamp(1.15rem, 1.8vw, 1.45rem);
            color: #1c3856;
          }
          time {
            flex: 0 0 auto;
            color: var(--muted-color);
            font-size: 0.9rem;
          }
        }
        strong {
          display: block;
          margin-bottom: 12px;
          color: #314d69;
        }
        p {
          margin: 8px 0;
          line-height: 1.7;
          color: #44566a;
        }
        .gpa {
          display: inline-block;
          padding: 4px 10px;
          border: 1px solid #cad8e5;
          border-radius: 3px;
          color: #315a7e;
          background: #f4f7fa;
        }
        h4 {
          margin: 18px 0 8px;
          padding-bottom: 8px;
          border-bottom: 1px solid #dfe5eb;
          color: #294762;
          font-size: 1.05rem;
        }
        .honors {
          display: flex;
          flex-direction: column;
          gap: 8px;
          margin: 0;
          padding: 0;
          list-style: none;
          li {
            display: flex;
            justify-content: space-between;
            gap: 16px;
            line-height: 1.5;
            color: #46596d;
            time {
              flex: 0 0 auto;
              color: #647a90;
            }
          }
        }
      }
      .project {
        width: 50%;
        height: auto;
        align-self: stretch;
        padding: 24px 28px;
        color: var(--text-color);
        h2 {
          margin: 0 0 24px;
          padding-bottom: 8px;
          border-bottom: 1px solid #cfd8e2;
          color: #173a5e;
          font-family: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
          font-size: clamp(1.3rem, 1.8vw, 1.65rem);
          font-weight: 600;
        }
        .project_timeline {
          position: relative;
          padding-left: 28px;
          &::before {
            content: "";
            position: absolute;
            top: 8px;
            bottom: 8px;
            left: 5px;
            width: 2px;
            background: #d7e0e9;
          }
        }
        .project_item {
          position: relative;
          padding: 0 0 28px 22px;
          &::before {
            content: "";
            position: absolute;
            top: 5px;
            left: -28px;
            width: 10px;
            height: 10px;
            width: 11px;
            height: 11px;
            border: 2px solid #ffffff;
            border-radius: 50%;
            outline: 1px solid #8ba8c2;
            background: #3c6f9e;
          }
        }
        .project_header {
          display: flex;
          align-items: baseline;
          justify-content: space-between;
          gap: 16px;
          h3 {
            margin: 0;
            font-size: clamp(1.05rem, 1.6vw, 1.35rem);
            line-height: 1.5;
            color: #1c3856;
          }
          > span {
            flex: 0 0 auto;
            color: var(--muted-color);
            font-size: 0.9rem;
          }
        }
        .project_tags {
          display: flex;
          flex-wrap: wrap;
          gap: 8px;
          margin: 8px 0 14px;
          span {
            padding: 4px 10px;
            border: 1px solid #cfdae5;
            border-radius: 3px;
            color: #315a7e;
            background: #f3f7fa;
            font-size: 0.82rem;
          }
        }
        p {
          margin: 10px 0;
          line-height: 1.7;
          color: #44566a;
        }
        ul {
          display: flex;
          flex-direction: column;
          gap: 10px;
          margin: 12px 0;
          padding-left: 20px;
          li {
            padding-left: 2px;
            line-height: 1.7;
            color: #44566a;
          }
        }
        .project_stack {
          color: #315f86;
          font-weight: 600;
        }
      }
    }

    .aside > div,
    .main > div,
    .content > div,
    .learning > div {
      background: transparent;
    }

    .info_card,
    .label_card,
    .history_card {
      background: rgba(255, 255, 255, 0.055);
      border: 1px solid rgba(255, 255, 255, 0.14);
      box-shadow: none;
    }
    .experience {
      flex: none;
      min-height: 360px;
      padding: 28px 5%;
      height: auto;
      color: var(--text-color);
      h2 {
        margin: 0 0 22px;
        padding-bottom: 8px;
        border-bottom: 1px solid #cfd8e2;
        color: #173a5e;
        font-family: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
        font-size: clamp(1.3rem, 1.8vw, 1.65rem);
        font-weight: 600;
      }
      .paper_list {
        max-width: 900px;
      }
      .paper_card {
        padding: 22px 24px;
        border: 1px solid #d9e1e9;
        border-radius: 4px;
        background: #fbfcfd;
      }
      .paper_header,
      .paper_footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
      }
      .paper_label {
        display: block;
        margin-bottom: 6px;
        color: var(--muted-color);
        font-size: 0.82rem;
      }
      .paper_header h3 {
        margin: 0;
        font-size: clamp(1.05rem, 1.8vw, 1.3rem);
        color: #1c3856;
      }
      .paper_status {
        flex: 0 0 auto;
        padding: 5px 11px;
        border: 1px solid #c8d8e6;
        border-radius: 3px;
        color: #315a7e;
        background: #f2f6fa;
        font-size: 0.85rem;
      }
      .paper_info {
        margin: 22px 0;
        padding: 16px 18px;
        border-left: 3px solid #7899b6;
        background: #f6f8fa;
      }
      .paper_info p {
        margin: 8px 0;
        color: #44566a;
        line-height: 1.6;
      }
      .paper_footer {
        color: var(--muted-color);
        font-size: 0.86rem;
      }
      .paper_footer time {
        color: #627f99;
      }
      .research_overview {
        max-width: 900px;
        padding: 20px 22px;
        border: 1px solid #d9e1e9;
        border-radius: 4px;
        background: #fbfcfd;
      }
      .research_title,
      .research_meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
      }
      .research_label {
        display: block;
        margin-bottom: 5px;
        color: var(--muted-color);
        font-size: 0.82rem;
      }
      .research_title strong {
        font-size: clamp(1rem, 1.8vw, 1.25rem);
      }
      .research_percent,
      .step_status {
        color: #315f86;
        font-size: 0.85rem;
      }
      .progress_track {
        height: 8px;
        margin: 18px 0 10px;
        overflow: hidden;
        border-radius: 2px;
        background: #e6ebf0;
      }
      .progress_value {
        display: block;
        width: 38%;
        height: 100%;
        border-radius: inherit;
        background: #4b7da8;
      }
      .research_meta {
        color: var(--muted-color);
        font-size: 0.86rem;
      }
      .research_steps {
        position: relative;
        max-width: 900px;
        margin-top: 26px;
        padding-left: 28px;
        &::before {
          content: "";
          position: absolute;
          top: 8px;
          bottom: 8px;
          left: 5px;
          width: 2px;
          background: #d7e0e9;
        }
      }
      .research_step {
        position: relative;
        display: flex;
        gap: 16px;
        min-height: 82px;
        padding: 0 0 22px 20px;
        .step_marker {
          position: absolute;
          top: 4px;
          left: -28px;
          width: 12px;
          height: 12px;
          border: 2px solid #ffffff;
          border-radius: 50%;
          outline: 1px solid #8ba8c2;
          background: #c4d1dd;
        }
        &.completed .step_marker {
          background: #6d94b3;
        }
        &.active .step_marker {
          background: #315f86;
          outline-color: #315f86;
        }
        h3 {
          margin: 4px 0 5px;
          font-size: 1rem;
        }
        p {
          margin: 0;
          color: #4b5e72;
          line-height: 1.6;
        }
      }
    }
  }

  .github_heatmap {
    width: calc(100% - 64px);
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 18px 12px;
    border: 1px solid #d7dee6;
    border-radius: 4px;
    color: #1f2328;
    background: #ffffff;
    box-shadow: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  .heatmap_status {
    padding: 18px 0;
    color: #59636e;
    text-align: center;
  }

  .heatmap_scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #afb8c1 transparent;
  }

  .heatmap_scroll[hidden],
  .heatmap_footer[hidden],
  .heatmap_status[hidden] {
    display: none;
  }

  .heatmap_calendar {
    width: max-content;
    min-width: 100%;
  }

  .heatmap_months {
    display: grid;
    grid-template-columns: repeat(var(--week-count), 11px);
    column-gap: 3px;
    height: 17px;
    margin-left: 36px;
  }

  .heatmap_month {
    grid-row: 1;
    color: #59636e;
    font-size: 11px;
    line-height: 14px;
    white-space: nowrap;
  }

  .heatmap_body {
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }

  .heatmap_weekdays {
    display: grid;
    flex: 0 0 28px;
    grid-template-rows: repeat(7, 11px);
    gap: 3px;
    color: #24292f;
    font-size: 11px;
    line-height: 11px;
  }

  .heatmap_grid {
    display: flex;
    flex: 0 0 auto;
    gap: 3px;
  }

  .heatmap_week {
    display: grid;
    flex: 0 0 auto;
    grid-template-rows: repeat(7, 11px);
    gap: 3px;
  }

  .heatmap_day {
    display: block;
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    border-radius: 2px;
    border: 1px solid rgba(31, 35, 40, 0.06);
    background: #ebedf0;
  }

  .heatmap_day.level-0 {
    background: #ebedf0;
  }

  .heatmap_day.level-1 {
    background: #9be9a8;
  }

  .heatmap_day.level-2 {
    background: #40c463;
  }

  .heatmap_day.level-3 {
    background: #30a14e;
  }

  .heatmap_day.level-4 {
    background: #216e39;
  }

  .heatmap_footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
    font-size: 12px;
  }

  .heatmap_footer a {
    color: #59636e;
    text-decoration: none;
  }

  .heatmap_footer a:hover {
    text-decoration: underline;
  }

  .heatmap_legend {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
    color: #59636e;
  }

  .heatmap_legend .heatmap_day {
    width: 11px;
    height: 11px;
  }
}

.visitor_toast {
  position: fixed;
  z-index: 1000;
  top: 24px;
  left: 50%;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 13px 22px;
  border: 1px solid #365d7d;
  border-radius: 4px;
  color: #f7fafc;
  background: #1f405e;
  box-shadow: 0 4px 12px rgba(15, 31, 48, 0.18);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  line-height: 1.5;
  transform: translate(-50%, -18px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.visitor_toast.is_visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.wechat_bubble {
  position: fixed;
  z-index: 1200;
  width: 184px;
  padding: 9px;
  border: 1px solid #cfd8e1;
  border-radius: 6px;
  color: #1f2328;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(24, 52, 79, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom center;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.wechat_bubble::after {
  position: absolute;
  bottom: -7px;
  left: var(--arrow-left, 50%);
  width: 12px;
  height: 12px;
  border-right: 1px solid #cfd8e1;
  border-bottom: 1px solid #cfd8e1;
  background: #ffffff;
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.wechat_bubble.is_below {
  transform-origin: top center;
}

.wechat_bubble.is_below::after {
  top: -7px;
  bottom: auto;
  border: 0;
  border-top: 1px solid #cfd8e1;
  border-left: 1px solid #cfd8e1;
}

.wechat_bubble.is_visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.wechat_bubble img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2px;
  object-fit: cover;
}

.wechat_bubble p {
  margin: 8px 0 2px;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
}

.back_to_top {
  --progress-angle: 0deg;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #18344f;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.back_to_top::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(
    from -90deg,
    #f87171 0deg,
    #fbbf24 calc(var(--progress-angle) * 0.25),
    #34d399 calc(var(--progress-angle) * 0.5),
    #38bdf8 calc(var(--progress-angle) * 0.75),
    #a78bfa var(--progress-angle),
    transparent var(--progress-angle),
    transparent 360deg
  );
  content: "";
  pointer-events: none;
  -webkit-mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 4px),
    #000 calc(100% - 4px)
  );
  mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 4px),
    #000 calc(100% - 4px)
  );
}

.back_to_top:hover {
  color: #0e2a44;
}

.back_to_top:focus-visible {
  outline: 2px solid #3f789f;
  outline-offset: 4px;
}

.back_to_top_content {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.back_to_top svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.back_to_top_percent {
  display: none;
}

.skill_icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  object-fit: contain;
}

@media (max-width: 900px) {
  #aside {
    position: relative;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    grid-template-areas:
      "brand brand"
      "avatar profile"
      "skills skills"
      "history history";
    gap: 18px;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 20px 20px 24px;
    border-right: 0;
    border-bottom: 1px solid #294964;
    overflow: visible;
  }

  #aside::before {
    grid-area: brand;
    position: static;
    margin: 0;
    padding-bottom: 8px;
  }

  #aside .avatar {
    grid-area: avatar;
    height: auto;
    margin-top: 0;
    padding: 0;
    align-items: flex-start;
    justify-content: center;
  }

  #aside .avatar .avatar_img {
    height: 140px;
    width: 120px;
    margin-bottom: 0;
  }

  #aside .base_info,
  #aside .skill_labels {
    height: auto;
    min-height: 0;
    padding: 0;
  }

  #aside .base_info {
    grid-area: profile;
    align-items: stretch;
    margin: 0;
  }

  #aside .info_card,
  #aside .label_card {
    width: 100%;
    max-width: 620px;
    min-height: 0;
    margin-inline: auto;
  }

  #aside .skill_labels {
    grid-area: skills;
    margin: 0;
  }

  #aside .history {
    grid-area: history;
    display: block;
    flex: none;
    min-height: 0;
  }

  #aside .history_card {
    width: 100%;
    max-width: 620px;
    height: 188px;
    min-height: 188px;
    margin-top: 0;
    margin-inline: auto;
  }

  #main {
    width: 100%;
    margin-left: 0;
    min-height: 0;
  }

  #main .name {
    flex: 0 0 auto;
    height: auto;
    min-height: 200px;
    padding: 42px 22px 26px;
  }

  #main .name_english {
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: clamp(1.65rem, 7.4vw, 2.25rem);
    line-height: 1.3;
    white-space: normal;
  }

  #main .name_signature {
    font-size: 1em;
    max-width: 100%;
    padding: 0.12em 0.08em 0.34em;
    margin: -0.12em -0.08em -0.34em;
  }

  #main .name_chinese {
    margin-top: 10px;
    font-size: 0.92rem;
    letter-spacing: 0.12em;
  }

  #main .describe {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  #main .describe > .content {
    padding: 28px 22px 20px;
  }

  #main .self-introduce > span {
    max-width: none;
    margin-bottom: 14px;
    font-size: 1rem;
    line-height: 1.8;
  }

  #main .connect {
    margin-top: 18px;
    margin-left: 10px;
  }

  #main .fire {
    min-height: 0;
    padding: 18px 16px 24px;
  }

  #main .github_heatmap {
    width: 100%;
    padding: 14px 12px 10px;
  }

  #main .heatmap_scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  #main .heatmap_footer {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  #main .learning {
    display: block;
    min-height: 0;
    border-top: 1px solid var(--border-color);
  }

  #main .eduction,
  #main .project {
    width: 100%;
    padding: 24px 20px;
  }

  #main .eduction {
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
  }

  #main .education_timeline,
  #main .project_timeline {
    padding-left: 22px;
  }

  #main .education_item,
  #main .project_item {
    padding-left: 16px;
  }

  #main .education_item::before,
  #main .project_item::before {
    left: -23px;
  }

  #main .project_header,
  #main .paper_header,
  #main .paper_footer {
    flex-wrap: wrap;
  }

  #main .experience {
    min-height: 0;
    padding: 26px 20px 32px;
  }

  #main .paper_card {
    padding: 20px 18px;
  }

  #main .paper_info {
    padding: 14px;
  }
}

@media (max-width: 700px) {
  #aside {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-areas:
      "brand brand"
      "avatar profile"
      "skills skills"
      "history history";
    gap: 14px;
    padding: 16px;
  }

  #aside::before {
    grid-area: brand;
    margin: 0;
  }

  #aside .avatar {
    grid-area: avatar;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
  }

  #aside .avatar .avatar_img {
    width: 96px;
    height: 116px;
    margin: 0;
  }

  #aside .base_info {
    grid-area: profile;
    align-items: stretch;
    margin: 0;
  }

  #aside .skill_labels {
    grid-area: skills;
    margin: 0;
  }

  #aside .history {
    grid-area: history;
  }

  #aside .history_card {
    height: 160px;
    min-height: 160px;
  }

  .back_to_top {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 480px) {
  #aside {
    padding-right: 16px;
    padding-left: 16px;
  }

  #aside .avatar .avatar_img {
    height: 132px;
    width: 112px;
  }

  #aside .info_card {
    padding-right: 10px;
    padding-left: 10px;
  }

  #aside .info {
    grid-template-columns: 4.7em minmax(0, 1fr);
  }

  #aside .label_card li {
    font-size: 0.82rem;
  }

  #main .name {
    min-height: 180px;
    padding: 36px 18px 24px;
  }

  #main .name_english {
    font-size: clamp(1.5rem, 7.8vw, 1.95rem);
  }

  #main .describe > .content {
    padding-right: 18px;
    padding-left: 18px;
  }

  #main .fire {
    padding-right: 12px;
    padding-left: 12px;
  }

  #main .github_heatmap {
    padding-right: 10px;
    padding-left: 10px;
  }

  #main .heatmap_footer {
    align-items: flex-start;
    flex-direction: column;
  }

  #main .education_header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #main .project_header > span,
  #main .paper_status {
    white-space: normal;
  }

  #main .eduction,
  #main .project,
  #main .experience {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (max-width: 370px) {
  #aside {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  #aside .avatar .avatar_img {
    width: 70px;
    height: 92px;
  }

  #aside .info_card {
    padding-right: 6px;
    padding-left: 6px;
  }

  #aside .info {
    grid-template-columns: 4.2em minmax(0, 1fr);
    gap: 4px;
    font-size: 0.82rem;
  }
}
