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

:root {
  --bg: #f3f6fb;
  --bg-soft: #eaeff7;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.78);
  --surface-2: #ecf1f8;
  --text: #0f172a;
  --muted: #5f6b81;
  --border: #dbe3ef;
  --border-strong: #c8d3e4;
  --accent: #0891b2;
  --accent-strong: #0e7490;
  --accent-glow: rgba(14, 165, 233, 0.28);
  --accent-soft: rgba(8, 145, 178, 0.09);
  --accent-line: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.55), transparent);
  --grad: linear-gradient(135deg, #06b6d4, #3b82f6);
  --shadow: 0 2px 8px rgba(15, 40, 80, 0.05);
  --shadow-lift: 0 24px 48px -20px rgba(15, 40, 80, 0.25);
  --radius: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

[data-theme="dark"] {
  --bg: #0a0e16;
  --bg-soft: #0d1320;
  --surface: #101827;
  --glass: rgba(16, 24, 39, 0.66);
  --surface-2: #172032;
  --text: #e2e8f0;
  --muted: #8a94a7;
  --border: #21304a;
  --border-strong: #2e4265;
  --accent: #22d3ee;
  --accent-strong: #67e8f9;
  --accent-glow: rgba(34, 211, 238, 0.22);
  --accent-soft: rgba(34, 211, 238, 0.09);
  --accent-line: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.6), transparent);
  --grad: linear-gradient(135deg, #22d3ee, #3b82f6);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 24px 48px -18px rgba(0, 0, 0, 0.65);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.35s ease, color 0.35s ease;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

::selection {
  background: rgba(14, 165, 233, 0.28);
  color: inherit;
}

[data-theme="dark"] ::selection {
  background: rgba(34, 211, 238, 0.3);
}

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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.kicker::before {
  content: "// ";
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.logo span {
  font-weight: 800;
  font-size: 18.5px;
  letter-spacing: 0.04em;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-list > li {
  position: relative;
}

.nav-list a,
.submenu-toggle {
  font-size: 15px;
  color: var(--text);
  transition: color 0.25s;
}

.nav-list a:hover,
.nav-list a.active,
.submenu-toggle:hover {
  color: var(--accent);
}

.nav-list > li > a.active {
  position: relative;
}

.nav-list > li > a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 10px var(--accent-glow);
}

.submenu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  padding: 6px 0;
}

.caret {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s;
}

.has-submenu.open > .submenu-toggle .caret {
  transform: rotate(-135deg);
}

.submenu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  min-width: 190px;
  padding: 7px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
}

.has-submenu.open > .submenu {
  transform: translateX(-50%);
}

.submenu li {
  position: relative;
}

.submenu a {
  display: block;
  width: 100%;
  padding: 9px 15px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
}

.submenu a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--glass);
  color: var(--text);
  transition: border-color 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -6px var(--accent-glow);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

.menu-toggle {
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  width: 17px;
  height: 1.8px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s, opacity 0.3s;
}

body.nav-open .menu-toggle span:nth-child(1) {
  transform: translateY(5.8px) rotate(45deg);
}

body.nav-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .menu-toggle span:nth-child(3) {
  transform: translateY(-5.8px) rotate(-45deg);
}

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 92px 0 72px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 320px at 16% 6%, var(--accent-soft), transparent 70%),
    radial-gradient(720px 380px at 88% 18%, rgba(99, 102, 241, 0.1), transparent 70%),
    radial-gradient(520px 320px at 50% 118%, var(--accent-soft), transparent 70%);
}

[data-theme="dark"] .hero::before {
  background:
    radial-gradient(600px 320px at 16% 6%, rgba(34, 211, 238, 0.13), transparent 70%),
    radial-gradient(720px 380px at 88% 18%, rgba(99, 102, 241, 0.16), transparent 70%),
    radial-gradient(520px 320px at 50% 118%, rgba(34, 211, 238, 0.09), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-strong) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 72% 68% at 50% 42%, transparent 30%, #000 78%);
  -webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 42%, transparent 30%, #000 78%);
}

[data-theme="dark"] .hero::after {
  opacity: 0.22;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero .avatar {
  margin: 0 auto 26px;
  border-radius: 50%;
  box-shadow:
    0 0 0 5px var(--surface),
    0 0 0 6px var(--border-strong),
    0 0 42px -4px var(--accent-glow),
    0 18px 44px -14px rgba(10, 60, 120, 0.5);
}

.hero-kicker {
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(30px, 4.6vw, 44px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin-bottom: 12px;
}

[data-theme="dark"] .hero h1 {
  text-shadow: 0 0 32px rgba(56, 189, 248, 0.25);
}

.hero-line {
  min-height: 1.8em;
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 500;
  font-size: clamp(14px, 2vw, 16px);
  letter-spacing: 0.03em;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.15em;
  margin-left: 4px;
  vertical-align: -0.18em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-desc {
  max-width: 640px;
  margin: 16px auto 0;
  color: var(--muted);
  line-height: 2;
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 42px;
}

.hero-stats > div {
  min-width: 128px;
  padding: 16px 26px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-stats > div:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 14px 34px -12px var(--accent-glow);
}

.hero-stats strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.hero-stats span {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
  padding: 56px 0 36px;
}

.section-head {
  position: relative;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-top: 6px;
}

.more {
  position: absolute;
  right: 0;
  bottom: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 1px dashed var(--border-strong);
  transition: color 0.25s, border-color 0.25s;
}

.more:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.post-card {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  scroll-margin-top: 92px;
}

.post-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--accent-line);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow:
    0 24px 48px -20px rgba(8, 40, 90, 0.35),
    0 0 0 1px var(--accent-soft),
    0 0 34px -10px var(--accent-glow);
}

.post-card:hover::before {
  opacity: 1;
  transform: scaleX(1);
}

.post-card.featured {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 26px;
  padding: 20px;
}

.cover {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(6, 12, 24, 0.5));
  pointer-events: none;
}

.cover img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card.featured:hover .cover img {
  transform: scale(1.05);
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.post-meta time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.badge {
  --h: 0;
  padding: 2.5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  line-height: 1.8;
  background: hsl(var(--h) 52% 93%);
  color: hsl(var(--h) 48% 30%);
  transition: background-color 0.3s, color 0.3s;
}

[data-theme="dark"] .badge {
  background: hsl(var(--h) 45% 15%);
  color: hsl(var(--h) 75% 66%);
}

.b-note { --h: 340; }
.b-tinkering { --h: 152; }
.b-tools { --h: 210; }
.b-reading { --h: 38; }
.b-qingdao { --h: 185; }
.b-featured { --h: 195; }

.post-card h3 {
  margin: 12px 0 10px;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.post-card.featured h3 {
  font-size: 22px;
}

.post-card h3 a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1.5px;
  transition: color 0.3s, background-size 0.35s ease;
  padding-bottom: 2px;
}

.post-card h3 a:hover {
  color: var(--accent);
  background-size: 100% 1.5px;
}

.post-body > p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
}

.page {
  min-width: 38px;
  padding: 8px 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--glass);
  color: var(--muted);
  transition: border-color 0.25s, color 0.25s, background-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.page:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px var(--accent-glow);
}

.page.current {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 22px -8px var(--accent-glow);
}

.pagination .ellipsis {
  color: var(--muted);
  padding: 0 4px;
}

.sidebar {
  position: sticky;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-margin-top: 92px;
}

.widget {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.widget h3 {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 10px var(--accent-glow);
}

.widget-about {
  text-align: center;
}

.widget-about img {
  margin: 4px auto 16px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--surface-2), 0 0 30px -6px var(--accent-glow);
}

.widget-about p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
  text-align: left;
}

.btn-line {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 26px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.btn-line:hover {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 28px -10px var(--accent-glow);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tags a {
  padding: 3.5px 14px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  transition: border-color 0.25s, color 0.25s, background-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.tags a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -8px var(--accent-glow);
}

.social li + li {
  border-top: 1px dashed var(--border);
}

.social a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 2px;
  font-size: 14px;
  color: var(--text);
  transition: color 0.25s;
}

.social a span {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 13px;
  transition: transform 0.25s, color 0.25s;
}

.social a:hover {
  color: var(--accent);
}

.social a:hover span {
  color: var(--accent);
  transform: translate(3px, -3px);
}

.site-footer {
  position: relative;
  margin-top: 64px;
  background: #070b13;
  color: #97a3ba;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent-line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding: 52px 0 12px;
}

.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e8edf5;
  margin-bottom: 14px;
}

.footer-grid p,
.footer-grid li {
  font-size: 13.5px;
  line-height: 2.1;
}

.footer-grid a {
  transition: color 0.25s;
}

.footer-grid a:hover {
  color: #38bdf8;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 30px;
  padding: 20px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: #67748c;
}

#backToTop {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTop:hover {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 30px -10px var(--accent-glow);
}

#backToTop svg {
  width: 20px;
  height: 20px;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
}

.widget h3 {
  letter-spacing: 0.18em;
}

.page-head {
  padding: 64px 0 46px;
}

.page-head .kicker {
  margin-bottom: 10px;
}

.page-head .hero-stats {
  margin-top: 30px;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 15px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
}

.notice svg {
  flex: none;
  width: 17px;
  height: 17px;
  color: var(--accent);
  margin-top: 4px;
}

.prose {
  font-size: 15px;
}

.prose p {
  margin-bottom: 14px;
  line-height: 2;
  color: var(--text);
}

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

.prose ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

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

.prose ul li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.9;
}

.prose ul li::before {
  content: "$";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.prose ul li strong {
  color: var(--text);
}

.prose ul li a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

.prose ul li a:hover {
  border-color: var(--accent);
}

.page-head.detail h1 {
  font-size: clamp(23px, 3.4vw, 33px);
  max-width: 860px;
  margin: 6px auto 0;
  line-height: 1.45;
}

.page-head .post-meta {
  justify-content: center;
  margin-top: 16px;
}

.article-card {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px clamp(22px, 4vw, 48px);
}

.article-body > p {
    text-indent: 2em;
  margin-bottom: 18px;
  font-size: 15.5px;
  line-height: 2.1;
  color: var(--text);
}

.article-body h2 {
  margin: 32px 0 14px;
  padding-left: 12px;
  font-size: 19px;
  line-height: 1.6;
  border-left: 3px solid var(--accent);
}

.article-body h3 {
  margin: 26px 0 12px;
  font-size: 16.5px;
  line-height: 1.6;
}

.article-body blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--surface-2);
  border-left: 3px dashed var(--accent);
  border-radius: 0 10px 10px 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.95;
}

.article-body code {
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface-2);
  border-radius: 6px;
  color: var(--accent);
}

.post-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
}

.post-tags-row .label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 17px 20px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.post-nav a:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 14px 30px -14px var(--accent-glow);
}

.post-nav .dir {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s;
}

.post-nav a:hover .dir {
  color: var(--accent);
}

.post-nav .next {
  text-align: right;
}

@media (max-width: 900px) {
  .post-nav {
    grid-template-columns: 1fr;
  }

  .article-card {
    padding: 26px 18px;
  }

  .page-head .post-meta {
    justify-content: center;
  }
}

@media (hover: hover) and (min-width: 901px) {
  .nav-list > li.has-submenu::after {
    content: "";
    position: absolute;
    left: -6px;
    right: -24px;
    top: 100%;
    height: 14px;
  }

  .nav-list li.has-submenu:hover > .submenu,
  .nav-list li.has-submenu:focus-within > .submenu {
    display: block;
  }
}

@media (min-width: 901px) {
  .menu-toggle {
    display: none;
  }
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr 260px;
    gap: 24px;
  }

  .post-card.featured {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lift);
    padding: 6px 4vw 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }

  body.nav-open .main-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list > li {
    border-bottom: 1px solid var(--border);
  }

  .nav-list > li:last-child {
    border-bottom: none;
  }

  .nav-list a,
  .submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 4px;
    font-size: 15.5px;
  }

  .nav-list > li > a.active::after {
    display: none;
  }

  .nav-list a.active {
    color: var(--accent);
    font-weight: 600;
  }

  .submenu {
    display: none;
    position: static;
    transform: none;
    min-width: 0;
    padding: 0 0 8px 16px;
    border: none;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .has-submenu.open > .submenu {
    display: block;
    transform: none;
  }

  .submenu li {
    border-top: 1px dashed var(--border);
  }

  .submenu li:first-child {
    border-top: none;
  }

  .submenu a {
    font-size: 14.5px;
    color: var(--muted);
    border-radius: 0;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .page-head {
    padding: 46px 0 36px;
  }

  .main-layout {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }

  .sidebar {
    position: static;
  }

  .post-card.featured {
    grid-template-columns: 1fr;
  }

  .post-card.featured .cover {
    order: -1;
  }

  .cover img {
    min-height: 0;
    aspect-ratio: 16 / 7;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 44px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .header-inner {
    height: 60px;
  }

  .logo span {
    font-size: 16.5px;
  }

  .logo img {
    width: 30px;
    height: 30px;
  }

  .main-nav {
    top: 60px;
    max-height: calc(100vh - 60px);
  }

  .hero {
    padding: 44px 0 40px;
  }

  .hero .avatar {
    width: 92px;
    height: 92px;
  }

  .hero-desc {
    font-size: 14.5px;
  }

  .hero-stats {
    gap: 10px;
    margin-top: 32px;
  }

  .hero-stats > div {
    min-width: 0;
    flex: 1 1 28%;
    padding: 13px 12px;
  }

  .hero-stats strong {
    font-size: 21px;
  }

  .post-card {
    padding: 20px 18px;
  }

  .post-card.featured {
    padding: 14px;
    gap: 16px;
  }

  .post-card h3 {
    font-size: 17px;
  }

  .post-card.featured h3 {
    font-size: 19px;
  }

  .section-head h2 {
    font-size: 20px;
  }

  .pagination .page {
    padding: 6px 11px;
  }

  #backToTop {
    right: 16px;
    bottom: 20px;
  }
}

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

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

.nav-list a .icon,
.submenu-toggle .icon {
  width: 15px;
  height: 15px;
  margin-right: 6px;
  vertical-align: -2.5px;
}

.badge .icon {
  width: 12px;
  height: 12px;
  margin-right: 4px;
  vertical-align: -1.5px;
}
.icon {
  display: inline-block;
  flex: none;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.i-home {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M3 10.5 12 3l9 7.5%22/%3E%3Cpath d=%22M5 9.5V21h14V9.5%22/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M3 10.5 12 3l9 7.5%22/%3E%3Cpath d=%22M5 9.5V21h14V9.5%22/%3E%3C/svg%3E");
}
.i-note {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M12 20h9%22/%3E%3Cpath d=%22M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z%22/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M12 20h9%22/%3E%3Cpath d=%22M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z%22/%3E%3C/svg%3E");
}
.i-tinkering {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%222%22 y=%223%22 width=%2220%22 height=%227%22 rx=%222%22/%3E%3Crect x=%222%22 y=%2214%22 width=%2220%22 height=%227%22 rx=%222%22/%3E%3Cpath d=%22M6 6.5h.01M6 17.5h.01%22/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%222%22 y=%223%22 width=%2220%22 height=%227%22 rx=%222%22/%3E%3Crect x=%222%22 y=%2214%22 width=%2220%22 height=%227%22 rx=%222%22/%3E%3Cpath d=%22M6 6.5h.01M6 17.5h.01%22/%3E%3C/svg%3E");
}
.i-tools {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z%22/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z%22/%3E%3C/svg%3E");
}
.i-reading {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z%22/%3E%3Cpath d=%22M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z%22/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z%22/%3E%3Cpath d=%22M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z%22/%3E%3C/svg%3E");
}
.i-qingdao {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z%22/%3E%3Ccircle cx=%2212%22 cy=%2210%22 r=%223%22/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z%22/%3E%3Ccircle cx=%2212%22 cy=%2210%22 r=%223%22/%3E%3C/svg%3E");
}
.i-xueche {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2%22/%3E%3Ccircle cx=%227%22 cy=%2217%22 r=%222%22/%3E%3Cpath d=%22M9 17h6%22/%3E%3Ccircle cx=%2217%22 cy=%2217%22 r=%222%22/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2%22/%3E%3Ccircle cx=%227%22 cy=%2217%22 r=%222%22/%3E%3Cpath d=%22M9 17h6%22/%3E%3Ccircle cx=%2217%22 cy=%2217%22 r=%222%22/%3E%3C/svg%3E");
}
.i-about {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx=%2212%22 cy=%228%22 r=%224%22/%3E%3Cpath d=%22M4 21c0-4 3.6-6 8-6s8 2 8 6%22/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx=%2212%22 cy=%228%22 r=%224%22/%3E%3Cpath d=%22M4 21c0-4 3.6-6 8-6s8 2 8 6%22/%3E%3C/svg%3E");
}

.nf-code {
  font-family: var(--font-mono);
  font-size: clamp(110px, 24vw, 200px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}

.nf-code span {
  background: none;
  color: transparent;
  -webkit-text-stroke: 2.5px var(--accent);
}

.hero.nf .hero-inner {
  text-align: center;
}

.nf-desc {
  max-width: 520px;
  margin: 14px auto 0;
  color: var(--muted);
  line-height: 1.9;
}

.nf-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn-solid {
  display: inline-block;
  padding: 9px 30px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  transition: box-shadow 0.3s, transform 0.3s;
}

.btn-solid:hover {
  box-shadow: 0 14px 30px -10px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-line {
  margin-top: 0;
}

.nf-links {
  justify-content: center;
  margin-top: 26px;
}

.nf-hint {
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.75;
}

.related {
  margin-top: 8px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.related-head {
  margin-bottom: 22px;
}

.related-head .kicker {
  margin-bottom: 10px;
}

.related-head h2 {
  font-size: 22px;
  margin-bottom: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.rel-card {
  display: block;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.rel-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 24px 48px -20px rgba(8, 40, 90, 0.35), 0 0 0 1px var(--accent-soft), 0 0 34px -10px var(--accent-glow);
}

.rel-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.rel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.rel-card:hover .rel-media img {
  transform: scale(1.05);
}

.rel-title {
  padding: 12px 14px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .related-grid { grid-template-columns: 1fr; }
}
