:root {
  /* Design system tokens: edit here to tune the whole static site. */
  --page-bg: #f5f5ef;
  --surface: #ffffff;
  --surface-soft: #fbfcfa;
  --ink: #17201f;
  --muted: #65716c;
  --line: #d9ded6;
  --accent: #147d70;
  --accent-dark: #0f5f55;
  --data-blue: #2d5f9f;
  --warm-mark: #b86f2c;
  --success-soft: #e8f1ee;
  --warning-soft: #fff7ed;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 12px 30px rgba(23, 32, 31, 0.055);
  --shadow-lift: 0 18px 42px rgba(23, 32, 31, 0.085);

  /* Fonts: edit these variables to change typography. */
  --font-display: "Cambria", "Times New Roman", "STSong", serif;
  --font-body: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  --font-data: "Cascadia Mono", "Consolas", monospace;

  /* Page width: edit this variable to change the max content width. */
  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.68;
  overflow-x: hidden;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(20px, calc((100vw - var(--content-width)) / 2));
  background: rgba(245, 245, 239, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(31, 122, 104, 0.75);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 0 13px, rgba(31, 122, 104, 0.12) 13px 14px, transparent 14px 100%),
    linear-gradient(180deg, transparent 0 13px, rgba(31, 122, 104, 0.12) 13px 14px, transparent 14px 100%),
    radial-gradient(circle, rgba(31, 122, 104, 0.07) 0 47%, transparent 48%),
    var(--surface);
  box-shadow: inset 0 0 0 4px rgba(31, 122, 104, 0.07);
  overflow: hidden;
}

.brand-mark::before {
  content: "Pulse";
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  color: var(--accent-dark);
  font-family: var(--font-data);
  font-size: 5.5px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 5px;
  height: 11px;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 8px / 5px 2px no-repeat,
    linear-gradient(var(--warm-mark), var(--warm-mark)) 5px 2px / 2px 8px no-repeat,
    linear-gradient(var(--warm-mark), var(--warm-mark)) 7px 2px / 6px 2px no-repeat,
    linear-gradient(var(--warm-mark), var(--warm-mark)) 13px 2px / 2px 8px no-repeat,
    linear-gradient(var(--accent-dark), var(--accent-dark)) 15px 8px / 5px 2px no-repeat;
}

.site-nav-menu summary {
  display: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.site-nav a {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-nav a[aria-current="page"] {
  background: var(--success-soft);
  color: var(--accent-dark);
}

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

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 44px;
  padding-top: 92px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  color: var(--ink);
}

h1 {
  max-width: 760px;
  font-family: var(--font-display);
  font-size: clamp(46px, 7vw, 86px);
  font-weight: 700;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
}

h3 {
  font-size: 23px;
}

.lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.project-tags span,
.work-tech {
  border: 1px solid #cfded8;
  border-radius: 999px;
  background: #edf4f1;
  color: var(--accent-dark);
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 700;
}

.project-tags span {
  padding: 6px 10px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 700;
}

.primary-link {
  background: var(--accent);
  color: #ffffff;
}

.secondary-link {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.author-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pulse-card,
.content-card,
.result-figure,
.table-wrap,
.summary-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.pulse-card {
  padding: 24px;
  box-shadow: var(--shadow-lift);
}

.pulse-title {
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.pulse-line {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 10px;
  height: 230px;
  margin: 30px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(to right, rgba(216, 222, 216, 0.7) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(216, 222, 216, 0.7) 1px, transparent 1px);
  background-size: 52px 52px;
}

.pulse-line span {
  height: var(--h);
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--warm-mark), var(--accent));
}

.pulse-card p {
  margin: 0;
  color: var(--muted);
}

.two-column {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 36px;
  align-items: start;
}

.section-heading {
  margin-bottom: 24px;
}

.content-card {
  padding: 28px;
}

.content-card p {
  margin: 0;
  color: var(--muted);
}

.content-card p + p {
  margin-top: 14px;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.problem-card {
  min-height: 98px;
  display: flex;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.55;
}

.model-grid,
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.model-card {
  position: relative;
  overflow: hidden;
}

.card-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  border: 1px solid #cfded8;
  border-radius: 50%;
  color: var(--accent-dark);
  font-family: var(--font-data);
  font-weight: 700;
}

.model-card h3 {
  margin-bottom: 14px;
}

.parameter-list,
.pulse-notes {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.parameter-list li + li,
.pulse-notes li + li {
  margin-top: 8px;
}

.parameter-list strong,
.pulse-notes strong {
  color: var(--ink);
}

.formula-box {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #cfded8;
  border-radius: 8px;
  background: #f7faf8;
}

.formula-text {
  overflow-x: auto;
  color: var(--accent-dark);
  font-family: var(--font-data);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.formula-label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.result-figure {
  margin: 0;
  overflow: hidden;
}

.result-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #edf1ee;
}

.result-figure figcaption {
  padding: 14px 16px 16px;
  color: var(--muted);
  font-size: 14px;
}

.result-figure figcaption strong,
.result-figure figcaption span {
  display: block;
}

.result-figure figcaption strong {
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 4px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--accent-dark);
  font-family: var(--font-data);
  font-size: 13px;
  background: #edf4f1;
}

td {
  color: var(--muted);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.parameter-note {
  max-width: 840px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.work-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.work-list li + li {
  margin-top: 10px;
}

.work-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.work-step {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.work-number {
  display: block;
  margin-bottom: 18px;
  color: var(--accent-dark);
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 700;
}

.work-step h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.work-step p {
  margin: 0;
  color: var(--muted);
}

.work-tech {
  display: inline-flex;
  margin: 18px 0 0;
  padding: 8px 12px;
}

.summary-block {
  margin-bottom: 72px;
  padding: 36px;
}

.summary-block p:not(.eyebrow) {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.summary-block strong {
  color: var(--ink);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px max(20px, calc((100vw - var(--content-width)) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav-menu {
    width: 100%;
  }

  .site-nav-menu summary {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--accent-dark);
    cursor: pointer;
    font-weight: 700;
  }

  .site-nav-menu:not([open]) .site-nav {
    display: none;
  }

  .site-nav {
    justify-content: flex-start;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .two-column,
  .model-grid,
  .result-grid,
  .problem-grid,
  .work-flow {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 58px;
  }
}

@media (max-width: 520px) {
  .section-block {
    width: min(100% - 28px, var(--content-width));
    padding: 48px 0;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .content-card,
  .pulse-card,
  .summary-block {
    padding: 20px;
  }
}
