:root {
  color-scheme: light;
  --bg: #f5faff;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.62);
  --text: #17223a;
  --muted: #63718a;
  --soft: #8b98ad;
  --line: rgba(73, 120, 180, 0.16);
  --blue: #2f7df4;
  --blue-2: #68b7ff;
  --pink: #ff75aa;
  --pink-2: #ffd7e7;
  --green: #34c983;
  --orange: #ffb343;
  --violet: #8b72ff;
  --shadow: 0 20px 55px rgba(68, 106, 154, 0.15);
  --shadow-soft: 0 10px 26px rgba(70, 105, 150, 0.1);
  --content: 1260px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111827;
  --surface: rgba(24, 34, 52, 0.9);
  --surface-solid: #182235;
  --surface-soft: rgba(29, 41, 61, 0.72);
  --text: #f3f7ff;
  --muted: #b8c4d7;
  --soft: #8fa0b8;
  --line: rgba(188, 220, 255, 0.14);
  --blue: #76b8ff;
  --blue-2: #9bd0ff;
  --pink: #ff98c2;
  --pink-2: rgba(255, 152, 194, 0.2);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.23);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 12%, rgba(104, 183, 255, 0.26), transparent 27%),
    radial-gradient(circle at 88% 18%, rgba(255, 117, 170, 0.23), transparent 30%),
    linear-gradient(135deg, rgba(246, 251, 255, 0.95), rgba(255, 244, 249, 0.92) 58%, rgba(246, 251, 255, 0.96)),
    var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.66;
}

body::before {
  content: "";
  position: fixed;
  inset: 78px 0 0;
  z-index: -2;
  opacity: 0.7;
  background:
    linear-gradient(rgba(73, 144, 222, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 144, 222, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(90deg, #000, transparent 80%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 6% 28%, rgba(47, 125, 244, 0.2) 0 2px, transparent 3px),
    radial-gradient(circle at 92% 30%, rgba(255, 117, 170, 0.24) 0 3px, transparent 4px),
    linear-gradient(115deg, transparent 0 54%, rgba(255, 255, 255, 0.22) 54% 56%, transparent 56%);
}

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

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

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

button {
  border: 0;
  cursor: pointer;
}

::selection {
  color: #fff;
  background: var(--pink);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 1000;
  transform: translateY(-160%);
  padding: 8px 12px;
  color: #fff;
  background: var(--text);
  border-radius: 12px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  backdrop-filter: blur(18px);
}

.site-main,
.header-inner,
.site-footer {
  width: min(var(--content), calc(100% - 80px));
  margin-inline: auto;
}

.header-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(290px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand img,
.user-avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(135deg, #e3f4ff, #ffe2ef);
  box-shadow: 0 12px 26px rgba(74, 126, 190, 0.18);
  object-fit: cover;
}

.brand strong {
  color: var(--blue);
  font-size: 1.42rem;
  line-height: 1.08;
  font-weight: 950;
}

.brand small {
  margin-left: 6px;
  color: var(--pink);
  font-size: 1rem;
  font-weight: 950;
}

.site-nav {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 13px;
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--blue);
  background: rgba(47, 125, 244, 0.1);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: var(--blue);
}

.nav-icon,
.icon-link svg,
.icon-button svg,
.button svg,
.search-field svg,
.section-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.icon-link,
.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--text);
  border-radius: 50%;
  background: transparent;
}

.icon-link:hover,
.icon-button:hover {
  color: var(--blue);
  background: rgba(47, 125, 244, 0.08);
}

.icon-button svg[hidden] {
  display: none;
}

.site-main {
  padding: 34px 0 20px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(500px, 0.82fr) minmax(629px, 1fr);
  gap: 0;
  align-items: center;
  min-height: 404px;
}

.hero-copy {
  padding-left: 120px;
  transform: translateY(-54px);
}

.hello-pill {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6fa5, #ff91bd);
  box-shadow: 0 12px 26px rgba(255, 108, 165, 0.28);
  font-weight: 950;
}

.hero h1,
.page-hero h1,
.about-title {
  margin: 18px 0 0;
  color: var(--text);
  font-size: clamp(2.35rem, 4.45vw, 3.72rem);
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero h1 {
  font-size: clamp(2.35rem, 4.05vw, 3.48rem);
}

.accent {
  color: var(--blue);
}

.accent-pink {
  color: var(--pink);
}

.hero-lede,
.page-hero p,
.about-intro,
.lede {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.button-row,
.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  color: var(--blue);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
  font-weight: 950;
}

.button.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), #5ca5ff);
  box-shadow: 0 16px 34px rgba(47, 125, 244, 0.28);
}

.button.ghost {
  background: var(--surface-solid);
}

.glass-card,
.stat-card,
.article-card,
.project-card,
.note-card,
.resource-card,
.panel,
.about-card,
.contact-item,
.article-header,
.prose,
.post-nav {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.hero-art {
  position: relative;
  display: grid;
  min-height: 421px;
  align-items: center;
  justify-content: center;
  margin-left: -22px;
}

.hero-board {
  position: relative;
  width: min(100%, 650px);
  aspect-ratio: 629 / 421;
  isolation: isolate;
  overflow: visible;
}

.hero-board::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -4;
  border-radius: 34px;
  background:
    radial-gradient(circle at 16% 22%, rgba(255, 255, 255, 0.9), transparent 20%),
    linear-gradient(135deg, rgba(236, 247, 255, 0.95), rgba(255, 232, 244, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.hero-board::after {
  content: "";
  position: absolute;
  inset: 18% 0 6% 7%;
  z-index: -3;
  border-radius: 42px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    linear-gradient(135deg, rgba(155, 208, 255, 0.78), rgba(218, 232, 255, 0.62) 56%, rgba(255, 205, 229, 0.72));
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: 0 28px 60px rgba(65, 132, 207, 0.24);
  transform: perspective(860px) rotateX(58deg) rotateZ(-7deg);
  transform-origin: center bottom;
}

.board-orbit {
  position: absolute;
  z-index: -2;
  border: 3px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  pointer-events: none;
}

.board-orbit.one {
  right: 8%;
  top: 28%;
  width: 260px;
  height: 96px;
  transform: rotate(18deg);
}

.board-orbit.two {
  right: -3%;
  top: 38%;
  width: 360px;
  height: 118px;
  border-color: rgba(255, 182, 216, 0.45);
  transform: rotate(12deg);
}

.float-mark {
  position: absolute;
  z-index: 2;
  color: var(--pink);
  pointer-events: none;
  text-shadow: 0 8px 18px rgba(110, 139, 190, 0.18);
}

.star-left { left: 8%; top: 15%; color: #ffc45c; font-size: 1.18rem; transform: rotate(-15deg); }
.star-mid { left: 39%; top: 18%; color: #fff; font-size: 1.08rem; }
.star-right { right: 7%; top: 20%; color: #fff; font-size: 2.8rem; }
.binary { left: 35%; top: 27%; color: rgba(255, 130, 185, 0.45); font-size: 0.9rem; font-weight: 950; line-height: 1.1; transform: rotate(-18deg); }

.code-bubble {
  left: 30%;
  top: 12%;
  display: grid;
  width: 62px;
  height: 54px;
  place-items: center;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff76a9, #ff9cc6);
  box-shadow: 0 16px 28px rgba(255, 103, 163, 0.28);
  font-size: 1.35rem;
  font-weight: 950;
}

.code-bubble::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -8px;
  border-width: 10px 8px 0 0;
  border-style: solid;
  border-color: #ff8cba transparent transparent transparent;
}

.pcb-plane {
  position: absolute;
  inset: 20% 3% 4% 7%;
  z-index: 0;
  pointer-events: none;
}

.trace-map {
  position: absolute;
  inset: 12% 5% 0 3%;
  width: 90%;
  height: 78%;
  opacity: 0.72;
  transform: perspective(860px) rotateX(58deg) rotateZ(-7deg);
  transform-origin: center bottom;
}

.trace-map path,
.trace-map circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trace-map circle {
  fill: #e7f5ff;
  stroke-width: 3;
}

.solder-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffd38b;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.solder-dot.d1 { left: 19%; top: 64%; }
.solder-dot.d2 { left: 27%; top: 58%; }
.solder-dot.d3 { left: 49%; top: 68%; }
.solder-dot.d4 { right: 29%; top: 56%; }
.solder-dot.d5 { right: 16%; top: 48%; }
.solder-dot.d6 { right: 38%; bottom: 18%; }

.hero-part {
  position: absolute;
  z-index: 5;
  color: var(--text);
  background: none;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.hero-part:hover,
.hero-part:focus-visible,
.hero-part.is-active {
  filter: saturate(1.08);
  transform: translateY(-5px) scale(1.03);
}

.hero-part:focus-visible {
  outline: 3px solid rgba(47, 125, 244, 0.34);
  outline-offset: 5px;
}

.camera-module {
  left: 13%;
  top: 30%;
  width: 108px;
  height: 128px;
}

.camera-shell {
  position: absolute;
  left: 14px;
  top: 0;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #61b5ff, #bfe3ff);
  box-shadow: 0 14px 30px rgba(52, 114, 185, 0.28), inset 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.camera-shell::before,
.camera-shell::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2e69ab;
  box-shadow: 48px 0 #2e69ab, 0 48px #2e69ab, 48px 48px #2e69ab;
  left: 10px;
  top: 10px;
}

.lens {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 62% 35%, #96c9ff 0 12%, #263859 14% 42%, #0c1426 44% 100%);
  box-shadow: inset 0 0 0 7px #244b7b;
}

.lens i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
}

.pin-cable {
  position: absolute;
  left: 38px;
  top: 70px;
  display: flex;
  gap: 4px;
  transform: perspective(260px) rotateX(18deg);
}

.pin-cable i {
  width: 7px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(#ffdf9d, #ef9453);
  box-shadow: 0 10px 18px rgba(169, 102, 51, 0.18);
}

.code-display {
  right: 17%;
  top: 8%;
  width: 178px;
  height: 122px;
  padding: 25px 24px 16px;
  border: 10px solid #6da7f8;
  border-radius: 18px;
  background: #172238;
  box-shadow: 0 18px 36px rgba(55, 112, 194, 0.28);
}

.window-dots {
  position: absolute;
  left: 12px;
  top: 9px;
  display: flex;
  gap: 5px;
}

.window-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffb05b;
  box-shadow: 12px 0 #ffd65d, 24px 0 #75d08b;
}

.code-lines i {
  display: block;
  height: 6px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #73e3ff 0 34%, #ff7fb5 34% 48%, #fff 48% 76%, transparent 76%);
}

.code-lines i:nth-child(2) { width: 88%; background: linear-gradient(90deg, #b8a7ff 0 24%, #69e6ff 24% 52%, #ff8abb 52% 70%, #fff 70%); }
.code-lines i:nth-child(3) { width: 72%; }
.code-lines i:nth-child(4) { width: 56%; background: linear-gradient(90deg, #ffd06f 0 32%, #83e4a7 32% 62%, #fff 62%); }
.code-lines i:nth-child(5) { width: 42%; }

.code-mark {
  position: absolute;
  right: 14px;
  top: 38px;
  color: #fff;
  font-weight: 950;
}

.mcu-chip {
  left: 41%;
  top: 45%;
  display: grid;
  width: 190px;
  height: 132px;
  place-items: center;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #26324b, #3e4d6d);
  box-shadow: 0 24px 36px rgba(27, 43, 76, 0.28);
  transform: rotate(-7deg);
  font-size: 2rem;
  font-weight: 950;
}

.mcu-chip:hover,
.mcu-chip:focus-visible,
.mcu-chip.is-active {
  transform: translateY(-5px) scale(1.03) rotate(-7deg);
}

.mcu-chip::before,
.mcu-chip::after {
  content: "";
  position: absolute;
  left: -18px;
  right: -18px;
  height: 18px;
  background: repeating-linear-gradient(90deg, transparent 0 9px, #dfe8f4 9px 18px, transparent 18px 28px);
}

.mcu-chip::before { top: -18px; }
.mcu-chip::after { bottom: -18px; }

.mcu-chip span::before,
.mcu-chip span::after {
  content: "";
  position: absolute;
  top: -12px;
  bottom: -12px;
  width: 18px;
  background: repeating-linear-gradient(0deg, transparent 0 9px, #dfe8f4 9px 18px, transparent 18px 28px);
}

.mcu-chip span::before { left: -18px; }
.mcu-chip span::after { right: -18px; }

.mcu-chip b {
  color: var(--pink);
}

.ultrasonic-module {
  right: 5%;
  top: 43%;
  display: flex;
  width: 126px;
  height: 72px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6bbaff, #cbeaff);
  box-shadow: 0 18px 34px rgba(69, 130, 204, 0.22);
}

.sonar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #1f3150;
}

.sonar i {
  width: 28px;
  height: 18px;
  border-radius: 50%;
  background: #8bc5ff;
}

.led-module {
  right: 17%;
  bottom: 18%;
  width: 48px;
  height: 70px;
}

.led-module span {
  position: absolute;
  left: 10px;
  top: 0;
  width: 30px;
  height: 36px;
  border-radius: 16px 16px 9px 9px;
  background: linear-gradient(135deg, #ff7cac, #ffb3cf);
  box-shadow: 0 0 24px rgba(255, 118, 171, 0.36);
}

.led-module i {
  position: absolute;
  top: 34px;
  width: 4px;
  height: 34px;
  border-radius: 99px;
  background: #78849b;
}

.led-module i:nth-child(2) { left: 18px; }
.led-module i:nth-child(3) { right: 17px; }

.mini-chip {
  width: 54px;
  height: 42px;
  border-radius: 9px;
  background: linear-gradient(135deg, #26324b, #405173);
  box-shadow: 0 12px 24px rgba(35, 56, 91, 0.2);
}

.mini-chip::before,
.mini-chip::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  height: 8px;
  background: repeating-linear-gradient(90deg, transparent 0 7px, #d8e5f4 7px 13px, transparent 13px 21px);
}

.mini-chip::before { top: -8px; }
.mini-chip::after { bottom: -8px; }

.chip-a { left: 23%; bottom: 28%; transform: rotate(-8deg); }
.chip-b { right: 28%; bottom: 10%; transform: rotate(11deg); }

.chip-a:hover,
.chip-a:focus-visible,
.chip-a.is-active { transform: translateY(-5px) scale(1.03) rotate(-8deg); }

.chip-b:hover,
.chip-b:focus-visible,
.chip-b.is-active { transform: translateY(-5px) scale(1.03) rotate(11deg); }

.hero-debug-card {
  left: 4%;
  bottom: 7%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 154px;
  min-height: 68px;
  padding: 10px 14px;
  border: 1px solid rgba(216, 228, 242, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 28px rgba(79, 109, 149, 0.14);
}

.bug-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--pink);
  border-radius: 10px;
  background: rgba(255, 117, 170, 0.13);
  font-size: 1.35rem;
}

.hero-debug-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.hero-debug-card strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.1;
}

.hero-insight {
  position: absolute;
  right: 4%;
  bottom: 4%;
  z-index: 8;
  width: min(270px, 45%);
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 28px rgba(68, 106, 154, 0.12);
  backdrop-filter: blur(12px);
  font-size: 0.8rem;
  line-height: 1.45;
}

.hero-insight strong {
  display: block;
  color: var(--blue);
  font-size: 0.92rem;
}

.page-art,
.about-chip {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.9), transparent 20%),
    linear-gradient(135deg, rgba(104, 178, 255, 0.3), rgba(255, 141, 190, 0.24));
}

.page-art::before,
.about-chip::before {
  content: "";
  position: absolute;
  inset: 55px 34px 40px 28px;
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.46) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.46) 1px, transparent 1px),
    linear-gradient(135deg, #a8d6ff, #f7d7ee);
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: 0 30px 70px rgba(66, 124, 190, 0.25);
  transform: perspective(800px) rotateX(54deg) rotateZ(-12deg);
}

.chip-core {
  position: absolute;
  left: 48%;
  top: 48%;
  width: 150px;
  height: 120px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 22px;
  background: linear-gradient(135deg, #22304e, #465b83);
  box-shadow: 0 22px 36px rgba(21, 44, 85, 0.25);
  transform: translate(-50%, -50%) rotate(-9deg);
  font-size: 1.85rem;
  font-weight: 950;
}

.chip-core::before,
.chip-core::after {
  content: "";
  position: absolute;
  inset: -12px auto -12px 16px;
  width: 118px;
  border-top: 8px dotted rgba(255, 255, 255, 0.7);
  border-bottom: 8px dotted rgba(255, 255, 255, 0.7);
}

.sensor {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 18px;
  background: linear-gradient(135deg, #66b8ff, #d6edff);
  box-shadow: var(--shadow-soft);
}

.sensor::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 8px solid #1e2b45;
  background: #527aa7;
}

.sensor.one {
  left: 18%;
  top: 20%;
}

.sensor.two {
  right: 11%;
  top: 50%;
  width: 92px;
}

.code-screen {
  position: absolute;
  right: 8%;
  top: 4%;
  width: 190px;
  height: 118px;
  padding: 24px;
  border: 10px solid #70a8f5;
  border-radius: 18px;
  background: #19243b;
  box-shadow: var(--shadow);
}

.code-screen i {
  display: block;
  height: 8px;
  margin-bottom: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, #5ed6ff 40%, #ff8cbc 40% 60%, #fff 60%);
}

.spark {
  position: absolute;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--blue-2);
  font-size: 2rem;
}

.spark::before {
  content: "✦";
}

.spark.a { left: 8%; top: 30%; }
.spark.b { right: 4%; top: 18%; color: var(--pink); }
.spark.c { left: 52%; top: 9%; color: var(--orange); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 574px;
  margin: -92px 0 22px;
  padding-left: 120px;
}

.stat-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 12px 16px;
  border-radius: 12px;
}

.mini-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--blue);
  border-radius: 10px;
  background: rgba(47, 125, 244, 0.1);
  font-weight: 950;
}

.stat-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.stat-card strong {
  display: block;
  font-size: 1.4rem;
  line-height: 1.12;
}

.home-grid,
.content-layout,
.notes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 405px;
  gap: 16px;
}

.section-card,
.panel {
  padding: 20px;
  border-radius: 18px;
}

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

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.2;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 950;
  white-space: nowrap;
}

.project-strip,
.article-grid,
.project-grid,
.resource-grid,
.notes-row,
.reading-row,
.about-grid {
  display: grid;
  gap: 14px;
}

.project-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-project,
.article-card,
.project-card,
.note-card,
.resource-card {
  position: relative;
  padding: 10px;
  overflow: hidden;
  border-radius: 14px;
}

.mini-project {
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.thumb {
  position: relative;
  overflow: hidden;
  min-height: 145px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.9), transparent 18%),
    linear-gradient(135deg, #96caff, #eff7ff 50%, #ffd6e7);
}

.thumb::before {
  content: "";
  position: absolute;
  inset: 18% 20% 14% 18%;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(135deg, #6eb7ff, #d8ebff);
  background-size: 18px 18px;
  transform: rotate(-10deg);
  box-shadow: 0 18px 30px rgba(60, 112, 180, 0.22);
}

.thumb::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62px;
  height: 52px;
  border-radius: 12px;
  background: #22304d;
  box-shadow: 0 12px 20px rgba(20, 33, 55, 0.24);
  transform: translate(-50%, -50%) rotate(-8deg);
}

.thumb.camera::after {
  width: 58px;
  height: 58px;
  border: 13px solid #27456f;
  border-radius: 18px;
  background: #95d1ff;
}

.thumb.dark {
  background: linear-gradient(135deg, #152038, #384e75);
}

.thumb.dark::before {
  background:
    linear-gradient(90deg, transparent 48%, rgba(98, 245, 151, 0.72) 49% 51%, transparent 52%),
    linear-gradient(135deg, #0d1628, #243858);
}

.thumb.monitor::after {
  width: 76px;
  height: 48px;
  background:
    linear-gradient(90deg, #4fe28e 8px, transparent 8px 14px, #fff 14px 20px, transparent 20px),
    #172236;
}

.thumb.paper::before {
  background: #fff;
  transform: rotate(5deg);
}

.thumb.paper::after {
  width: 88px;
  height: 8px;
  border-radius: 999px;
  background: #cad6e8;
  box-shadow: 0 18px 0 #dde6f3, 0 36px 0 #e6edf7;
}

.mini-project h3,
.article-card h2,
.project-card h2,
.note-card h2,
.resource-card h2,
.panel h2 {
  margin: 10px 0 6px;
  font-size: 1.08rem;
  line-height: 1.36;
}

.mini-project p,
.article-card p,
.project-card p,
.note-card p,
.resource-card p,
.panel p,
.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.badge,
.tag,
.filter-button,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(47, 125, 244, 0.1);
  font-size: 0.78rem;
  font-weight: 900;
}

.thumb .badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
}

.pink { color: var(--pink); background: rgba(255, 117, 170, 0.14); }
.green { color: var(--green); background: rgba(52, 201, 131, 0.14); }
.orange { color: #d98a12; background: rgba(255, 179, 67, 0.16); }

.tag-list,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.meta-row {
  gap: 16px;
  color: var(--soft);
  font-size: 0.86rem;
  font-weight: 800;
}

.article-list,
.side-stack,
.archive-list,
.topic-list,
.check-list,
.link-list,
.tool-list,
.progress-list,
.contact-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-list a {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 7px;
  border-radius: 12px;
}

.article-list a:hover,
.article-card:hover,
.project-card:hover,
.note-card:hover,
.resource-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.article-list .thumb {
  min-height: 58px;
}

.article-list h3 {
  margin: 0 0 5px;
  font-size: 1rem;
  line-height: 1.28;
}

.article-list time {
  color: var(--soft);
  font-size: 0.86rem;
  white-space: nowrap;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.feature-row article {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.feature-row h3 {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 1rem;
}

.feature-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 28px;
  align-items: center;
  min-height: 200px;
  margin-bottom: 18px;
  padding: 34px 42px;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(90deg, rgba(239, 249, 255, 0.82), rgba(255, 238, 247, 0.74));
  overflow: hidden;
}

.page-hero h1 {
  margin-top: 0;
}

.toolbar {
  margin-bottom: 16px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  min-height: 40px;
  padding-inline: 18px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.filter-button.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), #5ca5ff);
}

.search-field {
  display: inline-flex;
  min-width: 280px;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.search-field input {
  width: 100%;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.article-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.card-body {
  padding: 0 8px 8px;
}

.post-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-body,
.thumb,
.tag-list,
.meta-row,
.button {
  position: relative;
  z-index: 2;
}

.panel {
  border-radius: 16px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.archive-list li,
.topic-list li,
.check-list li,
.link-list li,
.tool-list li,
.progress-list li,
.contact-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.link-list a,
.tool-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

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

.project-feature {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: center;
  margin: 16px 0;
  padding: 14px 20px 14px 14px;
  border-radius: 16px;
}

.project-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.project-card .button {
  width: 100%;
  min-height: 38px;
  margin-top: 14px;
  border-radius: 10px;
}

.bar {
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(47, 125, 244, 0.12);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.notes-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.notes-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reading-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.book-cover {
  min-height: 116px;
  border-radius: 8px;
  background: linear-gradient(135deg, #17223a, #5477a9);
  box-shadow: var(--shadow-soft);
}

.resource-feature {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 16px;
}

.resource-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.resource-card {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.resource-card .thumb {
  min-height: 105px;
}

.favorite-button {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.favorite-button.is-active {
  color: #fff;
  background: var(--pink);
}

.about-hero-new {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: center;
  margin: 24px 0 16px;
  padding: 20px;
  border-radius: 24px;
}

.portrait {
  overflow: hidden;
  min-height: 320px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 26%, #ffd8c7 0 42px, transparent 43px),
    radial-gradient(circle at 44% 34%, #17223a 0 4px, transparent 5px),
    radial-gradient(circle at 57% 34%, #17223a 0 4px, transparent 5px),
    linear-gradient(160deg, #b7d9ff, #eaf5ff 52%, #ffd8e9);
}

.portrait::before {
  content: "";
  display: block;
  width: 210px;
  height: 135px;
  margin: 170px auto 0;
  border-radius: 80px 80px 20px 20px;
  background: linear-gradient(135deg, var(--blue), #1451ac);
}

.about-title {
  font-size: clamp(2.7rem, 5vw, 4rem);
}

.verify {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--blue);
  font-size: 1rem;
}

.about-grid {
  grid-template-columns: 1fr 0.78fr 0.92fr 0.92fr;
}

.about-card {
  padding: 18px;
  border-radius: 16px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
}

.timeline-item span {
  color: var(--blue);
  font-weight: 950;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wide-note {
  margin-top: 14px;
  padding: 18px;
  border-radius: 16px;
  text-align: center;
}

.article-shell {
  width: min(960px, calc(100% - 80px));
  margin: 0 auto 54px;
  padding-top: 40px;
}

.article-header,
.prose,
.post-nav {
  border-radius: 20px;
}

.article-header {
  padding: 30px;
  margin-bottom: 16px;
}

.article-header h1,
.not-found h1 {
  margin: 0;
  font-size: 2.45rem;
  line-height: 1.14;
}

.article-cover {
  width: 100%;
  margin-top: 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 900;
}

.reading-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 100;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--pink));
}

.prose {
  padding: 30px;
}

.prose h2 {
  margin: 28px 0 10px;
  font-size: 1.42rem;
}

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

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

.prose pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 16px;
  background: rgba(47, 125, 244, 0.1);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
}

.not-found {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  width: min(680px, calc(100% - 48px));
  margin: 0 auto;
  text-align: center;
}

.not-found img {
  width: 120px;
  height: 120px;
  border-radius: 24px;
}

.empty-state {
  grid-column: 1 / -1;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0;
  color: var(--muted);
  font-weight: 800;
}

.site-footer p {
  margin: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 27, 45, 0.42);
  backdrop-filter: blur(10px);
}

.modal {
  width: min(620px, 100%);
  padding: 24px;
  border-radius: 22px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.modal header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.modal h2 {
  margin: 0;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a[aria-current="page"]::after {
    bottom: 0;
  }

  .hero,
  .home-grid,
  .content-layout,
  .notes-layout,
  .page-hero,
  .project-feature,
  .about-hero-new,
  .resource-feature {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .stats-row {
    padding-left: 0;
  }

  .hero-copy {
    transform: none;
  }

  .stats-row {
    max-width: 100%;
    margin: 18px 0 22px;
  }

  .hero-art {
    margin-left: 0;
  }

  .project-grid,
  .resource-grid,
  .project-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-main,
  .header-inner,
  .site-footer,
  .article-shell {
    width: min(100% - 32px, var(--content));
  }

  .header-inner {
    grid-template-columns: 1fr;
    padding: 12px 0;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .brand strong {
    font-size: 1.22rem;
  }

  .stats-row,
  .project-summary,
  .project-strip,
  .feature-row,
  .article-grid,
  .project-grid,
  .resource-grid,
  .notes-row,
  .reading-row,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .article-card.featured,
  .resource-card {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .site-footer {
    display: grid;
  }

  .search-field {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .site-main {
    padding-top: 22px;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    justify-content: stretch;
    justify-self: stretch;
    max-width: calc(100vw - 32px);
    overflow: visible;
    padding-bottom: 4px;
    width: 100%;
  }

  .site-nav a {
    min-width: 0;
    justify-content: center;
    min-height: 38px;
    padding: 6px 4px;
    border-radius: 12px;
    font-size: 0.9rem;
  }

  .hero h1,
  .page-hero h1,
  .about-title {
    font-size: 2.18rem;
  }

  .page-art,
  .about-chip {
    min-height: 230px;
  }

  .button-row,
  .article-actions,
  .post-nav {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .sensor.two,
  .code-screen {
    display: none;
  }
}
