:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #101b29;
  --muted: #515e6e;
  --line: #dce4ec;
  --blue: #1262bb;
  --content: min(1152px, 89%);
  --sans: "Inter", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1,h2,h3,p { margin: 0; }
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a:focus-visible,button:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }
.skip { position: fixed; top: .4rem; left: .4rem; z-index: 10; transform: translateY(-170%); padding: .5rem .9rem; background: #fff; border-radius: 6px; }
.skip:focus { transform: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }

.masthead, .footer, .section { width: var(--content); margin-inline: auto; }
.masthead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; min-height: 67px; position: relative; z-index: 3; }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: .46rem; min-height: 44px; font-weight: 630; font-size: 1.43rem; line-height: 1; letter-spacing: -.055em; }
.brand svg { width: 33px; height: 25px; color: #105ba7; }
.masthead nav { display: flex; align-items: center; gap: clamp(1rem,3vw,2.4rem); }
.masthead [data-section] { min-height: 44px; display: inline-flex; align-items: center; font-size: .91rem; font-weight: 500; color: var(--muted); }
.masthead [data-section]:hover,.masthead [data-section][aria-current] { color: var(--ink); }
.masthead [data-section][aria-current] { text-decoration: underline; text-decoration-color: #6b96b9; text-underline-offset: .45rem; }
.project-nav { position: relative; }
.project-nav summary { position: relative; gap: .42rem; padding-inline: .65rem; border-radius: 8px; cursor: pointer; list-style: none; }
.project-nav summary::-webkit-details-marker { display: none; }
.project-nav summary::after { content: ''; width: 6px; height: 6px; margin-top: -3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.project-nav[open] summary { background: #f0f3f6; color: var(--ink); }
.project-nav[open] summary::after { margin-top: 3px; transform: rotate(225deg); }
.project-nav summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.project-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: 12.5rem; margin: 0; padding: .4rem; list-style: none;
  border: 1px solid var(--line); border-radius: 14px; background: #fbfcfd; box-shadow: 0 10px 28px rgb(23 44 63 / 10%), 0 2px 5px rgb(23 44 63 / 4%); }
.project-menu a { display: flex; align-items: center; min-height: 44px; padding: .45rem .85rem; border-radius: 8px; font-size: .92rem; line-height: 1.4; }
.project-menu a[aria-current="page"] { font-weight: 650; color: #184e79; }
.project-menu a:hover,.project-menu a:focus-visible { background: #eaf2f8; color: #184e79; }
.project-menu a:focus-visible { outline-offset: -2px; }
.primary, .secondary { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border-radius: 99px;
  padding: .55rem 1.25rem; border: 1px solid transparent; font-size: .9rem; font-weight: 570; line-height: 1.4; }
.primary { background: #102a44; color: #fff; }.primary:hover { background: #184572; }
.secondary { background: rgb(255 255 255 / 83%); border-color: rgb(40 79 108 / 25%); color: #152b40; }.secondary:hover { background: white; }

.hero { display: grid; place-items: center; position: relative; isolation: isolate; overflow: hidden; min-height: clamp(350px, 28.4vw, 460px);
  padding: clamp(38px,3.6vw,64px) 1.1rem clamp(45px,4vw,70px); background: #f3faff; scroll-margin-top: 70px; }
.hero-photo { position: absolute; z-index: -2; inset: 0; height: 100%; object-fit: cover; object-position: 50% 52%;
  filter: saturate(.88) blur(1px); transform: scale(1.014); animation: tide-settle 3.5s ease-out both; }
.hero::after { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 43% 75% at 50% 48%, rgb(242 252 255 / 78%), rgb(235 250 255 / 27%) 65%, transparent 100%),
    linear-gradient(180deg, rgb(255 255 255 / 83%) 0%, rgb(255 255 255 / 10%) 20%, transparent 64%, white 100%); }
@keyframes tide-settle { from { transform: scale(1.045); } to { transform: scale(1.014); } }
.hero-copy { width: 100%; text-align: center; }
.hero-mark { width: clamp(48px,4.3vw,66px); margin: 0 auto 1.1rem; color: #105588; }
.hero-mark svg { display: block; width: 100%; }
.hero h1 { font-size: clamp(2.8rem,4.85vw,5.2rem);
  font-weight: 590; line-height: 1.13; letter-spacing: -.064em; color: #0d2539; }
.hero-copy p { margin: .85rem auto 1.28rem; color: #284459; font-size: clamp(1rem,1.26vw,1.22rem); line-height: 1.7; }
.hero-actions { display: flex; justify-content: center; gap: .62rem; }
.hero-actions a { min-width: 107px; }

.section { scroll-margin-top: 18px; }
.works { padding-top: clamp(1.6rem,3.3vw,3.4rem); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.section-head h2 { font-size: clamp(1.4rem,1.8vw,1.9rem); font-weight: 590; line-height: 1.35; letter-spacing: -.045em; }
.filters { display: flex; align-items: center; gap: .22rem; }
.filters button { padding: .35rem .82rem; min-height: 36px; border: 0; border-radius: 99px; background: transparent; color: var(--muted); font-size: .84rem; }
.filters button[aria-pressed=true] { background: #eaf3fb; color: #184e79; font-weight: 560; }
.filters button:hover { background: #f0f6fa; }
.project-list { border-top: 1px solid var(--line); }
.project-feature { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.75fr); align-items: end;
  gap: clamp(2rem,5vw,5rem); padding-block: clamp(2rem,3.9vw,4rem); border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.feature-copy { max-width: 24rem; }
.feature-copy h3 { margin: .55rem 0 1rem; font-size: clamp(2rem,3.2vw,3.1rem); font-weight: 600; line-height: 1.08; letter-spacing: -.055em; }
.feature-copy p,.project-intro-copy p { color: #405061; font-size: clamp(1rem,1.22vw,1.15rem); line-height: 1.85; }
.feature-actions,.project-page-links { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem 1.5rem; }
.feature-actions { margin-top: 1rem; }
.feature-actions a,.project-page-links a { display: inline-flex; align-items: center; min-height: 44px; gap: .55rem;
  color: #174f7a; font-weight: 560; font-size: .94rem; }
.feature-actions a:hover,.project-page-links a:hover { text-decoration: underline; text-underline-offset: .25rem; }
.category { color: var(--muted); font-size: .81rem; line-height: 1.45; }

.notebook { padding-block: clamp(2.4rem,4vw,4.5rem); }
.note-card { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.35fr); align-items: center; gap: clamp(1.5rem,3.2vw,3rem);
  padding: clamp(1rem,2vw,1.7rem); border-radius: 17px; background: #f3f8fc; border: 1px solid var(--line); }
.note-card + .note-card { margin-top: clamp(.85rem,1.5vw,1.25rem); }
.note-card.text-note { display: block; overflow-wrap: anywhere; }
.all-notes { display: inline-flex; align-items: center; min-height: 44px; color: #245477; font-size: .94rem; }
.all-notes:hover { text-decoration: underline; text-underline-offset: .25em; }
.note-photo { border-radius: 10px; overflow: hidden; aspect-ratio: 2.45; background: #e6edf5; }
.note-photo img { width: 100%; height: 100%; object-fit: cover; }
.note-copy h3 { margin: .32rem 0 .45rem; font-size: clamp(1.22rem,1.85vw,1.75rem); font-weight: 570; line-height: 1.4; letter-spacing: -.03em; }
.note-card:hover h3 { color: var(--blue); }
.note-copy p { color: var(--muted); line-height: 1.75; font-size: .96rem; }
.text-link,.note-links a,.note-source a,.crumb a:hover { text-decoration: underline; text-underline-offset: .3rem; text-decoration-color: #97b5cb; }
.text-link { display: inline-block; margin-top: .72rem; color: #245477; font-size: .88rem; }
.footer { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; column-gap: 1rem; border-top: 1px solid var(--line); padding-block: .85rem 1.5rem; }
.footer-contact { display: inline-flex; justify-self: center; align-items: center; gap: .5rem; min-height: 44px; color: #245477; font-size: .9rem; }
.footer-contact::before { content: ""; width: 1.1rem; height: 1.1rem; background: currentColor; mask: url("mail.svg") center / contain no-repeat; }
.footer-contact:hover, .footer-contact:focus-visible { text-decoration: underline; text-underline-offset: .2em; }
.footer .brand { font-size: 1.15rem; }.footer .brand svg { width: 25px; }
.footer-top { display: inline-flex; justify-self: end; align-items: center; min-height: 44px; color: var(--muted); font-size: .85rem; }

.project-page { width: var(--content); margin: auto; }
.project-intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.18fr); align-items: center;
  gap: clamp(2rem,5vw,5rem); padding: clamp(2.2rem,4.8vw,5rem) 0; }
.project-intro-copy h1 { margin: .8rem 0 1rem; font-size: clamp(2.65rem,5.4vw,5rem); line-height: 1.04; letter-spacing: -.064em; font-weight: 600; }
.app-actions,.live-demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.app-actions { margin: 1.25rem 0 .68rem; }
.project-intro-copy .app-release { font-size: .82rem; line-height: 1.65; color: var(--muted); }
.app-open-help { margin-top: .8rem; font-size: .88rem; line-height: 1.65; color: var(--ink); }
.app-open-help ol { margin: .25rem 0 0; padding-inline-start: 1.5em; }
.live-demo { border-top: 1px solid var(--line); padding-block: clamp(1.8rem,3.8vw,3.5rem); scroll-margin-top: 1rem; }
.live-demo-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .9rem 1.5rem; margin-bottom: 1.1rem; }
.live-demo-head h2 { font-size: clamp(1.45rem,2.3vw,2.2rem); line-height: 1.25; font-weight: 590; letter-spacing: -.04em; }
.live-demo-head p { margin-top: .5rem; color: var(--muted); font-size: .94rem; }
.live-demo-actions :is(a,button) { display: inline-flex; min-height: 44px; align-items: center; padding: .45rem .85rem; border-radius: 9px;
  font: 520 .88rem/1.45 var(--sans); color: #244969; background: #fff; }
.live-demo-actions button { border: 1px solid #cddce7; }
.live-demo-actions :is(a,button):hover { background: #eff6fb; }
.live-demo iframe { display: block; width: 100%; height: clamp(560px,78vh,850px); border: 1px solid var(--line); border-radius: 14px; background: #f5f7fb; }
.feature-chapter { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.6fr); gap: 2rem;
  border-top: 1px solid var(--line); padding-block: clamp(1.8rem,3.8vw,4rem); }
.feature-chapter h2 { font-size: clamp(1.45rem,2.3vw,2.2rem); font-weight: 590; letter-spacing: -.04em; }
.feature-chapter ul { list-style: none; padding: 0; margin: 0; }
.feature-chapter li + li { margin-top: 1.35rem; padding-top: 1.35rem; border-top: 1px solid #e7edf2; }
.feature-chapter h3 { margin: .1rem 0 .45rem; font-size: 1.13rem; font-weight: 600; line-height: 1.5; }
.feature-chapter p { color: #405061; line-height: 1.85; }
.walkthrough-intro { display: block; padding-bottom: clamp(1.5rem,3vw,3rem); }
.screenshot-step { margin: 0; align-items: center; }
.screenshot-step figcaption p { margin-top: .65rem; }
.screenshot-step img { height: auto; border: 1px solid var(--line); border-radius: 12px; }
.project-page-links { justify-content: space-between; padding: 1.1rem 0 2rem; }

.story-hero { width: var(--content); margin: .65rem auto 0; display: grid; align-items: center; grid-template-columns: 1.2fr 1fr; gap: clamp(1.5rem,3vw,3rem);
  padding: clamp(1.5rem,3.3vw,3.4rem); border-radius: 20px; border: 1px solid #d5e4f1; background: linear-gradient(128deg,#eef7fe,#f8fbfe 63%,#e1f1fc); }
.story-hero>img { aspect-ratio: 2.03; object-fit: cover; border-radius: 12px; background: #e4edf4; }
.crumb { display: flex; align-items: center; gap: .6rem; font-size: .87rem; color: #436177; }
.crumb a { display: inline-flex; align-items: center; min-height: 36px; }
.story-intro h1 { margin: .35rem 0 .72rem; font-size: clamp(2.3rem,4.1vw,4.5rem); font-weight: 550; letter-spacing: -.05em; line-height: 1.15; text-wrap: balance; }
.story-intro>p { color: #42586b; font-size: 1.03rem; line-height: 1.8; }
.visit { max-width: 100%; display: inline-flex; align-items: center; flex-wrap: wrap; gap: .24rem .7rem; margin: .15rem 0 .85rem; min-height: 44px;
  padding: .5rem .85rem; border-radius: 10px; background: #fff; color: #174e7c; border: 1px solid #b7cfe3; }
.visit:hover { background: #eff7ff; }.visit strong { font-size: .91rem; }.visit span { overflow-wrap: anywhere; font-size: .87rem; text-decoration: underline; text-underline-offset: 3px; }
.reading { width: min(46rem,var(--content)); margin: auto; padding-block: clamp(2rem,4vw,4.2rem); }
.reading section+section { margin-top: 1.8rem; }
.reading h2 { font-weight: 580; font-size: clamp(1.32rem,1.8vw,1.7rem); line-height: 1.5; letter-spacing: -.03em; margin-bottom: .5rem; }
.reading p { color: #384757; font-size: 1.04rem; line-height: 1.95; }
.reading p strong { color: #142e45; font-weight: 700; background: linear-gradient(transparent 68%, #dcebf5 68%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.reading p + p { margin-top: .8rem; }
.reading .note-concept { margin-top: 1.3rem; border-top: 1px solid var(--line); padding-top: 1.15rem; }
.note-concept h3 { margin-bottom: .4rem; font-size: 1.15rem; font-weight: 650; line-height: 1.5; color: #1c496b; }
.note-use-label { color: var(--ink); font-weight: 650; }
.note-concept p + p { margin-top: .5rem; }
.note-excerpt { margin: 1.1rem 0 0; padding: .9rem 1.1rem; border-inline-start: 3px solid #85a8be; background: #f4f8fb; overflow-wrap: anywhere; }
.note-excerpt blockquote { margin: 0; color: #253f55; line-height: 1.9; white-space: pre-line; }
.note-excerpt figcaption { margin-top: .45rem; font-size: .88rem; line-height: 1.6; color: var(--muted); }
.reading section[id] { scroll-margin-block-start: 1.25rem; }
.note-flow { margin-bottom: 2rem; padding: clamp(1rem,2.6vw,1.5rem); border: 1px solid var(--line); border-radius: 14px; background: #f7fafc; }
.reading .note-flow h2 { margin-bottom: .55rem; font-size: 1.18rem; }
.note-flow ol { padding: 0; margin: 0; list-style: none; }
.note-flow li { position: relative; padding-inline-start: 1.4rem; }
.note-flow li::before { position: absolute; content: ''; top: 1.36rem; left: 0; box-sizing: border-box; width: .55rem; height: .55rem; border: 2px solid #467799; border-radius: 50%; transform: translateY(-50%); background: #fff; z-index: 1; }
.note-flow li:not(:last-child)::after { position: absolute; content: ''; top: 1.36rem; bottom: -1.36rem; left: .275rem; width: 1px; background: #adc7d8; }
.note-flow a { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2.2fr); align-items: baseline; gap: .3rem 1rem;
  min-height: 44px; padding: .65rem 0; line-height: 1.5; overflow-wrap: anywhere; }
.note-flow li + li a { border-top: 1px solid var(--line); }
.note-flow strong { color: #245477; font-size: .95rem; font-weight: 600; }
.note-flow a:is(:hover,:focus-visible) strong { text-decoration: underline; text-underline-offset: .22rem; }
.note-flow span,.note-equations dd { color: var(--muted); font-size: .91rem; }
.note-equations { margin: 1rem 0 0; padding: .85rem 1rem; border-inline-start: 3px solid #85a8be; background: #f4f8fb; overflow-wrap: anywhere; }
.note-equations div + div { margin-top: .85rem; }
.note-equations dt { font: .98rem/1.65 ui-monospace,Menlo,Consolas,monospace; color: #173b57; white-space: pre-wrap; }
.note-equations dd { margin: .2rem 0 0; line-height: 1.7; }
.note-table { width: 100%; margin-top: 1.2rem; border-collapse: collapse; table-layout: fixed; overflow-wrap: anywhere; font-size: .94rem; line-height: 1.65; }
.note-table caption { margin-bottom: .5rem; text-align: start; font-weight: 600; }
.note-table :is(th,td) { padding: .65rem .75rem; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.note-table thead { background: #edf4f9; }
.note-table th { font-weight: 580; }
.note-table thead th:first-child { width: 23%; }
.reading .note-source { margin-top: .8rem; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.note-source a,.note-links a { color: #245477; }
.note-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .2rem 1.25rem; border-top: 1px solid var(--line); margin-top: 2rem; padding-top: .7rem; }
.note-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }
@media(max-width:900px) {
  :root { --content: 92%; }
}
@media(max-width:760px) {
  .project-feature,.project-intro,.feature-chapter { grid-template-columns: minmax(0,1fr); gap: 1.2rem; }
  .feature-copy { max-width: 37rem; }
  .feature-copy h3 { margin: .3rem 0 .55rem; }
  .feature-actions { margin-top: .25rem; }
}
@media(max-width:680px) {
  :root { --content: calc(100% - 2rem); }
  .masthead { min-height: 60px; grid-template-columns: 1fr auto; gap: .75rem; }
  .brand { font-size: 1.21rem; gap: .3rem; }.brand svg { width: 28px; }
  .masthead nav { gap: .8rem; }.masthead [data-section] { font-size: .82rem; }.masthead [data-section="intro"] { display: none; }
  .project-nav summary { padding-inline: .3rem; }
  .project-menu { left: auto; right: 0; transform: none; }
  .hero { min-height: 333px; padding: 2.5rem 1rem 3.3rem; scroll-margin-top: 60px; }
  .hero-photo { object-position: 49% 52%; }.hero-mark { width: 52px; margin-bottom: .9rem; }
  .hero h1 { font-size: clamp(2rem,7.6vw,2.85rem); }
  .hero-copy p { margin: .7rem auto 1.05rem; font-size: .96rem; }
  .hero-copy p span { display: block; }.hero-actions a { min-width: 94px; padding: .5rem 1rem; font-size: .86rem; }
  .section-head { flex-wrap: wrap; gap: .55rem; }.section-head h2 { font-size: 1.45rem; }
  .filters { gap: 0; }.filters button { min-height: 38px; padding: .25rem .55rem; font-size: .79rem; }
  .category { font-size: .79rem; }
  .note-card,.story-hero { grid-template-columns: 1fr; gap: 1rem; }
  .note-card { padding: .85rem; }.note-photo { aspect-ratio: 2.6; }
  .story-hero { margin-top: .3rem; padding: 1.1rem; border-radius: 14px; }.story-hero>img { aspect-ratio: 2.7; }
  .story-intro>p,.reading p { font-size: 1rem; }.visit span { font-size: .82rem; }
  .note-table :is(th,td) { padding: .55rem .4rem; }
}
@media(max-width:30rem) {
  .note-flow a { grid-template-columns: minmax(0,1fr); gap: .12rem; }
  .footer { grid-template-columns: 1fr 1fr; }
  .footer-contact { grid-row: 2; grid-column: 1 / -1; }
}
@media(max-width:360px) {
  .masthead { gap: .45rem; }.masthead nav { gap: .55rem; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { transition: none !important; animation: none !important; }
}
