@import url('./highlight.css');
:root {
  --paper:#f8f7f4;
  --surface:#fff;
  --ink:#242b27;
  --muted:#707972;
  --green:#245c44;
  --sage:#e8eee7;
  --line:#dedfd9;
  --serif:Georgia,'Songti SC','Noto Serif CJK SC',serif;
  --sans:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
}

* {
  box-sizing:border-box;
}

html {
  scroll-behavior:smooth;
  scroll-padding-top:32px;
}

body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font:16px/1.7 var(--sans);
  -webkit-font-smoothing:antialiased;
}

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

button,input,select {
  font:inherit;
}

button,a,input,summary,select {
  -webkit-tap-highlight-color:transparent;
}

button {
  cursor:pointer;
}

button:disabled {
  cursor:default;
  opacity:.4;
}

button,input,select {
  color:inherit;
}

a,button {
  touch-action:manipulation;
}

a:focus-visible,button:focus-visible,summary:focus-visible,select:focus-visible,input:focus-visible {
  outline:3px solid var(--green);
  outline-offset:5px;
}

[hidden] {
  display:none!important;
}

.wrap {
  width:calc(100% - 96px);
  max-width:1248px;
  margin-inline:auto;
}

.icon {
  width:20px;
  height:20px;
  flex:none;
  vertical-align:middle;
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.skip-link {
  position:fixed;
  top:-100px;
  left:20px;
  background:var(--green);
  color:white;
  padding:10px 20px;
  z-index:100;
}

.skip-link:focus {
  top:12px;
}

.site-header {
  height:72px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid var(--line);
}

.wordmark {
  font:700 28px var(--serif);
  letter-spacing:-.7px;
  display:flex;
  align-items:center;
  gap:9px;
}

.brand-dot {
  display:inline-block;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--green);
  margin-left:7px;
}

.site-header nav {
  display:flex;
  align-items:center;
  gap:40px;
  height:100%;
}

.site-header nav a {
  position:relative;
  display:flex;
  gap:5px;
  align-items:center;
  font-size:15px;
  height:100%;
}

.site-header nav a:hover {
  color:var(--green);
}

.site-header nav a[aria-current] {
  color:var(--green);
  font-weight:600;
}

.site-header nav a[aria-current]:after {
  content:'';
  position:absolute;
  height:2px;
  background:var(--green);
  bottom:16px;
  left:0;
  right:0;
}

.site-header nav .icon {
  width:14px;
  height:14px;
}

.hero {
  display:grid;
  grid-template-columns:1.65fr 1fr;
  align-items:center;
  padding:65px 0 72px;
  border-bottom:1px solid var(--line);
  gap:25px;
}

.hero h1 {
  font:600 clamp(38px,4.7vw,68px)/1.35 var(--serif);
  letter-spacing:-2px;
  margin:0 0 22px;
  white-space:nowrap;
}

.hero h1 em {
  color:var(--green);
  font-style:normal;
}

.hero>div>p {
  font-size:22px;
  color:var(--muted);
  margin:0;
}

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

.button {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  border:1px solid #a7aea6;
  border-radius:7px;
  background:transparent;
  padding:11px 26px;
  font-size:15px;
  line-height:1.7;
  transition:background .18s,border-color .18s,transform .18s;
}

.button:hover {
  background:var(--sage);
  border-color:var(--green);
}

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

.button.primary:hover {
  background:#194832;
}

.hero-type {
  position:relative;
  text-align:center;
  min-width:0;
  height:320px;
  display:grid;
  place-items:center;
}

.hero-type>span {
  position:absolute;
  color:#d5dcd1;
  font:420px/.8 var(--serif);
  top:-36px;
  left:50%;
  transform:translateX(-50%);
}

.hero-type>p {
  position:relative;
  font:35px var(--serif)!important;
  color:var(--ink)!important;
  white-space:nowrap;
}

.section {
  margin-top:48px;
}

.section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:23px;
}

.section-heading h2,.archive-projects h2 {
  font:600 32px/1.4 var(--serif);
  margin:0;
}

.text-link {
  color:var(--green);
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:15px;
  white-space:nowrap;
  flex-shrink:0;
}

.text-link:hover {
  text-decoration:underline;
  text-underline-offset:5px;
}

.project-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

.project-card {
  position:relative;
  display:grid;
  grid-template-columns:64px 1fr;
  column-gap:24px;
  row-gap:8px;
  align-content:start;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  padding:29px 35px 29px 28px;
  min-height:170px;
  transition:transform .2s,border-color .2s,box-shadow .2s;
}

.project-card:hover {
  transform:translateY(-3px);
  border-color:#9bac9d;
  box-shadow:0 8px 22px #243b2a08;
}

.project-icon {
  grid-column:1;
  grid-row:1/4;
  width:64px;
  height:64px;
  display:grid;
  place-items:center;
  background:var(--sage);
  color:var(--green);
  border-radius:12px;
}

.project-icon .icon {
  width:32px;
  height:32px;
}

.project-arrow {
  position:absolute;
  top:28px;
  right:23px;
  color:var(--muted);
  width:21px;
  height:21px;
}

.project-card h3 {
  grid-column:2;
  font:700 23px/1.4 var(--serif);
  letter-spacing:-.5px;
  margin:0;
  padding-right:12px;
  overflow-wrap:anywhere;
}

.project-card p {
  grid-column:2;
  margin:0;
  color:var(--muted);
  font-size:15px;
  line-height:1.75;
}

.project-tags {
  grid-column:2;
  font-size:13px;
  color:var(--muted);
  margin-top:2px;
}

.latest {
  margin-top:65px;
}

.latest .article-row h2 {
  font-size:25px;
}

.site-footer {
  margin-top:60px;
  border-top:1px solid var(--line);
  padding:25px 0 30px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:13px;
  color:var(--muted);
}

.footer-brand {
  font:18px var(--serif);
  color:var(--ink);
}

.page-intro {
  text-align:center;
  padding:32px 0 22px;
}

.page-intro h1 {
  font:600 46px/1.4 var(--serif);
  margin:0 0 12px;
  letter-spacing:-1px;
}

.page-intro p {
  font-size:19px;
  color:var(--muted);
  margin:0;
}

.search-form {
  display:flex;
  align-items:center;
  gap:14px;
  max-width:820px;
  margin:0 auto 30px;
  border:1px solid #c8ccc5;
  border-radius:7px;
  padding:12px 18px;
  background:transparent;
}

.search-form .icon {
  color:var(--muted);
}

.search-form:focus-within {
  border-color:var(--green);
  box-shadow:0 0 0 2px #245c4410;
}

.search-form input {
  width:100%;
  min-width:0;
  outline:none;
  background:transparent;
  border:0;
  font-size:15px;
  height:29px;
}

.search-form input:focus-visible {
  outline:none;
}

.search-form input::placeholder {
  color:#7b837d;
}

.search-form button {
  border:0;
  background:transparent;
  font-size:13px;
  color:var(--green);
  padding:4px;
  white-space:nowrap;
}

.blog-layout {
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:30px;
  align-items:start;
  max-width:1160px;
  margin:0 auto;
}

.categories {
  position:sticky;
  top:28px;
  padding-right:28px;
  border-right:1px solid var(--line);
}

.category-link {
  display:block;
  padding:9px 14px;
  margin-bottom:4px;
  font-size:15px;
  border-radius:6px;
}

.category-link:hover {
  background:#eef0e9;
  color:var(--green);
}

.category-link.selected {
  color:var(--green);
  background:#dfe7dd;
  font-weight:600;
}

.more-categories summary {
  padding:9px 14px;
  cursor:pointer;
  color:var(--muted);
  font-size:15px;
}

.more-categories .category-link {
  font-size:14px;
}

.list-toolbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border-bottom:1px solid var(--line);
  padding:0 0 13px;
  font-size:15px;
}

.list-toolbar p {
  margin:0;
  font-weight:600;
}

.list-toolbar p span {
  font-weight:400;
  color:var(--muted);
  font-size:12px;
  margin-left:9px;
}

.sort-label select {
  background:transparent;
  border:0;
  font-size:13px;
  color:var(--muted);
  padding:5px 0;
  cursor:pointer;
  max-width:140px;
}

.article-row {
  padding:22px 0 18px;
  border-bottom:1px solid var(--line);
}

.article-meta {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  line-height:1.7;
  color:var(--muted);
  flex-wrap:wrap;
}

.article-meta a {
  color:var(--green);
}

.article-row h2 {
  font:600 25px/1.45 var(--serif);
  margin:7px 0 8px;
  overflow-wrap:anywhere;
}

.article-row h2 a:hover {
  color:var(--green);
}

.article-row p {
  color:var(--muted);
  font-size:14px;
  line-height:1.8;
  margin:0 0 10px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.read-link {
  color:var(--green);
  font-size:13px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.read-link:hover {
  text-decoration:underline;
  text-underline-offset:4px;
}

.read-link .icon {
  width:23px;
}

.pagination {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-top:30px;
}

.pagination .button {
  font-size:13px;
  padding:6px 16px;
}

.pagination span {
  font-size:13px;
  color:var(--muted);
}

#empty-state {
  text-align:center;
  padding:60px 12px;
}

#empty-state h2 {
  font:600 27px var(--serif);
}

#empty-state p {
  color:var(--muted);
  font-size:14px;
}

.archive-projects {
  margin-top:60px;
}

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

.archive-row {
  display:grid;
  grid-template-columns:170px 1fr auto;
  align-items:center;
  gap:20px;
  border-top:1px solid var(--line);
  padding:23px 0;
}

.archive-row>a,.archive-name {
  font:600 22px var(--serif);
}

.archive-row>a {
  display:flex;
  gap:9px;
  align-items:center;
}

.archive-row>a:hover {
  color:var(--green);
}

.archive-row p {
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.archive-row>span:last-child {
  font-size:12px;
  color:var(--muted);
}

.article-page {
  max-width:1120px;
}

.article-back {
  margin-top:33px;
}

.article-heading {
  max-width:780px;
  padding:28px 0 34px;
  border-bottom:1px solid var(--line);
  margin-bottom:35px;
}

.article-heading h1 {
  font:600 40px/1.4 var(--serif);
  margin:16px 0 0;
  overflow-wrap:anywhere;
}

.reading-layout {
  display:grid;
  grid-template-columns:minmax(0,780px) minmax(0,240px);
  gap:60px;
  align-items:start;
}

.prose {
  font-size:17px;
  line-height:1.95;
  min-width:0;
  overflow-wrap:break-word;
}

.prose>*:first-child {
  margin-top:0;
}

.prose p {
  margin:0 0 24px;
}

.prose h2 {
  font:600 29px/1.5 var(--serif);
  margin:48px 0 22px;
}

.prose h3 {
  font:600 23px/1.5 var(--serif);
  margin:32px 0 18px;
}

.prose h4 {
  font-size:19px;
}

.prose a {
  color:var(--green);
  text-decoration:underline;
  text-underline-offset:4px;
  overflow-wrap:anywhere;
}

.prose img {
  display:block;
  max-width:100%;
  height:auto;
  border-radius:6px;
  margin:24px auto;
}

.prose pre {
  position:relative;
  background:#f0f1eb;
  border:1px solid var(--line);
  border-radius:8px;
  padding:22px;
  overflow-x:auto;
  font-size:13px;
  line-height:1.8;
  max-width:100%;
}

.prose code {
  font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',monospace;
}

.prose :not(pre)>code {
  font-size:.86em;
  background:#e9ece4;
  padding:3px 5px;
  border-radius:4px;
  overflow-wrap:anywhere;
}

.prose pre code {
  background:transparent;
}

.prose blockquote {
  margin:28px 0;
  border-left:3px solid #9cae99;
  padding:12px 23px;
  background:#eef0e9;
  color:#5e6c60;
}

.prose blockquote p:last-child {
  margin-bottom:0;
}

.prose ul,.prose ol {
  padding-left:25px;
}

.prose li {
  margin:7px 0;
}

.prose li>p {
  margin-bottom:10px;
}

.prose table {
  display:block;
  overflow-x:auto;
  border-collapse:collapse;
  width:100%;
  font-size:14px;
  margin-bottom:28px;
}

.prose th,.prose td {
  border:1px solid var(--line);
  padding:9px 14px;
  min-width:95px;
}

.prose th {
  background:var(--sage);
  text-align:left;
}

.prose hr {
  border:0;
  border-top:1px solid var(--line);
  margin:40px 0;
}

.toc {
  position:sticky;
  top:30px;
  border-left:1px solid var(--line);
  padding-left:22px;
}

.toc summary {
  font-size:14px;
  font-weight:600;
  margin-bottom:18px;
  cursor:pointer;
}

.toc nav {
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:70vh;
  overflow-y:auto;
}

.toc-link {
  font-size:12px;
  line-height:1.7;
  color:var(--muted);
}

.toc-link:hover,.toc-link.active {
  color:var(--green);
}

.toc-link.active {
  font-weight:600;
}

.toc-link.level-3 {
  padding-left:12px;
  font-size:11px;
}

.article-end {
  border-top:1px solid var(--line);
  margin-top:48px;
  padding-top:23px;
  color:var(--muted);
  font-size:14px;
}

.article-end p {
  margin-bottom:10px;
}

.article-end a {
  text-decoration:none;
}

.related {
  max-width:780px;
}

.related .section-heading h2 {
  font-size:27px;
}

.reading-progress {
  position:fixed;
  top:0;
  left:0;
  width:0;
  height:3px;
  background:var(--green);
  z-index:30;
  transition:width .12s linear;
}

.back-top {
  position:fixed;
  bottom:24px;
  right:25px;
  background:var(--surface);
  border:1px solid var(--line);
  color:var(--green);
  width:42px;
  height:42px;
  border-radius:50%;
  box-shadow:0 3px 12px #2339290a;
  z-index:25;
}

.not-found {
  min-height:60vh;
  padding-top:120px;
}

.not-found .button {
  margin-top:30px;
}

@media(min-width:1500px) {
  .hero {
    padding-block:75px;
  }
  .hero h1 {
    font-size:70px;
  }
}

@media(max-width:1100px) {
  .wrap {
    width:calc(100% - 64px);
  }
  .hero h1 {
    font-size:49px;
  }
  .hero>div>p {
    font-size:16px;
  }
  .hero-type>p {
    font-size:27px!important;
  }
  .hero-type>span {
    font-size:350px;
    top:15px;
  }
  .hero-type {
    height:290px;
  }
  .project-card {
    padding:24px 32px 24px 22px;
    grid-template-columns:48px 1fr;
    gap:8px 18px;
  }
  .project-icon {
    width:48px;
    height:48px;
  }
  .project-icon .icon {
    width:27px;
    height:27px;
  }
  .project-card h3 {
    font-size:20px;
  }
  .project-card p {
    font-size:14px;
  }
  .reading-layout {
    gap:35px;
    grid-template-columns:minmax(0,1fr) 190px;
  }
}

@media(max-width:760px) {
  .wrap {
    width:calc(100% - 40px);
  }
  .site-header {
    height:75px;
  }
  .wordmark {
    font-size:23px;
  }
  .site-header nav {
    gap:22px;
  }
  .site-header nav a {
    font-size:14px;
  }
  .site-header nav .icon {
    display:none;
  }
  .hero {
    grid-template-columns:1fr;
    padding:42px 0;
  }
  .hero h1 {
    font-size:clamp(30px,6.5vw,45px);
    letter-spacing:-1px;
    white-space:normal;
  }
  .hero-type {
    display:none;
  }
  .hero>div>p {
    font-size:16px;
  }
  .hero-actions {
    margin-top:25px;
  }
  .section {
    margin-top:34px;
  }
  .section-heading h2,.archive-projects h2 {
    font-size:27px;
  }
  .text-link {
    font-size:13px;
  }
  .project-grid {
    grid-template-columns:1fr;
    gap:15px;
  }
  .project-card {
    min-height:155px;
    grid-template-columns:54px 1fr;
    padding:25px 32px 25px 20px;
  }
  .project-icon {
    width:54px;
    height:54px;
  }
  .project-card h3 {
    font-size:22px;
  }
  .project-card p {
    font-size:14px;
  }
  .site-footer {
    margin-top:40px;
  }
  .page-intro {
    padding:34px 0 27px;
  }
  .page-intro h1 {
    font-size:36px;
  }
  .page-intro p {
    font-size:16px;
  }
  .search-form {
    margin-bottom:24px;
    padding:10px 13px;
    gap:9px;
  }
  .search-form input {
    font-size:14px;
  }
  .blog-layout {
    grid-template-columns:1fr;
    gap:22px;
  }
  .categories {
    position:static;
    display:flex;
    flex-wrap:wrap;
    border:0;
    border-bottom:1px solid var(--line);
    padding:0 0 15px;
    gap:5px;
  }
  .category-link {
    display:inline-block;
    margin:0;
    padding:6px 11px;
    font-size:13px;
  }
  .more-categories {
    width:100%;
  }
  .more-categories summary {
    display:list-item;
    padding:8px 11px;
    font-size:13px;
  }
  .more-categories .category-link {
    font-size:12px;
  }
  .article-row {
    padding:20px 0;
  }
  .article-row h2 {
    font-size:23px;
  }
  .article-row p {
    font-size:14px;
  }
  .article-meta {
    gap:7px;
    font-size:11px;
  }
  .list-toolbar {
    font-size:14px;
  }
  .archive-row {
    grid-template-columns:1fr auto;
    gap:10px;
  }
  .archive-row p {
    grid-column:1/-1;
    grid-row:2;
  }
  .archive-row>a,.archive-name {
    font-size:21px;
  }
  .reading-layout {
    display:flex;
    flex-direction:column;
    gap:25px;
  }
  .toc {
    order:-1;
    position:static;
    width:100%;
    padding:15px 20px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#f0f2ec;
  }
  .toc summary {
    margin-bottom:0;
  }
  .toc details[open] summary {
    margin-bottom:15px;
  }
  .toc nav {
    max-height:190px;
  }
  .toc-link {
    font-size:13px;
  }
  .toc-link.level-3 {
    font-size:12px;
  }
  .article-heading {
    padding:25px 0;
    margin-bottom:24px;
  }
  .article-heading h1 {
    font-size:31px;
  }
  .prose {
    width:100%;
    font-size:16px;
  }
  .prose h2 {
    font-size:25px;
    margin-top:35px;
  }
  .prose h3 {
    font-size:21px;
  }
  .prose pre {
    font-size:12px;
    padding:17px;
  }
  .article-back {
    margin-top:24px;
  }
  .related {
    width:100%;
  }
  .related .section-heading h2 {
    font-size:25px;
  }
  .back-top {
    bottom:16px;
    right:16px;
  }
  .latest {
    margin-top:40px;
  }
}

@media(max-width:390px) {
  .site-header nav {
    gap:16px;
  }
  .site-header nav a:last-child {
    display:none;
  }
  .wordmark {
    font-size:22px;
  }
  .project-card {
    grid-template-columns:42px 1fr;
    column-gap:15px;
  }
  .project-icon {
    width:42px;
    height:42px;
  }
  .project-icon .icon {
    width:25px;
    height:25px;
  }
  .project-card h3 {
    font-size:20px;
  }
  .section-heading h2 {
    font-size:24px;
  }
  .button {
    padding:10px 20px;
  }
  .site-footer {
    font-size:11px;
  }
  .article-meta {
    gap:6px;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto;
  }
  *,*:before,*:after {
    transition:none!important;
    animation:none!important;
  }
}

@media(max-width:360px) {
  .section-heading {
    gap:12px;
  }
  .section-heading h2 {
    font-size:20px;
  }
  .section-heading .text-link {
    font-size:12px;
    gap:6px;
  }
  .section-heading .icon {
    width:16px;
    height:16px;
  }
}
