:root {
  --bg: #fff;
  --fg: #222;
  --muted: #666;
  --faint: #888;
  --line: #e5e5e5;
  --link: #476582;
  --link-hover: #111;
  --code-bg: #f6f6f6;
  --dot: rgba(0, 0, 0, 0.07);
  --dot-size: 24px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-position: 0 0;
  background-size: var(--dot-size) var(--dot-size);
  color: var(--fg);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.78;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(100% - 48px, 680px);
  margin: 0 auto;
  padding: 48px 0 40px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
}

.avatar {
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: #f1f1f1;
  color: #333;
  font-size: 25px;
  font-weight: 650;
  transition: transform 0.2s ease, background 0.2s ease;
}

.avatar:hover {
  background: #e9e9e9;
  transform: rotate(-8deg) scale(1.04);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 15px;
}

h1,
h2,
p,
ul,
figure {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.subtitle {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.1rem;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 18px;
}

strong {
  font-weight: 650;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.16s ease, background 0.16s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.intro,
.block {
  margin-bottom: 38px;
}

.block p:last-child,
.intro p:last-child {
  margin-bottom: 0;
}

.list {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.list li::marker {
  color: var(--faint);
}

.list a {
  font-weight: 600;
}

.list span {
  display: block;
  color: var(--muted);
}

.tags {
  display: inline-block;
  margin: 0 0.15rem 0.35rem 0;
  border-radius: 6px;
  background: var(--code-bg);
  padding: 0.05rem 0.42rem;
  color: #444;
  font-size: 0.95rem;
  white-space: nowrap;
}

hr {
  height: 1px;
  margin: 44px 0 34px;
  border: 0;
  background: var(--line);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.qr-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

figure {
  width: 132px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

figure img {
  display: block;
  width: 132px;
  height: 132px;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: cover;
}

figcaption {
  margin-top: 7px;
}

footer {
  margin-top: 48px;
  color: var(--faint);
  font-size: 0.92rem;
}

footer p {
  margin-bottom: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111;
    --fg: #ddd;
    --muted: #aaa;
    --faint: #7d7d7d;
    --line: #2a2a2a;
    --link: #8ca7c0;
    --link-hover: #fff;
    --code-bg: #1c1c1c;
    --dot: rgba(255, 255, 255, 0.08);
    color-scheme: dark;
  }

  .avatar {
    background: #202020;
    color: #ddd;
  }

  .avatar:hover {
    background: #2a2a2a;
  }

  .tags {
    color: #ccc;
  }

  figure img {
    background: #fff;
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 32px, 680px);
    padding-top: 28px;
  }

  .site-header {
    align-items: flex-start;
    margin-bottom: 42px;
  }

  nav {
    justify-content: flex-end;
    gap: 10px 14px;
  }

  h1 {
    font-size: 1.9rem;
  }
}

.project-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.project-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 -8px;
  border-radius: 10px;
  padding: 8px;
  color: inherit;
  text-decoration: none;
}

.project-item:hover {
  background: var(--code-bg);
  text-decoration: none;
}

.project-item img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
}

.project-item strong,
.project-item em {
  display: block;
}

.project-item strong {
  color: var(--link);
  font-weight: 650;
  line-height: 1.25;
}

.project-item:hover strong {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-item em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.support-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  padding: 0.28rem 0.62rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.support-link:hover {
  border-color: var(--muted);
  color: var(--fg);
  text-decoration: none;
}

.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.support-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  padding: 0.28rem 0.62rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.support-link:hover {
  border-color: var(--muted);
  color: var(--fg);
  text-decoration: none;
}

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

.magic-link {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0 0.1rem;
  border-radius: 5px;
  background: var(--code-bg);
  padding: 0.08rem 0.35rem 0.08rem 0.18rem;
  color: var(--fg);
  line-height: 1.35;
  vertical-align: -0.12em;
}

.magic-link:hover {
  color: var(--fg);
  text-decoration: none;
  background: color-mix(in srgb, var(--code-bg) 82%, var(--muted));
}

.magic-link img {
  width: auto;
  height: 1.08em;
  max-width: 1.65em;
  border-radius: 3px;
  object-fit: contain;
}


.magic-link img.wide {
  max-width: 2.1em;
}
