:root {
  color-scheme: light;
  --canvas: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #efefec;
  --ink: #161616;
  --muted: #5d5d59;
  --faint: #d6d6d1;
  --blue: #1357e5;
  --signal: #e64c32;
  --green: #16705a;
  --max: 1180px;
  --article: 820px;
  --serif: "Iowan Old Style", Georgia, "Songti SC", STSong, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--blue);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(19, 87, 229, 0.35);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-150%);
  padding: 8px 12px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-head,
.page,
.site-foot {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

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

.article-page-wide {
  width: min(calc(100% - 48px), 1080px);
}

.site-head {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--ink);
  padding: 16px 0;
}

.site-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}

.site-brand:hover {
  color: var(--ink);
}

.site-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--surface);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 800;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 750;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  padding: 0 10px;
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--blue);
  color: var(--blue);
}

.page {
  padding-bottom: 72px;
}

.home-hero {
  position: relative;
  min-height: 510px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 72px;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  padding: 68px 0 64px;
}

.home-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 64px;
  width: 56px;
  height: 6px;
  background: var(--signal);
}

.home-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 88px;
  font-weight: 750;
  line-height: 0.96;
  overflow-wrap: anywhere;
}

.home-hero h1 span {
  display: block;
  margin-top: 10px;
  color: var(--blue);
  font-size: 0.62em;
  font-style: italic;
  font-weight: 500;
}

.lede {
  max-width: 580px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.55;
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 30px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 750;
}

.intro-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.intro-links a::after {
  content: "↗";
  margin-left: 6px;
  color: var(--blue);
}

.portrait {
  justify-self: end;
  width: 280px;
}

.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--ink);
  background: var(--surface);
  object-fit: cover;
  box-shadow: 10px 10px 0 var(--signal);
}

.home-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 72px;
  align-items: start;
  padding: 58px 0 12px;
}

.content-section + .content-section {
  margin-top: 56px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding-bottom: 14px;
}

.section-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.1;
}

.section-header a {
  flex: 0 0 auto;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.posts-list,
.project-list {
  border-top: 1px solid var(--ink);
}

.post-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 26px;
  border-bottom: 1px solid var(--faint);
  padding: 24px 0 26px;
}

.post-date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.post-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 750;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.post-title a {
  text-decoration: none;
}

.post-excerpt {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.project-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--faint);
  padding: 21px 0;
  color: var(--ink);
  text-decoration: none;
}

.project-index {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.project-item h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.2;
}

.project-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.project-arrow {
  color: var(--blue);
  font-size: 20px;
  line-height: 1;
  transition: transform 160ms ease;
}

.project-item:hover .project-arrow {
  transform: translateX(4px);
}

.article-hero {
  border-bottom: 1px solid var(--ink);
  padding: 64px 0 40px;
}

.article-hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 56px;
  align-items: end;
}

.back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin: -8px 0 22px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.kicker,
.meta {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.kicker {
  display: block;
  margin-bottom: 16px;
}

.article-hero h1,
.page-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 750;
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.page-title {
  font-size: 72px;
}

.article-hero h1 em,
.page-title em {
  color: var(--blue);
  font-style: italic;
  font-weight: 500;
}

.page-intro {
  max-width: 740px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 28px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.article-aside {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 18px 0;
}

.article-aside h2 {
  margin: 0 0 10px;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 12px;
}

.workflow-list {
  margin: 0;
  padding: 0;
  display: grid;
  list-style: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.workflow-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid var(--faint);
  padding: 9px 0;
}

.workflow-list span {
  color: var(--blue);
}

.article-body {
  padding: 42px 0 84px;
}

.article-body > p,
.article-body > h2,
.article-body > .callout,
.article-body > .source-row,
.article-body > .prompt-box {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.article-body p {
  margin-top: 0;
  margin-bottom: 22px;
}

.article-body h2 {
  margin-top: 52px;
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.2;
}

.article-body h3 {
  margin: 34px 0 12px;
  font-size: 21px;
  line-height: 1.35;
}

.article-body li + li {
  margin-top: 8px;
}

.callout {
  margin-top: 34px;
  margin-bottom: 38px;
  border-left: 5px solid var(--signal);
  background: var(--surface);
  padding: 18px 22px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 750;
  line-height: 1.45;
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  margin-bottom: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  padding: 0 16px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

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

.process-list {
  max-width: 760px;
  margin: 30px auto 48px;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
  counter-reset: process;
}

.process-list li {
  counter-increment: process;
  display: grid;
  grid-template-columns: 42px 180px minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--faint);
  padding: 18px 0;
}

.process-list li::before {
  content: "0" counter(process);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 750;
}

.process-list strong {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.3;
}

.process-list span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.case-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px;
  margin: 48px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 34px 0;
}

.case-panel h2 {
  margin-top: 0;
}

.case-metrics,
.fact-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.metric,
.fact-list li {
  border-bottom: 1px solid var(--faint);
  padding: 14px 0;
}

.metric b {
  display: block;
  color: var(--blue);
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
}

.metric span,
.fact-list strong {
  display: block;
  margin-bottom: 5px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
}

.prompt-box {
  margin-top: 28px;
  margin-bottom: 38px;
  overflow-x: auto;
  background: var(--ink);
  color: #fff;
  padding: 20px;
}

.prompt-box pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.work-list {
  margin: 0 0 84px;
}

.work-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 120px;
  gap: 28px;
  align-items: start;
  border-bottom: 1px solid var(--faint);
  padding: 30px 0;
  color: var(--ink);
  text-decoration: none;
}

.work-row .work-number {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.work-row h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.15;
}

.work-row p {
  max-width: 700px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.work-kind {
  justify-self: end;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}

.work-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 56px;
  padding: 38px 0 84px;
}

.work-detail .article-body {
  padding: 0;
}

.work-detail .article-body > p,
.work-detail .article-body > .source-row {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.comparison-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 34px 0 44px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.comparison-summary div {
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--surface);
  padding: 16px;
}

.comparison-summary b {
  display: block;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11px;
}

.comparison-summary span {
  display: block;
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 750;
  line-height: 1.2;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0 50px;
}

.screenshot-card {
  margin: 0;
  border: 1px solid var(--ink);
  background: var(--surface);
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--ink);
  object-fit: cover;
}

.screenshot-card figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 30px 0 56px;
}

.demo-frame {
  min-width: 0;
  border: 1px solid var(--ink);
  background: var(--surface);
}

.demo-frame header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--ink);
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
}

.demo-frame iframe {
  width: 100%;
  height: 520px;
  display: block;
  border: 0;
  background: #fff;
}

.demo-frame a {
  color: var(--blue);
}

.article-figure {
  margin: 28px 0 40px;
  border: 1px solid var(--ink);
  background: var(--surface);
}

.article-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.article-figure figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
}

.living-web-embed {
  width: 100%;
  margin: 28px 0 12px;
  border: 1px solid var(--ink);
  background: #070a09;
}

.living-web-embed iframe {
  display: block;
  width: 100%;
  min-height: 780px;
  border: 0;
  background: #070a09;
}

.embed-note {
  margin: 0 0 40px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.prompt-box code {
  display: block;
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .living-web-embed iframe {
    min-height: 680px;
  }
}

.site-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--ink);
  padding: 24px 0 44px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.foot-links a {
  color: var(--ink);
  text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
  .post-item,
  .work-row,
  .button {
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  }

  .post-item:hover,
  .work-row:hover {
    transform: translateX(4px);
  }
}

@media (max-width: 900px) {
  .home-hero,
  .home-columns,
  .article-hero-split,
  .case-panel,
  .work-detail {
    grid-template-columns: 1fr;
  }

  .home-hero {
    gap: 46px;
  }

  .home-hero h1 {
    font-size: 72px;
  }

  .portrait {
    justify-self: start;
  }

  .home-columns {
    gap: 56px;
  }

  .article-hero h1 {
    font-size: 56px;
  }

  .page-title {
    font-size: 60px;
  }

  .article-aside {
    max-width: 520px;
  }

  .comparison-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screenshot-grid,
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .demo-frame iframe {
    height: 500px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .site-head,
  .page,
  .article-page,
  .site-foot {
    width: min(calc(100% - 32px), var(--max));
  }

  .site-head {
    min-height: 68px;
    gap: 12px;
    padding: 12px 0;
  }

  .site-brand {
    gap: 9px;
    font-size: 15px;
  }

  .site-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 16px;
  }

  .site-nav {
    gap: 0;
  }

  .site-nav a {
    min-height: 44px;
    padding: 0 8px;
  }

  .home-hero {
    min-height: auto;
    gap: 32px;
    padding: 52px 0 36px;
  }

  .home-hero::before {
    top: 46px;
    width: 42px;
    height: 5px;
  }

  .home-hero h1 {
    font-size: 52px;
    line-height: 1;
  }

  .home-hero h1 span {
    margin-top: 8px;
    font-size: 0.72em;
  }

  .lede {
    margin-top: 22px;
    font-size: 19px;
  }

  .intro-links {
    margin-top: 20px;
  }

  .portrait {
    width: min(210px, calc(100vw - 54px));
  }

  .home-columns {
    padding-top: 44px;
  }

  .section-header h2 {
    font-size: 30px;
  }

  .post-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 0 22px;
  }

  .post-title {
    font-size: 26px;
  }

  .article-hero {
    padding: 48px 0 32px;
  }

  .article-hero h1 {
    font-size: 40px;
    line-height: 1.12;
  }

  .page-title {
    font-size: 48px;
  }

  .page-intro {
    margin-top: 18px;
    font-size: 18px;
  }

  .article-body {
    padding-top: 32px;
  }

  .article-body h2 {
    margin-top: 42px;
    font-size: 29px;
  }

  .callout {
    font-size: 20px;
  }

  .process-list li {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
  }

  .process-list span {
    grid-column: 2;
  }

  .work-row {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 14px;
    padding: 24px 0;
  }

  .work-row h2 {
    font-size: 30px;
  }

  .work-kind {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .comparison-summary {
    grid-template-columns: 1fr;
  }

  .site-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .site-brand {
    max-width: 150px;
  }

  .site-brand span:last-child {
    overflow-wrap: anywhere;
  }

  .home-hero h1 {
    font-size: 46px;
  }

  .article-hero h1 {
    font-size: 36px;
  }
}
