@font-face {
  font-family: "MiSans";
  src: url("https://cdn.cnbj1.fds.api.mi-img.com/aife/mimo-blog-fe/doc_build/static/font/MiSans-Regular.c1d169a3.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MiSans";
  src: url("https://cdn.cnbj1.fds.api.mi-img.com/aife/mimo-blog-fe/doc_build/static/font/MiSans-Medium.68a4e067.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MiSans";
  src: url("https://cdn.cnbj1.fds.api.mi-img.com/aife/mimo-blog-fe/doc_build/static/font/MiSans-Semibold.a8e78d87.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MiSans";
  src: url("https://cdn.cnbj1.fds.api.mi-img.com/aife/mimo-blog-fe/doc_build/static/font/MiSans-Bold.a2266130.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("https://cdn.cnbj1.fds.api.mi-img.com/aife/mimo-blog-fe/doc_build/static/font/NotoSerifSC-VariableFont_wght.599eb0bb.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #faf7f5;
  --ink: #050505;
  --muted: #8d8a87;
  --line: rgba(5, 5, 5, 0.78);
  --soft-line: rgba(5, 5, 5, 0.16);
  --wash: #f1eeec;
  --header-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background: var(--paper);
  font-family: "MiSans", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: rgba(250, 247, 245, 0.92);
  backdrop-filter: blur(14px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 54px);
  font-size: 14px;
  font-weight: 500;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 240ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.page-shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.hero {
  position: relative;
  width: 100%;
  height: 600px;
  background: var(--paper);
  perspective: 1600px;
  overflow: hidden;
}

.hero::after {
  position: absolute;
  z-index: 5;
  inset: 0;
  border: 1px solid var(--ink);
  content: "";
  pointer-events: none;
}

.hero-card {
  --flip-angle: 0deg;
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  outline: none;
  transform: rotateX(var(--flip-angle));
  transform-style: preserve-3d;
  transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-card:focus-visible {
  box-shadow: inset 0 0 0 4px var(--ink);
}

.hero-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: var(--paper);
  will-change: opacity, visibility;
  transition:
    opacity 0s linear 400ms,
    visibility 0s linear 400ms;
}

.hero-front {
  opacity: 1;
  visibility: visible;
  transform: rotateX(0deg) translateZ(0.1px);
}

.hero-back {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  opacity: 0;
  visibility: hidden;
  transform: rotateX(180deg) translateZ(0.1px);
  background: var(--paper);
  color: var(--ink);
}

.hero-card.is-flipped .hero-front {
  opacity: 0;
  visibility: hidden;
}

.hero-card.is-flipped .hero-back {
  opacity: 1;
  visibility: visible;
}

.letter-field {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

.letter-field::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(50% 45%, var(--paper) 0%, rgba(250, 247, 245, 0) 100%);
}

.pattern-row {
  display: flex;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  color: rgba(0, 0, 0, 0.05);
  font-family: "MiSans", "PingFang SC", sans-serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.3em;
  white-space: nowrap;
}

.pattern-row:nth-child(odd) {
  margin-left: -2em;
}

.pattern-text {
  flex-shrink: 0;
  margin-right: 0.6em;
  cursor: default;
  transition:
    color 300ms ease,
    text-shadow 300ms ease;
}

.pattern-text:hover {
  color: rgba(0, 0, 0, 0.12);
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}

.hero h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0 24px;
  font-size: clamp(54px, 6.4vw, 92px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  text-align: center;
}

.hero h1 span {
  display: inline-block;
  letter-spacing: -0.035em;
}

.flip-hint {
  position: absolute;
  z-index: 3;
  bottom: 25px;
  left: 50%;
  margin: 0;
  color: rgba(5, 5, 5, 0.32);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.16em;
  transform: translateX(-50%);
}

.flip-hint span {
  display: inline-block;
  margin-left: 4px;
  transition: transform 220ms ease;
}

.hero-card:hover .flip-hint span {
  transform: translate(3px, -3px);
}

.about-scroll {
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 38px 80px 44px;
  scrollbar-color: #c8c4c1 transparent;
  scrollbar-width: thin;
}

.about-copy {
  width: 100%;
}

.about-copy p {
  margin: 0 0 20px;
  color: #504d4a;
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.008em;
}

.about-copy p:first-child {
  color: #292725;
}

.content-section {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.section-heading {
  min-height: 205px;
  display: flex;
  align-items: center;
  padding: 40px clamp(30px, 5.6vw, 84px);
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(49px, 6vw, 84px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.index-row {
  min-height: 150px;
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: stretch;
}

.index-row > * {
  display: flex;
  align-items: center;
}

.row-number {
  justify-content: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 19px;
}

.row-main {
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 28px 48px;
}

.row-main strong {
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 400;
}

.row-main small {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.row-arrow,
.row-status {
  justify-content: center;
  border-left: 1px solid var(--line);
  font-size: 29px;
}

.github-row {
  transition: background-color 300ms ease;
}

.github-row .row-main strong,
.github-row .row-arrow {
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.github-row:hover,
.github-row:focus-visible {
  background: var(--wash);
  outline: none;
}

.github-row:hover .row-main strong,
.github-row:focus-visible .row-main strong {
  transform: translateX(8px);
}

.github-row:hover .row-arrow,
.github-row:focus-visible .row-arrow {
  transform: translateX(9px);
}

.blog-placeholder {
  color: rgba(5, 5, 5, 0.52);
}

.row-status {
  letter-spacing: 0.2em;
}

.site-footer {
  min-height: 96px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 24px 30px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.site-footer > :last-child {
  justify-self: end;
}

.icp-link {
  padding: 8px 0;
  transition: color 200ms ease;
}

.icp-link:hover,
.icp-link:focus-visible {
  color: var(--ink);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms ease,
    transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 720px) {
  :root {
    --header-height: 60px;
  }

  .site-header {
    padding: 0 18px;
  }

  .site-nav {
    gap: 16px;
    font-size: 12px;
  }

  .site-nav a:first-child {
    display: none;
  }

  .hero {
    height: 560px;
  }

  .letter-field {
    inset: 0;
  }

  .pattern-row {
    font-size: 42px;
    line-height: 1.7;
  }

  .hero h1 {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    font-size: clamp(43px, 13vw, 58px);
  }

  .hero h1 span {
    max-width: 100%;
  }

  .about-scroll {
    padding: 24px 22px 34px;
  }

  .about-copy p {
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.9;
  }

  .section-heading {
    min-height: 160px;
    padding: 32px 24px;
  }

  .index-row {
    min-height: 126px;
    grid-template-columns: 64px 1fr 64px;
  }

  .row-main {
    padding: 22px 24px;
  }

  .row-main small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-footer {
    align-items: flex-start;
    justify-items: start;
    grid-template-columns: 1fr;
    flex-direction: column;
    padding: 26px 20px;
  }

  .site-footer > :last-child {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
