@font-face {
  font-family: Space;
  src: url("/assets/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: Anton;
  src: url("/assets/fonts/anton.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #20211e;
  --paper: #f7f7f2;
  --white: #fffef8;
  --orange: #ff6846;
  --blue: #325dff;
  --lime: #dfff70;
  --muted: #666a61;
  --line: #b9bdb2;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Space, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

svg {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
}

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

::selection {
  background: var(--lime);
  color: var(--ink);
}

.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: 1rem;
  z-index: 100;
  padding: 0.8rem 1rem;
  background: var(--ink);
  color: var(--white);
}

.skip-link:focus {
  top: 1rem;
}

.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

.site-header {
  min-height: 72px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 4.2%;
  background: rgb(247 247 242 / 94%);
  border-top: 5px solid var(--orange);
  border-bottom: 1px solid var(--ink);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: var(--white);
  font-size: 1.45rem;
  font-weight: 400;
}

.brand-sub {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.8rem);
}

.site-header nav > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0;
  border-bottom: 2px solid transparent;
  font-size: 0.88rem;
}

.site-header nav > a span:not(.sr-only) {
  font-family: var(--mono);
  font-size: 0.75rem;
}

.site-header nav > a:hover,
.site-header nav > a[aria-current] {
  border-bottom-color: var(--orange);
}

.github-link svg {
  width: 1rem;
  height: 1rem;
}

/* Home */

.home-hero {
  width: min(100%, 1280px);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.75fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: stretch;
  margin: 0 auto;
  padding: 4.5rem 4.2% 5rem;
}

.hero-copy {
  align-self: center;
}

.hero-english {
  width: fit-content;
  margin: 1.2rem 0 1rem;
  padding: 0.45rem 0.7rem;
  background: var(--lime);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(3.8rem, 7.5vw, 7rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.085em;
}

.hero-lede {
  max-width: 38rem;
  margin: 1.6rem 0 0;
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.8;
}

.read-notes {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 3.2rem;
  margin-top: 1.8rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--ink);
  font-size: 0.88rem;
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.15s;
}

.read-notes:hover {
  background: var(--orange);
  color: var(--ink);
  transform: translateY(-2px);
}

.hero-aside {
  min-height: 330px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 1.5rem;
  background: #e8ecff;
  border: 1px solid var(--ink);
}

.hero-aside > p {
  position: relative;
  z-index: 2;
  max-width: 18rem;
  margin: 0 0 1.8rem;
  font-size: 0.95rem;
  line-height: 1.8;
}

.decor-orb,
.decor-bar,
.decor-letter {
  position: absolute;
  display: block;
}

.decor-orb {
  top: -2rem;
  right: -1.5rem;
  width: 9.5rem;
  aspect-ratio: 1;
  background: var(--blue);
  border-radius: 50%;
}

.decor-bar {
  top: 4.6rem;
  left: -1.4rem;
  width: 12rem;
  height: 1.6rem;
  background: var(--orange);
  transform: rotate(-10deg);
}

.decor-letter {
  top: 1.1rem;
  left: 1.4rem;
  color: var(--ink);
  font-size: 4.5rem;
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1;
  transform: rotate(9deg);
}

.hero-quotation {
  position: relative;
  z-index: 2;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
  font-size: 0.82rem;
  line-height: 1.7;
}

.hero-quotation blockquote {
  margin: 0 0 0.35rem;
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 1rem;
}

.hero-quotation figcaption {
  color: var(--muted);
  font-size: 0.75rem;
}

.hero-quotation cite {
  font-style: normal;
}

.hero-quotation a {
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.notes-section {
  padding: 4.2rem 4.2% 4.8rem;
  background: var(--white);
  border-top: 1px solid var(--ink);
  scroll-margin-top: 4rem;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.07em;
}

.count {
  display: inline-grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  margin-left: 0.8rem;
  vertical-align: top;
  background: var(--orange);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid currentColor;
  font-size: 0.88rem;
}

.text-link svg {
  transition: transform 0.15s;
}

.text-link:hover svg {
  transform: translate(3px, -3px);
}

.post-grid {
  border-top: 1px solid var(--ink);
}

.post-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) 7.5rem 6.5rem;
  gap: 1.5rem;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  transition:
    background 0.15s,
    padding 0.15s;
}

.post-card:hover {
  padding-right: 1rem;
  padding-left: 1rem;
  background: var(--lime);
}

.post-index {
  color: var(--blue);
  font:
    400 2.7rem/1 Anton,
    Impact,
    sans-serif;
}

.card-content {
  padding: 1.25rem 0;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.tag {
  padding: 0.22rem 0.48rem;
  background: var(--blue);
  color: var(--white);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.card-content h3 {
  margin: 0.55rem 0 0.35rem;
  font-size: clamp(1.35rem, 2.1vw, 1.8rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.04em;
}

.title-break {
  display: inline;
  margin-left: 0.25em;
}

.card-content p {
  max-width: 45rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.post-card > time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.card-read {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: end;
  font-size: 0.82rem;
}

.colophon {
  display: grid;
  grid-template-columns: 0.7fr 1.2fr 1fr;
  gap: 2rem;
  padding: 3.8rem 4.2% 4.2rem;
  background: var(--orange);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.colophon h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.07em;
}

.colophon h2 span {
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
}

.colophon p {
  margin: 0 0 1.4rem;
  font-size: 1rem;
  line-height: 1.85;
}

.site-footer {
  padding: 3.3rem 4.2% 1.5rem;
  background: var(--ink);
  color: var(--white);
}

.footer-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: clamp(3rem, 7.7vw, 7rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.075em;
}

.footer-name > span {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgb(255 255 255 / 35%);
  color: #c7cbc0;
  font-size: 0.75rem;
}

.footer-bottom a:hover {
  color: var(--lime);
}

/* Archive */

.archive-header {
  padding: 4rem 4.2% 3.5rem;
  background: var(--blue);
  color: var(--white);
  border-bottom: 1px solid var(--ink);
}

.archive-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 1rem;
}

.archive-title h1 {
  margin: 0;
  font-size: clamp(4.5rem, 9vw, 8rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.09em;
}

.archive-title h1 > span {
  display: inline-block;
  margin-left: 1rem;
  color: #d8e0ff;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.archive-total {
  min-width: 6rem;
  padding: 0.7rem;
  background: var(--lime);
  color: var(--ink);
  border: 1px solid var(--ink);
  transform: rotate(3deg);
  text-align: center;
  font:
    400 3rem/1 Anton,
    Impact,
    sans-serif;
}

.archive-total small {
  display: block;
  margin-top: 0.5rem;
  font: 400 0.75rem/1.2 var(--sans);
}

.archive-header > p:last-child {
  margin: 1.8rem 0 0;
  color: #d8e0ff;
  line-height: 1.75;
}

.archive-list {
  min-height: 50vh;
  padding: 4rem 4.2% 4.5rem;
}

.archive-year {
  display: grid;
  grid-template-columns: 0.75fr 3fr;
  gap: 3rem;
}

.year-label {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.8rem;
}

.year-label > a {
  color: var(--blue);
  font:
    400 4rem/1 Anton,
    Impact,
    sans-serif;
}

.year-label > span {
  font-family: var(--mono);
  font-size: 0.75rem;
}

.archive-entry {
  display: grid;
  grid-template-columns: 4rem 1fr 2rem;
  gap: 1.5rem;
  padding: 1.7rem 0;
  border-top: 1px solid var(--ink);
  transition:
    background 0.15s,
    padding 0.15s;
}

.archive-entry:last-child {
  border-bottom: 1px solid var(--ink);
}

.archive-entry time {
  padding-top: 0.15rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.archive-entry h2 {
  margin: 0.5rem 0;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.04em;
}

.archive-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.entry-arrow {
  align-self: center;
  transition: transform 0.15s;
}

.archive-entry:hover {
  padding-right: 1rem;
  padding-left: 1rem;
  background: var(--lime);
}

.archive-entry:hover .entry-arrow {
  transform: translate(3px, -3px);
}

.archive-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Article */

.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  height: 4px;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
}

.article-header {
  padding: 2.8rem max(4.2%, calc((100vw - 1100px) / 2)) 3.2rem;
  background: var(--orange);
  border-bottom: 1px solid var(--ink);
}

.back-link {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-size: 0.88rem;
}

.back-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.article-kicker {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
}

.article-kicker time {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.article-header h1 {
  max-width: 62rem;
  margin: 1.3rem 0;
  overflow-wrap: anywhere;
  font-size: clamp(2.25rem, 4.2vw, 4rem);
  font-weight: 550;
  line-height: 1.3;
  letter-spacing: -0.06em;
}

.article-byline {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.article-byline span {
  margin-left: 1rem;
}

.article-layout {
  max-width: 1190px;
  display: grid;
  grid-template-columns: 230px minmax(0, 760px);
  gap: 4rem;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

.toc-sidebar {
  position: sticky;
  top: 6rem;
  align-self: start;
}

.toc {
  border-top: 1px solid var(--ink);
}

.toc summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 0.88rem;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc summary > span {
  font-family: var(--mono);
  font-size: 0.75rem;
}

.toc ol {
  margin: 0;
  padding: 0.25rem 0 0;
  list-style: none;
}

.toc li {
  border-bottom: 1px solid var(--line);
}

.toc li > a {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.75rem 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.toc li > a > span {
  flex-shrink: 0;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.toc li > a:hover,
.toc li > a[aria-current] {
  padding-left: 0.45rem;
  background: var(--lime);
  color: var(--ink);
}

.toc-top {
  display: inline-block;
  margin-top: 1.4rem;
  font-size: 0.8rem;
}

.article-body {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.95;
}

.article-body > p:first-child {
  margin-top: 0;
}

.article-body p {
  margin: 1.3em 0;
}

.article-body h2 {
  margin: 2.2em 0 0.9em;
  scroll-margin-top: 6rem;
  font-size: 1.7rem;
  font-weight: 550;
  line-height: 1.5;
  letter-spacing: -0.035em;
}

.article-body h3 {
  margin: 1.8em 0 0.75em;
  scroll-margin-top: 6rem;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.6;
}

.article-body h4 {
  margin: 1.6em 0 0.75em;
  scroll-margin-top: 6rem;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.6;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5em;
}

.article-body li {
  margin: 0.7em 0;
}

.article-body a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.23rem;
}

.article-body a:hover {
  background: var(--lime);
  color: var(--ink);
}

.article-body a.headerlink {
  display: none;
}

.article-body code {
  padding: 0.12rem 0.32rem;
  background: #e5e7df;
  border-radius: 2px;
  box-decoration-break: clone;
  font-family: var(--mono);
  font-size: 0.875em;
}

.article-body strong {
  font-weight: 650;
}

.article-body figure.highlight {
  max-width: 100%;
  margin: 1.5rem 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.8;
  overflow-wrap: normal;
}

.article-body figure.highlight figcaption {
  min-height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.85rem;
  background: var(--blue);
  border-bottom: 1px solid #849cff;
  color: var(--white);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.highlight button {
  padding: 0.28rem 0.62rem;
  cursor: pointer;
  background: var(--lime);
  color: var(--ink);
  border: 1px solid var(--ink);
  font-size: 0.75rem;
}

.highlight button:hover {
  background: var(--orange);
}

.code-viewport {
  overflow-x: auto;
}

.code-viewport:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: -2px;
}

.highlight table {
  min-width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.highlight td {
  padding: 1rem;
  vertical-align: top;
}

.highlight td.gutter {
  width: 2rem;
  padding-right: 0.7rem;
  padding-left: 0.7rem;
  background: #2d2f2b;
  border-right: 1px solid #50534c;
  color: #8e9388;
  text-align: right;
  user-select: none;
}

.highlight td.code {
  width: 100%;
}

.highlight pre {
  margin: 0;
  white-space: pre;
  font: inherit;
  line-height: 1.8;
}

.highlight .string,
.highlight .meta-string {
  color: #dfff70;
}

.highlight .meta,
.highlight .number,
.highlight .literal {
  color: #ff9b82;
}

.highlight .comment {
  color: #aeb3a7;
}

.highlight .name,
.highlight .keyword,
.highlight .attribute {
  color: #a9c1ff;
}

.highlight .built_in {
  color: #ffd37c;
}

.next-note {
  max-width: 1130px;
  margin: 0 auto;
  padding: 2.2rem 0 3.5rem;
  border-top: 1px solid var(--ink);
}

.next-note > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 0.5rem;
}

.next-note h2 {
  margin: 0.5rem 0;
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.5;
}

.next-note svg {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.next-note > a:hover h2 {
  color: var(--blue);
}

.error-page {
  min-height: 64vh;
  padding: 5rem 8% 7rem;
  background: var(--blue);
  color: var(--white);
}

.error-page h1 {
  margin: 1.5rem 0;
  color: var(--lime);
  font:
    400 clamp(8rem, 20vw, 17rem) / 0.9 Anton,
    Impact,
    sans-serif;
}

.error-page h1 > span {
  display: block;
  margin-top: 1rem;
  color: var(--white);
  font: 500 clamp(1.8rem, 4vw, 3.5rem) / 1.4 var(--sans);
}

.error-page p {
  line-height: 1.8;
}

.error-page .read-notes {
  width: fit-content;
}

@media (min-width: 1600px) {
  .site-header,
  .notes-section,
  .colophon,
  .archive-header,
  .archive-list,
  .site-footer {
    padding-right: max(4.2%, calc((100vw - 1480px) / 2));
    padding-left: max(4.2%, calc((100vw - 1480px) / 2));
  }
}

@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .hero-aside {
    min-height: 260px;
  }

  .colophon {
    grid-template-columns: 1fr 1.5fr;
  }

  .colophon > .eyebrow {
    grid-column: 1 / -1;
  }

  .archive-year {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .year-label {
    align-items: baseline;
    flex-direction: row;
    justify-content: space-between;
  }

  .article-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2.5rem 6% 3.5rem;
  }

  .toc-sidebar {
    position: static;
  }

  .toc {
    border-bottom: 1px solid var(--ink);
  }

  .toc summary::after {
    content: "+";
    margin-left: 1rem;
  }

  .toc[open] summary::after {
    content: "−";
  }

  .toc summary > span {
    margin-left: auto;
  }

  .toc nav {
    padding-bottom: 1rem;
  }

  .toc-top {
    display: none;
  }

  .article-header {
    padding: 2.2rem 6% 2.7rem;
  }

  .next-note {
    margin-right: 6%;
    margin-left: 6%;
  }
}

@media (max-width: 650px) {
  .site-header {
    min-height: 64px;
    padding-right: 5%;
    padding-left: 5%;
  }

  .brand-sub,
  .site-header nav > a span:not(.sr-only),
  .github-link {
    display: none;
  }

  .site-header nav {
    gap: 1rem;
  }

  .home-hero {
    padding: 3rem 5% 3.5rem;
  }

  .hero-copy h1 {
    font-size: clamp(3.2rem, 15vw, 4.7rem);
  }

  .hero-aside {
    min-height: 280px;
  }

  .notes-section {
    padding: 3.5rem 5% 4rem;
  }

  .section-heading {
    gap: 1rem;
  }

  .section-heading h2 {
    font-size: 2.6rem;
  }

  .section-heading .text-link {
    gap: 0.5rem;
    font-size: 0.8rem;
  }

  .post-card {
    grid-template-columns: 3rem minmax(0, 1fr) 1.4rem;
    gap: 0.8rem;
    padding: 0.4rem 0;
  }

  .post-card > time {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    padding-bottom: 1rem;
  }

  .post-card .card-read {
    grid-column: 3;
    grid-row: 1 / span 2;
    font-size: 0;
  }

  .post-card .card-read svg {
    width: 1.1rem;
    height: 1.1rem;
  }

  .colophon {
    grid-template-columns: 1fr;
    gap: 1.7rem;
    padding: 3.2rem 5% 3.6rem;
  }

  .site-footer {
    padding: 2.8rem 5% 1.5rem;
  }

  .footer-name {
    display: block;
    font-size: 13vw;
  }

  .footer-name > span {
    display: block;
    margin-top: 0.8rem;
  }

  .footer-motto {
    display: none;
  }

  .archive-header,
  .archive-list {
    padding-right: 5%;
    padding-left: 5%;
  }

  .archive-title {
    align-items: flex-start;
  }

  .archive-title h1 {
    font-size: 21vw;
  }

  .archive-title h1 > span {
    display: block;
    margin: 0.7rem 0 0;
  }

  .archive-total {
    min-width: 4.6rem;
    font-size: 2.3rem;
  }

  .archive-entry {
    grid-template-columns: 2.8rem 1fr 1.2rem;
    gap: 0.8rem;
    padding: 1.35rem 0;
  }

  .archive-entry h2 {
    font-size: 1.3rem;
  }

  .article-header h1 {
    font-size: 2.15rem;
  }

  .article-kicker {
    gap: 0.7rem;
    font-size: 0.75rem;
  }

  .article-byline {
    line-height: 1.8;
  }

  .article-byline span {
    display: block;
    margin: 0.25rem 0 0;
  }

  .article-body h2 {
    font-size: 1.5rem;
  }

  .article-body figure.highlight {
    font-size: 0.75rem;
  }

  .highlight td {
    padding: 0.8rem 0.7rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .toc-sidebar,
  .reading-progress,
  .back-link,
  .next-note,
  .highlight button {
    display: none !important;
  }

  .article-header {
    padding: 0 0 1.3rem;
    background: white;
  }

  .article-layout {
    display: block;
    padding: 1.3rem 0;
  }

  .article-body {
    font-size: 11pt;
  }

  .article-body figure.highlight {
    break-inside: avoid;
    background: #f4f4f4;
    color: #111;
    border: 1px solid #aaa;
  }

  .highlight td.gutter {
    background: #eee;
    color: #555;
  }

  .highlight .code pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .highlight span {
    color: inherit !important;
  }

  .article-body a {
    color: #111;
  }

  body {
    background: white;
  }
}
