/* Kaisei Opti: SIL Open Font License, see fonts/kaisei-opti-OFL.txt. */
    @font-face {
      font-family: "Kaisei Opti";
      src: url("../fonts/kaisei-opti-regular.woff2") format("woff2");
      font-style: normal;
      font-weight: 400;
      font-display: swap;
    }

    @font-face {
      font-family: "Kaisei Opti";
      src: url("../fonts/kaisei-opti-bold.woff2") format("woff2");
      font-style: normal;
      font-weight: 700;
      font-display: swap;
    }

    /* Source Han Serif CN: SIL OFL, see fonts/source-han-serif-LICENSE.txt. */
    @font-face {
      font-family: "Source Han Serif CN";
      src: url("../fonts/source-han-serif-cn.woff2") format("woff2");
      font-style: normal;
      font-weight: 250 900;
      font-display: swap;
    }

    :root {
      --ink: #20232a;
      --soft-ink: #525963;
      --muted: #79818b;
      --paper: #fbfaf7;
      --panel: rgba(251, 250, 247, 0.86);
      --panel-strong: rgba(255, 255, 255, 0.94);
      --line: rgba(32, 35, 42, 0.14);
      --sakura: #b84f64;
      --moss: #526b5a;
      --indigo: #304c61;
      --sun: #b9852f;
      --green: #39735d;
      --display-font: "Kaisei Opti", "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
      --body-font: "Kaisei Opti", "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
      --zh-font: "Source Han Serif CN", "Noto Serif SC", "Songti SC", "SimSun", serif;
      --shadow: 0 12px 30px rgba(32, 35, 42, 0.1);
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      min-height: 100vh;
      color: var(--ink);
      font-family: var(--body-font);
      font-size: 15px;
      font-weight: 400;
      line-height: 1.65;
      letter-spacing: 0;
      background: var(--paper);
    }

    html[lang="zh-CN"] {
      --display-font: var(--zh-font);
      --body-font: var(--zh-font);
    }

    html[lang="zh-CN"] body {
      line-height: 1.8;
    }

    html[lang="zh-CN"] .vertical-note {
      display: none;
    }

    html[lang="zh-CN"] .nav-links {
      font-size: 17px;
    }

    html[lang="zh-CN"] .search input {
      font-size: 14px;
    }

    html[lang="zh-CN"] .lead {
      font-size: 20px;
      line-height: 1.75;
    }

    html[lang="zh-CN"] .profile-name {
      font-size: 26px;
    }

    html[lang="zh-CN"] .tag {
      font-size: 12px;
    }

    html[lang="zh-CN"] .motto {
      font-size: 16px;
      line-height: 1.8;
    }

    html[lang="zh-CN"] .github-line,
    html[lang="zh-CN"] .stat,
    html[lang="zh-CN"] .archive-pill,
    html[lang="zh-CN"] .backtop {
      font-size: 13px;
    }

    html[lang="zh-CN"] .menu a,
    html[lang="zh-CN"] .panel-title,
    html[lang="zh-CN"] .site-info {
      font-size: 16px;
    }

    html[lang="zh-CN"] .notice,
    html[lang="zh-CN"] .playlist {
      font-size: 15px;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -2;
      background: url("../imgs/bg-cover.jpeg") center / cover fixed;
    }

    body::after {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -1;
      background: rgba(251, 250, 247, 0.78);
      pointer-events: none;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    img {
      display: block;
      max-width: 100%;
    }

    button,
    input {
      font: inherit;
    }

    .site-header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 30;
      border-bottom: 1px solid var(--line);
      background: rgba(251, 250, 247, 0.9);
      backdrop-filter: blur(18px);
      transition: transform 0.28s ease, box-shadow 0.28s ease;
      will-change: transform;
    }

    .site-header.is-hidden {
      transform: translateY(-100%);
    }

    .site-header.is-scrolled {
      box-shadow: 0 8px 24px rgba(32, 35, 42, 0.08);
    }

    .nav {
      width: min(1280px, calc(100% - 40px));
      min-height: 82px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: minmax(260px, 380px) 1fr auto;
      align-items: center;
      gap: 22px;
    }

    .search {
      position: relative;
      display: flex;
      height: 40px;
      border: 1px solid var(--line);
      border-radius: 2px;
      overflow: hidden;
      background: rgba(255, 255, 255, 0.9);
    }

    .search input {
      width: 100%;
      border: 0;
      outline: 0;
      padding: 0 14px;
      color: var(--ink);
      background: transparent;
      font-size: 17px;
    }

    .search button {
      width: 44px;
      border: 0;
      border-left: 1px solid var(--line);
      color: var(--soft-ink);
      background: rgba(255, 255, 255, 0.68);
      cursor: pointer;
      font-size: 16px;
    }

    .search-results {
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      width: min(380px, calc(100vw - 32px));
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 2px;
      background: var(--panel-strong);
      box-shadow: var(--shadow);
      opacity: 0;
      visibility: hidden;
      transform: translateY(8px);
      transition: 0.2s;
    }

    .search-results.is-open {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .search-results__head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .search-results__head button {
      border: 0;
      padding: 0;
      color: var(--ink);
      background: transparent;
      cursor: pointer;
      font-size: 12px;
      text-decoration: underline;
    }

    .search-results ul {
      display: grid;
      gap: 10px;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .search-results li a {
      display: grid;
      grid-template-columns: 58px 1fr;
      gap: 12px;
      align-items: center;
      color: var(--ink);
      font-weight: 700;
    }

    .search-results img {
      width: 58px;
      height: 48px;
      object-fit: cover;
      border-radius: 5px;
    }

    .nav-links {
      display: flex;
      justify-content: end;
      gap: 18px;
      color: var(--soft-ink);
      font-family: var(--display-font);
      font-size: 18px;
      font-weight: 400;
      line-height: 1.6;
    }

    .nav-links a {
      position: relative;
      padding: 10px 4px;
      border-radius: 0;
      white-space: nowrap;
    }

    .nav-links a:hover {
      color: var(--ink);
      background: transparent;
    }

    .nav-links a::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: 4px;
      height: 1px;
      background: var(--ink);
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.2s;
    }

    .nav-links a:hover::after {
      transform: scaleX(1);
    }

    .lang-switch {
      display: inline-grid;
      grid-template-columns: 1fr 1fr;
      padding: 3px;
      border: 1px solid var(--line);
      border-radius: 2px;
      background: rgba(255, 255, 255, 0.8);
    }

    .lang-switch button {
      min-width: 78px;
      min-height: 32px;
      border: 0;
      border-radius: 1px;
      color: var(--muted);
      background: transparent;
      cursor: pointer;
      font-size: 13px;
      font-weight: 500;
    }

    .lang-switch button.is-active {
      color: #fff;
      background: var(--ink);
    }

    .page {
      width: min(1280px, calc(100% - 40px));
      margin: 0 auto;
      padding-top: 82px;
    }

    .hero {
      position: relative;
      min-height: 360px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 120px;
      align-items: end;
      gap: 30px;
      padding: 42px 0 30px;
      border-bottom: 2px solid rgba(32, 35, 42, 0.18);
    }

    .hero::before {
      content: "";
      position: absolute;
      inset: 24px 0 32px 36%;
      z-index: -1;
      border-radius: 0;
      background:
        linear-gradient(90deg, rgba(251, 250, 247, 0.36), rgba(251, 250, 247, 0.08)),
        url("../imgs/top-cover.jpeg") center / cover;
      box-shadow: none;
    }

    .kicker {
      margin: 0 0 16px;
      color: var(--moss);
      font-family: var(--display-font);
      font-size: 14px;
      font-weight: 400;
      line-height: 1.5;
    }

    .kicker::before {
      content: "";
      display: inline-block;
      width: 42px;
      height: 1px;
      margin-right: 12px;
      background: var(--moss);
      vertical-align: middle;
    }

    h1 {
      margin: 0;
      font-family: var(--display-font);
      font-size: 92px;
      line-height: 1.15;
      letter-spacing: 0;
      font-weight: 400;
    }

    .lead {
      max-width: 610px;
      margin: 20px 0 0;
      color: var(--soft-ink);
      font-size: 20px;
      line-height: 1.7;
    }

    .vertical-note {
      justify-self: end;
      align-self: center;
      writing-mode: vertical-rl;
      color: var(--muted);
      font-family: var(--display-font);
      font-size: 18px;
      line-height: 1.6;
    }

    .board {
      display: grid;
      grid-template-columns: 260px minmax(0, 1fr) 286px;
      gap: 22px;
      align-items: start;
      padding: 28px 0 64px;
    }

    .stack {
      display: grid;
      gap: 14px;
    }

    .panel {
      border: 1px solid var(--line);
      border-radius: 0;
      background: rgba(255, 255, 255, 0.78);
      box-shadow: none;
      overflow: hidden;
    }

    .panel-body {
      padding: 16px;
    }

    .profile-cover {
      min-height: 150px;
      display: grid;
      grid-template-columns: 92px 1fr;
      gap: 18px;
      align-items: center;
      padding: 22px 18px;
      background:
        linear-gradient(90deg, rgba(251, 250, 247, 0.12), rgba(251, 250, 247, 0.18)),
        url("../imgs/avatar-bg.jpeg") center / cover;
    }

    .avatar {
      width: 92px;
      height: 92px;
      border-radius: 2px;
      object-fit: cover;
      border: 3px solid rgba(255, 255, 255, 0.9);
      box-shadow: 0 12px 24px rgba(32, 35, 42, 0.22);
    }

    .profile-name {
      margin: 0 0 10px;
      font-family: var(--display-font);
      font-size: 30px;
      font-weight: 400;
      line-height: 1.3;
    }

    .tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .tag {
      padding: 5px 10px;
      border-radius: 2px;
      color: #fff;
      font-size: 12px;
      font-weight: 400;
      line-height: 1.5;
    }

    .tag.blue {
      background: #4778bd;
    }

    .tag.purple {
      background: #6c3b90;
    }

    .motto {
      padding: 20px 18px;
      color: var(--ink);
      line-height: 1.75;
      border-bottom: 1px solid var(--line);
      font-size: 18px;
    }

    .motto p {
      margin: 0;
    }

    .motto p:last-child {
      text-align: right;
      color: var(--soft-ink);
    }

    .github-line {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      color: var(--soft-ink);
      font-weight: 700;
    }

    .github-line::before,
    .github-line::after {
      content: "";
      flex: 1;
      height: 1px;
      background: var(--line);
    }

    .stats {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1px;
      background: var(--line);
      border-top: 1px solid var(--line);
    }

    .stat {
      padding: 13px 8px;
      color: #fff;
      text-align: center;
      font-size: 12px;
      font-weight: 700;
    }

    .stat strong {
      display: block;
      margin-bottom: 4px;
      font-size: 18px;
    }

    .stat:nth-child(1) {
      background: #b85d4e;
    }

    .stat:nth-child(2) {
      background: var(--sun);
    }

    .stat:nth-child(3) {
      background: var(--green);
    }

    .menu {
      margin: 0;
      padding: 12px 16px;
      list-style: none;
    }

    .menu li + li {
      border-top: 1px solid rgba(32, 35, 42, 0.08);
    }

    .menu a {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 0;
      color: var(--soft-ink);
      font-family: var(--display-font);
      font-size: 17px;
      font-weight: 400;
      line-height: 1.6;
    }

    .menu a:hover {
      color: var(--sakura);
    }

    .panel-title {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin: 0 0 14px;
      font-family: var(--display-font);
      font-size: 17px;
      font-weight: 700;
      line-height: 1.6;
    }

    .site-info {
      display: grid;
      gap: 8px;
      color: var(--soft-ink);
      font-family: var(--display-font);
      font-size: 17px;
      line-height: 1.6;
    }

    .site-info div {
      display: flex;
      justify-content: space-between;
      gap: 12px;
    }

    .article-card {
      min-width: 0;
      padding: 20px;
      border: 1px solid rgba(32, 35, 42, 0.09);
      border-radius: 8px;
      background: var(--panel-strong);
      box-shadow: 0 3px 14px rgba(32, 35, 42, 0.04);
      overflow: hidden;
    }

    .center-stack {
      display: grid;
      min-width: 0;
      gap: 18px;
      align-content: start;
    }

    .article-cover {
      position: relative;
      display: grid;
      align-items: end;
      aspect-ratio: 2 / 1;
      min-height: 260px;
      max-height: 340px;
      border-radius: 6px;
      color: #fff;
      overflow: hidden;
    }

    .article-cover img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .article-cover::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.64));
    }

    .article-title {
      position: relative;
      z-index: 1;
      margin: 0;
      padding: 24px;
      font-family: var(--display-font);
      font-size: 42px;
      font-weight: 400;
      line-height: 1.3;
      overflow-wrap: anywhere;
    }

    .article-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 18px;
      padding-top: 14px;
      border-top: 1px dashed var(--line);
      color: var(--soft-ink);
      font-size: 13px;
      line-height: 1.6;
    }

    .article-type {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--moss);
    }

    .article-type::before {
      content: "";
      width: 6px;
      height: 6px;
      flex: 0 0 6px;
      border-radius: 50%;
      background: currentColor;
    }

    .article-meta time {
      margin-left: auto;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }

    .mini-game {
      padding: 0;
    }

    .mini-game__head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
    }

    .mini-game__title {
      margin: 0;
      font-family: var(--display-font);
      font-size: 21px;
      font-weight: 700;
      line-height: 1.5;
    }

    .mini-game__score {
      display: inline-flex;
      min-width: 54px;
      justify-content: center;
      padding: 6px 10px;
      border: 1px solid var(--line);
      color: var(--soft-ink);
      background: rgba(255, 255, 255, 0.62);
      font-weight: 700;
      font-variant-numeric: tabular-nums;
    }

    .mini-game__canvas {
      display: block;
      width: 100%;
      height: auto;
      aspect-ratio: 16 / 6;
      background: #dcecf2;
      cursor: pointer;
    }

    .mini-game__bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 16px 14px;
      border-top: 1px solid var(--line);
    }

    .mini-game__state {
      color: var(--soft-ink);
      font-size: 15px;
      font-weight: 700;
    }

    .mini-game__button {
      min-width: 92px;
      padding: 8px 12px;
      border: 1px solid var(--line);
      border-radius: 0;
      color: #fff;
      background: var(--ink);
      cursor: pointer;
      font-weight: 700;
    }

    .archive-pill {
      display: flex;
      justify-content: space-between;
      gap: 14px;
      padding: 15px 16px;
      border: 1px solid var(--line);
      border-radius: 0;
      background: var(--panel-strong);
      box-shadow: none;
      color: var(--soft-ink);
      font-size: 13px;
      font-weight: 400;
    }

    .notice {
      color: var(--soft-ink);
      line-height: 1.7;
      font-size: 16px;
    }

    .music-card {
      padding: 0;
    }

    .music-head {
      display: grid;
      grid-template-columns: 74px 1fr;
      gap: 14px;
      align-items: center;
      padding: 14px;
      border-bottom: 1px solid var(--line);
    }

    .music-head img {
      width: 74px;
      height: 74px;
      border-radius: 6px;
      object-fit: cover;
    }

    .music-head strong {
      display: block;
      margin-bottom: 8px;
      font-size: 20px;
      font-weight: 700;
      line-height: 1.5;
    }

    .music-head span {
      color: var(--muted);
      font-size: 16px;
      font-weight: 400;
      line-height: 1.6;
    }

    .music {
      width: calc(100% - 28px);
      margin: 0 14px 14px;
    }

    .playlist {
      margin: 0;
      padding: 0 14px 14px 34px;
      color: var(--soft-ink);
      font-size: 15px;
      line-height: 1.7;
    }

    .backtop {
      width: max-content;
      min-width: 78px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 0;
      background: var(--panel-strong);
      box-shadow: none;
      color: var(--soft-ink);
      cursor: pointer;
      font-size: 13px;
      font-weight: 400;
    }

    .footer {
      width: min(1280px, calc(100% - 40px));
      margin: 0 auto;
      padding: 24px 0 42px;
      border-top: 1px solid var(--line);
      color: var(--muted);
      text-align: center;
      font-size: 12px;
    }

    @media (max-width: 980px) {
      .nav {
        grid-template-columns: 1fr auto;
        padding: 12px 0;
      }

      .page {
        padding-top: 138px;
      }

      .search {
        grid-column: 1 / -1;
        order: 3;
      }

      .nav-links {
        justify-content: start;
      }

      .board {
        grid-template-columns: 1fr;
      }

      .hero {
        min-height: auto;
        grid-template-columns: 1fr;
      }

      .hero::before {
        inset: 210px 0 28px 18%;
      }

      .vertical-note {
        justify-self: start;
        writing-mode: horizontal-tb;
      }
    }

    @media (max-width: 560px) {
      .nav,
      .page,
      .footer {
        width: min(100% - 24px, 1280px);
      }

      .site-header {
        position: fixed;
      }

      .nav {
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .page {
        padding-top: 158px;
      }

      .nav-links {
        flex-wrap: wrap;
        gap: 6px;
        font-size: 15px;
      }

      .nav-links a {
        padding: 8px;
      }

      .lang-switch {
        width: 100%;
      }

      .hero {
        padding: 36px 0 30px;
      }

      .hero::before {
        inset: 190px 0 26px 10%;
        opacity: 0.72;
      }

      h1 {
        font-size: 56px;
      }

      .lead {
        font-size: 18px;
      }

      html[lang="zh-CN"] .lead {
        font-size: 18px;
      }

      .board {
        padding-top: 18px;
      }

      .article-card {
        padding: 14px;
      }

      .article-cover {
        aspect-ratio: 4 / 3;
        min-height: 220px;
        max-height: 300px;
      }

      .article-title {
        padding: 18px;
        font-size: 32px;
      }

      .article-meta {
        margin-top: 14px;
        padding-top: 12px;
        font-size: 12px;
      }

      .profile-cover {
        min-height: 138px;
        grid-template-columns: 86px 1fr;
        gap: 16px;
        padding: 20px 16px;
      }

      .avatar {
        width: 86px;
        height: 86px;
      }

      .profile-name {
        font-size: 30px;
      }
    }
