@import url("./assets/cm-web-fonts-master/font/Serif/cmun-serif.css");

:root {
  --seed-blue: #3c56f4;
  --seed-blue-hover: #2d43dc;
  --seed-text: #1e1f24;
  --seed-body: #40424d;
  --seed-muted: #62636c;
  --seed-soft: #8b8d98;
  --seed-border: #d8d9e0;
  --seed-panel: #f7f8fd;
  --content-width: 1000px;
  --article-width: 860px;
  --nav-x: max(24px, calc(50vw - 800px + 120px));
  color: var(--seed-text);
  background: #fff;
  font-family:
    "ByteSans",
    "Inter",
    "HarmonyOS Sans SC",
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #fff;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--seed-text);
  line-height: 1.5;
}

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

button {
  font: inherit;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 96px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 40px var(--nav-x) 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 132px;
  height: auto;
}

.locale-switch {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: #eff0f3;
}

.locale-button {
  min-width: 44px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: var(--seed-soft);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.locale-button.is-active {
  color: #000;
  background: rgba(0, 0, 0, 0.05);
}

.page {
  padding-bottom: 64px;
}

.article-nav {
  position: fixed;
  top: 220px;
  left: max(24px, calc(50vw - 660px));
  z-index: 5;
  display: grid;
  width: 148px;
  gap: 4px;
}

.article-nav-link {
  position: relative;
  display: block;
  padding: 8px 0 8px 16px;
  color: var(--seed-soft);
  font-size: 15px;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 21px;
  transition: color 0.18s ease;
}

.article-nav-link::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: transparent;
  content: "";
  transform: translateY(-50%);
  transition: background 0.18s ease;
}

.article-nav-link:hover,
.article-nav-link.is-active {
  color: var(--seed-text);
}

.article-nav-link.is-active::before {
  background: var(--seed-blue);
}

.article-hero {
  width: min(var(--article-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0 42px;
  text-align: center;
}

.publish-date {
  margin: 0 0 30px;
  color: var(--seed-soft);
  font-size: 20px;
  font-weight: 400;
  line-height: 24px;
}

.hero-title-lockup {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.article-hero h1 {
  display: flex;
  margin: 0;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.brand-title-image {
  display: block;
  width: 380px;
  max-width: min(100%, 86vw);
  height: auto;
}

.hero-summary {
  max-width: 720px;
  margin: 24px auto 0;
  color: #777985;
  font-size: 18px;
  font-weight: 400;
  line-height: 30px;
  text-wrap: balance;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
}

.seed-button {
  display: inline-flex;
  width: max-content;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--seed-border);
  border-radius: 24px;
  color: var(--seed-text);
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  transition:
    border-color 0.18s ease,
    color 0.18s ease,
    background 0.18s ease;
}

.seed-button:hover {
  border-color: var(--seed-blue);
  color: var(--seed-blue);
}

.seed-button.primary {
  border-color: transparent;
  color: #fff;
  background: var(--seed-blue);
}

.seed-button.primary:hover {
  color: #fff;
  background: var(--seed-blue-hover);
}

.placeholder-action {
  cursor: default;
}

.video-block {
  width: min(var(--article-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

.video-frame {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  min-height: 360px;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #171a24, #272b39 52%, #11131b);
}

.video-frame--media {
  display: block;
  background: #000;
}

.video-frame--media::after {
  display: none;
}

.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #000;
  object-fit: cover;
}

.video-frame::after {
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
  pointer-events: none;
}

.video-noise {
  position: absolute;
  inset: 0;
  opacity: 0.44;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
}

.play-mark {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.play-mark::before {
  position: absolute;
  top: 50%;
  left: 52%;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid #111;
  content: "";
  transform: translate(-35%, -50%);
}

.video-frame span {
  position: absolute;
  right: 24px;
  bottom: 20px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}

.content {
  width: min(var(--article-width), calc(100% - 40px));
  margin: 0 auto;
}

.background-lead {
  width: min(var(--article-width), calc(100% - 40px));
  margin: -10px auto 52px;
  padding-top: 26px;
  border-top: 1px solid var(--seed-border);
  scroll-margin-top: 32px;
}

.background-lead p {
  max-width: 800px;
  margin: 0 auto;
  color: var(--seed-soft);
  font-size: 17px;
  font-weight: 400;
  line-height: 31px;
  text-align: left;
}

.content-section {
  margin-top: 40px;
  scroll-margin-top: 32px;
}

.content-section:first-child {
  margin-top: 0;
}

.content-section h2 {
  margin: 0 0 18px;
  color: var(--seed-text);
  font-size: 28px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 38px;
}

.content-section h3 {
  margin: 34px 0 14px;
  color: var(--seed-text);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 32px;
}

.content-section p {
  margin: 0 0 18px;
  color: var(--seed-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 32px;
}

.content-section a {
  color: var(--seed-blue);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.content-section a:hover {
  color: var(--seed-blue-hover);
}

.content-section .paragraph-lead {
  color: var(--seed-text);
  font-size: 18px;
  font-weight: 650;
  line-height: 32px;
}

.task-list {
  display: grid;
  gap: 14px;
  margin: 4px 0 22px;
  padding: 0;
  list-style: none;
}

.task-list li {
  position: relative;
  padding-left: 18px;
  color: var(--seed-body);
  font-size: 18px;
  line-height: 32px;
}

.task-list li::before {
  position: absolute;
  top: 14px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--seed-blue);
  content: "";
}

.task-lead {
  color: var(--seed-text);
  font-weight: 650;
}

.inline-math {
  color: var(--seed-text);
  font-family:
    "Computer Modern Serif",
    "Latin Modern Math",
    "FreeSerif",
    Georgia,
    serif;
  font-size: 1.02em;
  vertical-align: -0.12em;
}

.formula-block {
  overflow-x: visible;
  margin: 6px 0 18px;
  padding: 0;
  color: var(--seed-text);
  font-size: 18px;
  line-height: 30px;
  text-align: center;
  white-space: nowrap;
  scrollbar-width: none;
}

.formula-block::-webkit-scrollbar {
  display: none;
}

.formula-inline {
  display: inline-block;
  margin-left: 0.3em;
  white-space: nowrap;
}

.tex-inline {
  white-space: nowrap;
}

.formula-block .tex-display,
.formula-block .katex-display {
  margin: 0.3em 0 0.2em;
}

.content .katex {
  color: var(--seed-text);
  font-size: 1.04em;
}

.method-visual {
  width: 100%;
  margin: 38px 0 40px;
}

.architecture-visual {
  width: 100%;
  margin: 40px 0 44px;
}

.architecture-chart {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--seed-border);
  border-radius: 16px;
  background: #fff;
}

.method-gif {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--seed-border);
  border-radius: 16px;
  background: var(--seed-panel);
}

.method-gif[hidden] {
  display: none;
}

.perf-visual {
  width: 100%;
  margin: 40px 0 46px;
}

.perf-chart {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--seed-border);
  border-radius: 16px;
  background: #fff;
}

figcaption {
  margin-top: 12px;
  color: var(--seed-soft);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  text-align: center;
}

.site-footer {
  width: 100%;
  margin: 0;
  padding: 32px var(--nav-x) 44px;
  border-top: 1px solid var(--seed-border);
}

.site-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.footer-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.footer-copyright {
  color: var(--seed-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}

.footer-org {
  color: var(--seed-soft);
  font-size: 13px;
  line-height: 20px;
}

.footer-links {
  display: flex;
  max-width: 560px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.footer-link {
  color: var(--seed-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  transition: color 0.18s ease;
}

.footer-link:hover {
  color: var(--seed-blue);
}

.footer-contact {
  display: inline-flex;
  gap: 6px;
}

@media (max-width: 1180px) {
  .article-nav {
    display: none;
  }
}

@media (max-width: 1023px) {
  :root {
    --nav-x: 16px;
  }

  .topbar {
    min-height: 64px;
    align-items: center;
    padding: 0 16px;
  }

  .brand-logo {
    width: 112px;
  }

  .article-hero {
    padding: 54px 0 30px;
  }

  .publish-date {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 22px;
  }

  .brand-title-image {
    width: min(86vw, 340px);
  }

  .hero-summary {
    margin-top: 18px;
    max-width: 640px;
    font-size: 16px;
    line-height: 27px;
  }

  .action-row {
    margin-top: 24px;
  }

  .video-block {
    padding-bottom: 38px;
  }

  .background-lead {
    margin: -4px auto 40px;
    padding-top: 22px;
  }

  .background-lead p {
    font-size: 15px;
    line-height: 27px;
  }

  .video-frame {
    min-height: 220px;
    border-radius: 16px;
  }

  .video-frame span {
    right: 28px;
    bottom: 14px;
    font-size: 12px;
    line-height: 18px;
  }

  .content-section h2 {
    font-size: 24px;
    line-height: 32px;
  }

  .content-section h3 {
    font-size: 19px;
    line-height: 28px;
  }

  .content-section p {
    font-size: 16px;
    line-height: 28px;
  }

  .content-section .paragraph-lead {
    font-size: 16px;
    line-height: 28px;
  }

  .task-list li {
    font-size: 16px;
    line-height: 28px;
  }

  .task-list li::before {
    top: 12px;
  }

  .formula-block {
    overflow-x: auto;
    font-size: 16px;
    line-height: 26px;
  }

  .method-visual {
    margin-top: 30px;
    margin-bottom: 34px;
  }

  .architecture-visual {
    margin-top: 32px;
    margin-bottom: 36px;
  }
}

@media (max-width: 640px) {
  .hero-title-lockup {
    max-width: 100%;
  }

  .locale-button {
    min-width: 40px;
    padding: 0 8px;
    font-size: 12px;
  }

  .action-row {
    display: grid;
  }

  .seed-button {
    width: 100%;
  }

  .video-block,
  .article-hero,
  .content {
    width: calc(100% - 32px);
  }

  .video-frame {
    min-height: 0;
  }

  .method-visual {
    width: calc(100vw - 32px);
  }

  .site-footer {
    padding: 28px 16px 36px;
  }

  .site-footer-inner {
    display: grid;
    gap: 18px;
  }

  .footer-links {
    justify-content: flex-start;
    gap: 10px 16px;
  }

  .footer-contact {
    width: 100%;
  }
}
