:root {
  color-scheme: dark;
  --bg: var(--theme-dark-bg, #171717);
  --accent: var(--theme-dark-accent, #dfdfdf);
  --text: #a1a1a1;
  --text-soft: #888;
  --text-heading: #dfdfdf;
  --text-bright: #dfdfdf;
  --content-text: #a1a1a1;
  --friend-text: #a1a1a1;
  --memo-text: #a1a1a1;
  --blockquote-text: #888;
  --code-text: #dfdfdf;
  --code-bg: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.2);
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(28, 28, 28, 0.85);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --list-card-bg: #222;
  --list-card-hover: #2a2a2a;
  --list-card-title: #dfdfdf;
  --list-card-meta-bg: rgba(255, 255, 255, 0.1);
  --list-card-meta: #a1a1a1;
  --list-card-shadow: 0 8px 36px rgba(0, 0, 0, 0.05);
  --nav-bg: rgba(28, 28, 28, 0.85);
  --nav-hover-bg: rgba(28, 28, 28, 0.78);
  --nav-text: rgba(255, 255, 255, 0.42);
  --halo: transparent;
  --texture-a: transparent;
  --texture-b: transparent;
  --portrait-line: transparent;
  --monogram-glow: rgba(255, 255, 255, 0.1);
  --monogram-shadow: transparent;
  --monogram-bg: #1c1c1c;
  --monogram-line: rgba(255, 255, 255, 0.1);
  --link-underline: #444;
  --shadow: none;
  --nav-shadow: 0 8px 36px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  --spring-width: linear(0 0%, 0.0238 4.43%, 0.0917 8.86%, 0.3441 17.71%, 0.6533 26.57%, 0.9054 35.43%, 1.024 41.51%, 1.0551 47.59%, 1.0611 50.92%, 1.0599 54.43%, 1.0521 60.69%, 1.0343 67.69%, 1.017 73.96%, 1.0051 80.22%, 0.999 87.04%, 0.9983 93.85%, 1 100%);
  --spring-height: linear(0 0%, 0.0089 2.95%, 0.0349 5.91%, 0.1366 11.81%, 0.2941 17.72%, 0.4884 23.62%, 0.685 29.53%, 0.8503 35.43%, 0.9683 41.34%, 1.0167 47.24%, 1.0302 53.15%, 1.0321 59.05%, 1.0275 64.96%, 1.0202 70.86%, 1.0131 76.77%, 1.0073 82.67%, 1.0035 88.58%, 1.0011 94.48%, 1 100%);
  --content: 900px;
  --reading: 700px;
  --radius: 26px;
  --font-sans: -apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: var(--theme-light-bg, #fafafa);
    --accent: var(--theme-light-accent, #111);
    --text: #888;
    --text-soft: #888;
    --text-heading: #111;
    --text-bright: #111;
    --content-text: #2e2e2e;
    --friend-text: #2e2e2e;
    --memo-text: #2e2e2e;
    --blockquote-text: #888;
    --code-text: #2e2e2e;
    --code-bg: rgba(0, 0, 0, 0.05);
    --line: rgba(0, 0, 0, 0.08);
    --line-strong: rgba(0, 0, 0, 0.15);
    --surface: rgba(0, 0, 0, 0.05);
    --surface-strong: rgba(244, 244, 244, 0.78);
    --surface-hover: rgba(0, 0, 0, 0.05);
    --list-card-bg: #fff;
    --list-card-hover: #fff;
    --list-card-title: #111;
    --list-card-meta-bg: rgba(0, 0, 0, 0.05);
    --list-card-meta: #434343;
    --list-card-shadow: 0 8px 36px rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(255, 255, 255, 0.75);
    --nav-hover-bg: rgba(244, 244, 244, 0.78);
    --nav-text: rgba(0, 0, 0, 0.4);
    --halo: transparent;
    --texture-a: transparent;
    --texture-b: transparent;
    --portrait-line: transparent;
    --monogram-glow: rgba(255, 255, 255, 0.7);
    --monogram-shadow: transparent;
    --monogram-bg: #f4f4f4;
    --monogram-line: rgba(0, 0, 0, 0.1);
    --link-underline: rgba(0, 0, 0, 0.05);
    --shadow: none;
    --nav-shadow: 0 8px 36px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.04);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
}

body::before {
  display: none;
}

::selection {
  color: var(--bg);
  background: var(--accent);
}

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

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

button,
input,
textarea,
select {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 8px 12px;
  color: var(--bg);
  background: var(--accent);
  border-radius: 999px;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

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

/* Page entrance — mirrors the target site's restrained fade-and-rise motion. */

.page-reveal {
  opacity: 0;
  animation: page-fade-in-up 500ms ease-out 50ms forwards;
  will-change: opacity, transform;
}

@keyframes page-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Home */

.home-shell {
  width: min(100%, calc(var(--content) + 96px));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(96px, 16vh, 170px) 48px 160px;
}

.home-shell.home-shell--centered {
  display: flex;
  align-items: center;
  width: min(calc(100% - 96px), 935px);
  min-height: 100svh;
  padding: 0;
}

.home-shell--centered .profile {
  width: 100%;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 92px;
}

.profile {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.profile__visual {
  min-width: 0;
}

.profile__portrait,
.profile__monogram {
  width: 300px;
  aspect-ratio: 1;
  border: 1px solid var(--portrait-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile__portrait {
  height: auto;
  object-fit: cover;
  filter: saturate(0.76) contrast(1.04);
}

.profile__monogram {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--accent);
  background:
    linear-gradient(145deg, var(--monogram-glow), var(--monogram-shadow)),
    var(--monogram-bg);
}

.profile__monogram::before,
.profile__monogram::after {
  position: absolute;
  content: "";
  border: 1px solid var(--monogram-line);
  border-radius: 50%;
}

.profile__monogram::before {
  width: 78%;
  height: 78%;
}

.profile__monogram::after {
  width: 48%;
  height: 48%;
}

.profile__monogram span {
  position: relative;
  z-index: 1;
  font-family: "Songti SC", "STSong", serif;
  font-size: 92px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.08em;
}

.profile__monogram small {
  position: absolute;
  right: 22px;
  bottom: 18px;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.profile__eyebrow {
  margin: 18px 2px 0;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  line-height: 1.5;
  text-transform: uppercase;
}

.profile__copy {
  padding-top: 2px;
}

.profile__location {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
}

.profile__copy h1 {
  margin: 0;
  color: var(--accent);
  font-size: 36px;
  font-weight: 700;
  line-height: 42px;
  letter-spacing: normal;
}

.profile__english {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: normal;
}

.profile__bio {
  max-width: 543px;
  margin-top: 28px;
  font-size: 21px;
  line-height: 34px;
  letter-spacing: normal;
  text-wrap: pretty;
}

.profile__bio p {
  margin: 0 0 28px;
}

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

.profile__social {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 28px;
}

.profile__social a,
.latest__all,
.article__footer a,
.error-shell a {
  color: var(--accent);
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 5px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.profile__social a:hover,
.latest__all:hover,
.article__footer a:hover,
.error-shell a:hover {
  text-decoration-color: var(--accent);
}

.profile__social a {
  font-size: 21px;
  line-height: 34px;
  text-decoration: none;
}

.profile__social a:hover {
  text-decoration: underline 3px;
  text-underline-offset: 4px;
}

.latest {
  margin-top: clamp(110px, 18vh, 180px);
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.latest__heading {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: baseline;
  margin-bottom: 16px;
}

.latest__heading p,
.page-heading > p,
.article__kicker {
  margin: 0;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.latest__heading h2 {
  margin: 0;
  color: var(--accent);
  font-size: 22px;
  letter-spacing: -0.025em;
}

.latest .post-list {
  margin-left: 364px;
}

.latest__all {
  display: inline-flex;
  gap: 12px;
  margin: 28px 0 0 364px;
}

/* Floating navigation */

.site-nav {
  --site-nav-width: 149px;
  --site-nav-height: 216px;
  --site-nav-collapsed-width: 82px;
  --site-nav-collapsed-height: 48px;
  --site-nav-spring-width-expand: linear(0, 0.0238 4.43%, 0.0917 8.86%, 0.3441 17.71%, 0.6533 26.57%, 0.9054 35.43%, 1.0638 41.51%, 1.1471 47.59%, 1.1629 50.92%, 1.1595 54.43%, 1.1389 60.69%, 1.0914 67.69%, 1.0452 73.96%, 1.0135 80.22%, 0.9975 87.04%, 0.9953 93.85%, 1);
  --site-nav-spring-width-retract: linear(0, 0.0238 4.43%, 0.0917 8.86%, 0.3441 17.71%, 0.6533 26.57%, 0.9054 35.43%, 1.024 41.51%, 1.0551 47.59%, 1.0611 50.92%, 1.0599 54.43%, 1.0521 60.69%, 1.0343 67.69%, 1.017 73.96%, 1.0051 80.22%, 0.999 87.04%, 0.9983 93.85%, 1);
  --site-nav-spring-height-expand: linear(0, 0.0089 2.95%, 0.0349 5.91%, 0.1366 11.81%, 0.2941 17.72%, 0.4884 23.62%, 0.685 29.53%, 0.8503 35.43%, 0.9683 41.34%, 1.0223 47.24%, 1.0402 53.15%, 1.0428 59.05%, 1.0366 64.96%, 1.0269 70.86%, 1.0174 76.77%, 1.0097 82.67%, 1.0046 88.58%, 1.0015 94.48%, 1);
  --site-nav-spring-height-retract: linear(0, 0.0089 2.95%, 0.0349 5.91%, 0.1366 11.81%, 0.2941 17.72%, 0.4884 23.62%, 0.685 29.53%, 0.8503 35.43%, 0.9683 41.34%, 1.0167 47.24%, 1.0302 53.15%, 1.0321 59.05%, 1.0275 64.96%, 1.0202 70.86%, 1.0131 76.77%, 1.0073 82.67%, 1.0035 88.58%, 1.0011 94.48%, 1);
  --site-nav-duration-width: 655ms;
  --site-nav-duration-height: 475ms;
  --site-nav-duration-width-expand: 590ms;
  --site-nav-duration-height-expand: 428ms;
  --site-nav-spring-width-active: var(--site-nav-spring-width-retract);
  --site-nav-spring-height-active: var(--site-nav-spring-height-retract);
  --site-nav-duration-width-active: var(--site-nav-duration-width);
  --site-nav-duration-height-active: var(--site-nav-duration-height);
  position: fixed;
  bottom: max(32px, env(safe-area-inset-bottom));
  left: 32px;
  z-index: 9999;
  width: var(--site-nav-collapsed-width);
  height: var(--site-nav-collapsed-height);
  transform: translateX(4px);
  overflow: hidden;
  contain: layout paint;
  color: rgba(255, 255, 255, 0.42);
  background: rgba(28, 28, 28, 0.85);
  border: 1px solid rgba(180, 180, 180, 0.1);
  border-radius: 25px;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  -webkit-tap-highlight-color: transparent;
  transition:
    width var(--site-nav-duration-width-active) var(--site-nav-spring-width-active),
    height var(--site-nav-duration-height-active) var(--site-nav-spring-height-active),
    bottom var(--site-nav-duration-height-active) var(--site-nav-spring-height-active),
    transform var(--site-nav-duration-width-active) var(--site-nav-spring-width-active),
    border-radius 216ms cubic-bezier(0.2, 0, 0, 1),
    background 132ms ease,
    border-color 132ms ease,
    box-shadow 216ms ease,
    opacity 216ms ease;
  will-change: width, height, transform, bottom;
}

.site-nav.is-open {
  --site-nav-spring-width-active: var(--site-nav-spring-width-expand);
  --site-nav-spring-height-active: var(--site-nav-spring-height-expand);
  --site-nav-duration-width-active: var(--site-nav-duration-width-expand);
  --site-nav-duration-height-active: var(--site-nav-duration-height-expand);
  bottom: max(24px, env(safe-area-inset-bottom));
  width: var(--site-nav-width);
  height: var(--site-nav-height);
  transform: translateX(0);
  border-radius: 26px;
  background: rgba(28, 28, 28, 0.78);
  box-shadow: 0 14px 60px rgba(0, 0, 0, 0.55), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.site-nav.site-nav--no-anim,
.site-nav.site-nav--no-anim * {
  transition: none !important;
}

.site-nav__inner {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: var(--site-nav-width);
  padding: 6px 22px;
  transform: translateX(-4px);
  transition:
    transform var(--site-nav-duration-width-active) var(--site-nav-spring-width-active),
    bottom var(--site-nav-duration-height-active) var(--site-nav-spring-height-active);
}

.site-nav.is-open .site-nav__inner {
  bottom: 8px;
  transform: translateX(0);
}

.site-nav__inner > a,
.site-nav__toggle {
  min-height: 36px;
  margin: 0;
  padding: 4px 0;
  color: rgba(255, 255, 255, 0.42);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 17px;
  font-style: normal;
  font-weight: 400;
  line-height: 28px;
  text-align: left;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 0;
  transition: color 264ms ease;
}

.site-nav__inner > a {
  text-decoration: none;
}

.site-nav__inner > a:hover,
.site-nav__inner > a:focus-visible {
  color: rgba(255, 255, 255, 0.92);
}

.site-nav__inner > a.is-active,
.site-nav__inner > a.active {
  color: #fff;
}

.site-nav__divider {
  display: block;
  height: 1px;
  margin: 10px 0;
  background: rgba(255, 255, 255, 0.1);
}

.site-nav__toggle {
  cursor: pointer;
  text-align: left;
}

.site-nav__inner > a:focus,
.site-nav__inner > a:focus-visible,
.site-nav__toggle:focus,
.site-nav__toggle:focus-visible {
  outline: none;
}

.site-nav:not(.is-open) .site-nav__toggle {
  color: rgba(255, 255, 255, 0.85);
}

.site-nav:not(.is-open) .site-nav__divider,
.site-nav:not(.is-open) .site-nav__inner > a {
  pointer-events: none;
}

.site-nav__inner > :nth-last-child(2) { --site-nav-stagger-index: 0; }
.site-nav__inner > :nth-last-child(3) { --site-nav-stagger-index: 1; }
.site-nav__inner > :nth-last-child(4) { --site-nav-stagger-index: 2; }
.site-nav__inner > :nth-last-child(5) { --site-nav-stagger-index: 3; }
.site-nav__inner > :nth-last-child(6) { --site-nav-stagger-index: 4; }
.site-nav__inner > :nth-last-child(7) { --site-nav-stagger-index: 5; }
.site-nav__inner > :nth-last-child(8) { --site-nav-stagger-index: 6; }
.site-nav__inner > :nth-last-child(9) { --site-nav-stagger-index: 7; }
.site-nav__inner > :nth-last-child(10) { --site-nav-stagger-index: 8; }

.site-nav__inner > :not(.site-nav__toggle) {
  opacity: 0;
  transition:
    opacity 200ms ease calc((7 - var(--site-nav-stagger-index, 0)) * 25ms),
    color 264ms ease;
}

.site-nav.is-open .site-nav__inner > :not(.site-nav__toggle) {
  opacity: 1;
  transition:
    opacity 200ms ease calc(var(--site-nav-stagger-index, 0) * 25ms),
    color 264ms ease;
}

@media (prefers-color-scheme: light) {
  .site-nav {
    color: rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.04);
  }

  .site-nav.is-open {
    background: rgba(244, 244, 244, 0.78);
    box-shadow: 0 14px 60px rgba(0, 0, 0, 0.16), 0 2px 4px rgba(0, 0, 0, 0.04);
  }

  .site-nav__inner > a,
  .site-nav__toggle {
    color: rgba(0, 0, 0, 0.4);
  }

  .site-nav__inner > a:hover,
  .site-nav__inner > a:focus-visible {
    color: rgba(0, 0, 0, 0.78);
  }

  .site-nav__inner > a.is-active,
  .site-nav__inner > a.active {
    color: rgba(0, 0, 0, 0.95);
  }

  .site-nav__divider {
    background: rgba(0, 0, 0, 0.1);
  }

  .site-nav:not(.is-open) .site-nav__toggle {
    color: rgba(0, 0, 0, 0.85);
  }
}

/* Shared inner pages */

.page-shell,
.article-shell {
  width: min(100%, calc(var(--content) + 96px));
  margin: 0 auto;
  padding: clamp(80px, 12vh, 132px) 48px 150px;
}

.page-heading {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 36px;
  align-items: baseline;
  margin-bottom: 70px;
}

.page-heading h1 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(52px, 9vw, 94px);
  font-weight: 720;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.page-heading span {
  grid-column: 2;
  max-width: 480px;
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 15px;
}

.page-heading--minimal {
  display: block;
  margin-bottom: 56px;
}

.page-heading--minimal h1 {
  font-size: clamp(42px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.post-list {
  border-top: 1px solid var(--line);
}

.post-row {
  border-bottom: 1px solid var(--line);
}

.post-row__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 96px;
  padding: 22px 0;
}

.post-row__link > div {
  min-width: 0;
}

.post-row h2 {
  display: inline;
  margin: 0;
  color: var(--text-heading);
  font-size: 19px;
  font-weight: 530;
  line-height: 1.35;
  letter-spacing: -0.02em;
  transition: color 150ms ease;
}

.post-row__link:hover h2 {
  color: var(--accent);
}

.post-row time {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.post-row__pin {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  vertical-align: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.post-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.empty-state {
  padding: 55px 0;
  color: var(--text-soft);
}

.empty-state p {
  margin: 0 0 12px;
}

.empty-state a {
  color: var(--accent);
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 36px;
}

.pagination a {
  color: var(--accent);
  font-size: 13px;
}

.tag-cloud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tag-cloud a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px;
  color: var(--list-card-title);
  background: var(--list-card-bg);
  border: 0;
  border-radius: 16px;
  box-shadow: var(--list-card-shadow);
  transition: background 200ms ease, transform 200ms ease;
}

.tag-cloud a:hover {
  color: var(--list-card-title);
  background: var(--list-card-hover);
  transform: translateY(-2px);
}

.tag-cloud small {
  padding: 4px 12px;
  color: var(--list-card-meta);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 15px;
  background: var(--list-card-meta-bg);
  border-radius: 16px;
}

.friend-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.friend-list > a {
  display: flex;
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 17px;
  background: var(--list-card-bg);
  border: 0;
  border-radius: 16px;
  box-shadow: var(--list-card-shadow);
  transition: background 200ms ease, transform 200ms ease;
}

.friend-list > a:hover {
  background: var(--list-card-hover);
  transform: translateY(-2px);
}

.friend-list img,
.friend-list__mark {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

.friend-list img {
  object-fit: cover;
}

.friend-list__mark {
  display: grid;
  place-items: center;
  color: var(--list-card-meta);
  background: var(--list-card-meta-bg);
  border: 0;
}

.friend-list > a > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.friend-list strong {
  overflow: hidden;
  color: var(--list-card-title);
  font-size: 15px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-list small,
.friend-list__empty {
  color: var(--list-card-meta);
  font-size: 12px;
}

.friend-list small {
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 9px;
  line-height: 16px;
  background: var(--list-card-meta-bg);
  border-radius: 16px;
}

.memo-list {
  border-top: 1px solid var(--line);
}

.memo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.memo-item__content {
  color: var(--memo-text);
  font-size: 16px;
  line-height: 1.75;
}

.memo-item__content > * {
  margin-top: 0;
  margin-bottom: 0.8em;
}

.memo-item__content > *:last-child {
  margin-bottom: 0;
}

.memo-item time {
  align-self: end;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

/* Article */

.article-shell {
  width: min(100%, calc(var(--reading) + 96px));
  padding-top: clamp(70px, 11vh, 120px);
}

.article__header {
  margin-bottom: 58px;
}

.article__header h1 {
  margin: 18px 0 0;
  color: var(--accent);
  font-size: clamp(38px, 5.4vw, 56px);
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.article__tags a {
  color: var(--text-soft);
  font-size: 12px;
}

.article__feature {
  width: 100%;
  max-height: 520px;
  margin: 0 0 54px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.article__content {
  color: var(--content-text);
  font-size: 18px;
  line-height: 1.82;
  overflow-wrap: anywhere;
}

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

.article__content h1,
.article__content h2,
.article__content h3,
.article__content h4 {
  color: var(--accent);
  line-height: 1.25;
  letter-spacing: -0.028em;
}

.article__content h2 {
  margin: 2.7em 0 0.85em;
  font-size: 30px;
}

.article__content h3 {
  margin: 2.2em 0 0.75em;
  font-size: 23px;
}

.article__content p,
.article__content ul,
.article__content ol,
.article__content blockquote,
.article__content pre,
.article__content table {
  margin: 1.4em 0;
}

.article__content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 4px;
}

.article__content strong {
  color: var(--text-bright);
}

.article__content blockquote {
  margin-left: 0;
  padding: 4px 0 4px 22px;
  color: var(--blockquote-text);
  border-left: 2px solid var(--line-strong);
}

.article__content code {
  padding: 0.16em 0.38em;
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.article__content pre {
  padding: 20px;
  overflow-x: auto;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.article__content pre code {
  padding: 0;
  background: transparent;
  border: 0;
}

.article__content img {
  width: auto;
  max-height: 82vh;
  margin: 1.1em auto;
  border-radius: 15px;
}

.article__content p > img:first-child:last-child {
  margin-block: 0;
}

.article__content p:has(> img:first-child:last-child) {
  margin-block: 1.1em;
}

.article__content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.article__content th,
.article__content td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.article__content hr {
  height: 1px;
  margin: 3em 0;
  background: var(--line);
  border: 0;
}

.article__footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 74px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.article__footer a:last-child {
  margin-left: auto;
  text-align: right;
}

.article__footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* 404 */

.error-shell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 720px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 70px 42px 150px;
}

.error-shell > p {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.error-shell h1 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(46px, 10vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.error-shell > span {
  margin: 26px 0 36px;
}

.error-shell a {
  align-self: flex-start;
}

@media (min-width: 761px) and (max-width: 940px) {
  .home-shell--centered .profile {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 48px;
  }

  .home-shell--centered .profile__portrait,
  .home-shell--centered .profile__monogram {
    width: 240px;
  }
}

@media (max-width: 760px) {
  .home-shell {
    width: 100%;
    padding: 78px 24px 140px;
  }

  .home-shell.home-shell--centered {
    width: calc(100% - 48px);
    min-height: 100svh;
    padding: 48px 0 64px;
  }

  .profile {
    display: block;
  }

  .profile__portrait,
  .profile__monogram {
    width: 180px;
    border-radius: 18px;
  }

  .home-shell--centered .profile__portrait,
  .home-shell--centered .profile__monogram {
    border-radius: 16px;
  }

  .profile__monogram span {
    font-size: 58px;
  }

  .profile__monogram small {
    right: 15px;
    bottom: 13px;
  }

  .profile__eyebrow {
    width: 180px;
    margin-top: 13px;
    font-size: 10px;
    line-height: 1.65;
  }

  .profile__copy {
    margin-top: 32px;
    padding-top: 0;
  }

  .profile__location {
    margin-bottom: 14px;
  }

  .profile__copy h1 {
    font-size: 32px;
    line-height: 40px;
  }

  .profile__english {
    margin-top: 6px;
  }

  .profile__bio {
    margin-top: 28px;
    font-size: 19px;
    line-height: 30px;
  }

  .profile__bio p {
    margin-bottom: 28px;
  }

  .profile__social a {
    font-size: 19px;
    line-height: 30px;
  }

  .latest {
    margin-top: 100px;
  }

  .latest__heading {
    display: block;
    margin-bottom: 24px;
  }

  .latest__heading h2 {
    margin-top: 8px;
  }

  .latest .post-list,
  .latest__all {
    margin-left: 0;
  }

  .page-shell,
  .article-shell {
    padding-right: 24px;
    padding-left: 24px;
  }

  .page-heading {
    display: block;
    margin-bottom: 52px;
  }

  .page-heading h1 {
    margin-top: 12px;
    font-size: clamp(50px, 16vw, 72px);
  }

  .page-heading--minimal {
    margin-bottom: 44px;
  }

  .page-heading--minimal h1 {
    margin-top: 0;
    font-size: clamp(40px, 14vw, 56px);
  }

  .page-heading span {
    display: block;
    margin-top: 18px;
  }

  .post-row__link {
    display: block;
    min-height: 0;
    padding: 21px 0;
  }

  .post-row time {
    display: block;
    margin-top: 12px;
  }

  .tag-cloud {
    grid-template-columns: 1fr 1fr;
  }

  .friend-list {
    grid-template-columns: 1fr;
  }

  .memo-item {
    display: block;
  }

  .memo-item time {
    display: block;
    margin-top: 14px;
  }

  .article-shell {
    padding-top: 68px;
  }

  .article__header {
    margin-bottom: 42px;
  }

  .article__header h1 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .article__content {
    font-size: 17px;
    line-height: 1.8;
  }

  .article__content h2 {
    font-size: 27px;
  }

  .article__footer {
    align-items: flex-start;
  }

}

@media (max-width: 720px) {
  .site-nav {
    right: auto;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  }

  .site-nav.is-open {
    bottom: 12px;
    transform: translateX(-50%);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
  }

  .site-nav__inner {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .site-nav.is-open .site-nav__inner {
    transform: translateX(-50%);
  }

  .site-nav__toggle {
    text-align: center;
  }

  .site-nav:not(.is-open) {
    width: var(--site-nav-collapsed-fit, var(--site-nav-collapsed-width));
  }

  .site-nav.scroll-hidden {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 720px) and (prefers-color-scheme: light) {
  .site-nav {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  }

  .site-nav.is-open {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
  }
}

@media (max-width: 430px) {
  .tag-cloud {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .page-reveal {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .site-nav {
    transition:
      width 216ms ease,
      height 216ms ease,
      border-radius 216ms ease,
      background 216ms ease !important;
  }

  .site-nav__inner > :not(.site-nav__toggle),
  .site-nav.is-open .site-nav__inner > :not(.site-nav__toggle) {
    transition: opacity 150ms ease, color 150ms ease !important;
  }
}
