:root {
  color-scheme: dark;
  --bg: #030713;
  --bg-soft: #071226;
  --panel: rgba(8, 19, 39, 0.78);
  --panel-strong: rgba(10, 25, 54, 0.92);
  --line: rgba(68, 139, 255, 0.22);
  --line-bright: rgba(55, 169, 255, 0.58);
  --text: #f5f9ff;
  --soft: #c7d3e7;
  --muted: #7f91ad;
  --blue: #2bb8ff;
  --indigo: #6156ff;
  --cyan: #64e4ff;
  --purple: #8a65ff;
  --green: #52f0c8;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 62% 9%, rgba(37, 121, 255, 0.26), transparent 34%),
    radial-gradient(circle at 20% 14%, rgba(95, 66, 255, 0.2), transparent 30%),
    linear-gradient(180deg, #030713 0%, #071529 42%, #030713 100%);
  color: var(--text);
  font-family:
    Inter,
    "SF Pro Display",
    "Noto Sans SC",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(80, 144, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 144, 255, 0.055) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.88), transparent 92%);
}

body.article-page {
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(5, 12, 29, 0.88) 44%, rgba(5, 12, 29, 0.7) 100%),
    linear-gradient(180deg, rgba(3, 7, 19, 0.48), #071529 520px, #071529 100%),
    url("./assets/site/zhixing-hero-bg-text.png") top right / min(1180px, 92vw) auto no-repeat,
    #030711;
}

#neural-canvas {
  display: none;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(100% - 64px, 1440px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 170px;
  align-items: center;
  min-height: 70px;
  border-bottom: 1px solid rgba(78, 136, 255, 0.16);
  background: rgba(3, 8, 19, 0.74);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand,
.header-actions,
.site-nav,
.social-strip,
.hero-actions,
.section-head,
.compact-head,
.footer-brand,
.footer-bottom {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--indigo), var(--blue));
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 28px rgba(54, 139, 255, 0.38);
}

.brand-mark.brand-avatar {
  overflow: hidden;
  padding: 2px;
  background: linear-gradient(135deg, rgba(97, 86, 255, 0.9), rgba(43, 184, 255, 0.9));
}

.brand-mark.brand-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.footer-brand .brand-mark.brand-avatar {
  width: 38px;
  height: 38px;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong,
.footer-brand strong {
  font-size: 18px;
  line-height: 1;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
}

.site-nav {
  justify-content: center;
  gap: 42px;
}

.site-nav a {
  position: relative;
  min-height: 70px;
  display: inline-flex;
  align-items: center;
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--purple), var(--blue));
  opacity: 0;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: #ffffff;
  outline: none;
}

.site-nav a.is-active::after,
.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  opacity: 1;
}

.header-actions {
  justify-content: flex-end;
  gap: 14px;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--soft);
}

.subscribe-button,
.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  font-weight: 800;
}

.subscribe-button {
  min-height: 30px;
  padding: 0 18px;
  background: linear-gradient(90deg, #7758ff, #16b9ff);
  color: #ffffff;
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(28, 140, 255, 0.28);
}

.hero-section {
  position: relative;
  isolation: isolate;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 0.72fr) minmax(460px, 1fr);
  gap: 40px;
  align-items: center;
  min-height: 430px;
  padding: 0 42px;
  border-bottom: 1px solid rgba(64, 125, 255, 0.12);
  background:
    linear-gradient(90deg, rgba(6, 12, 31, 0.92) 0%, rgba(10, 23, 55, 0.7) 36%, rgba(5, 13, 31, 0.28) 72%),
    linear-gradient(180deg, rgba(3, 7, 19, 0.18), rgba(3, 7, 19, 0.42) 92%, #071529 100%),
    url("./assets/site/zhixing-hero-bg-text.png") center right / cover no-repeat;
  box-shadow: inset 0 -1px 0 rgba(60, 140, 255, 0.14);
}

.hero-section::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(80, 144, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 144, 255, 0.035) 1px, transparent 1px);
  background-size: 80px 80px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 34px 0 28px;
}

.hero-copy h1 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-copy h1 span {
  background: linear-gradient(90deg, #83f2ff, #23adff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  margin: 20px 0 0;
  color: var(--soft);
  font-size: 19px;
  line-height: 1.8;
}

.hero-actions {
  gap: 20px;
  margin-top: 32px;
}

.primary-action {
  min-width: 160px;
  border: 1px solid rgba(72, 170, 255, 0.42);
  background: linear-gradient(90deg, #7359ff, #19c4ff);
  color: #ffffff;
  box-shadow: 0 18px 45px rgba(32, 140, 255, 0.28);
}

.ghost-action {
  min-width: 160px;
  border: 1px solid rgba(116, 145, 214, 0.48);
  background: rgba(5, 14, 31, 0.58);
  color: var(--text);
}

.primary-action:hover,
.primary-action:focus-visible,
.ghost-action:hover,
.ghost-action:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.social-strip {
  gap: 18px;
  margin-top: 34px;
}

.social-strip a {
  display: grid;
  min-width: 46px;
  height: 22px;
  padding: 0 2px;
  place-items: center;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.hero-stage {
  display: none;
}

.home-section {
  margin: 0 0 26px;
  padding: 28px 40px;
  border: 1px solid rgba(73, 126, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 20, 43, 0.86), rgba(6, 14, 29, 0.9)),
    var(--panel);
  box-shadow: var(--shadow);
}

.latest-section {
  margin-top: 0;
}

.section-head {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.2;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-head a {
  color: var(--soft);
  font-size: 14px;
}

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

.post-card,
.project-card,
.article-row,
.message-card,
.about-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 18, 39, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.post-card,
.project-card {
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.post-card:hover,
.project-card:hover,
.article-row:hover {
  transform: translateY(-3px);
  border-color: var(--line-bright);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.post-visual,
.project-visual,
.row-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(56, 205, 255, 0.38), transparent 24%),
    linear-gradient(135deg, rgba(20, 51, 119, 0.9), rgba(7, 15, 34, 0.94));
}

.post-visual {
  aspect-ratio: 2.35 / 1;
}

.post-visual img,
.project-visual img,
.row-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-visual::before,
.project-visual::before,
.row-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(101, 218, 255, 0.18) 18% 19%, transparent 19% 100%),
    linear-gradient(0deg, transparent 0 24%, rgba(106, 95, 255, 0.16) 24% 25%, transparent 25% 100%);
  background-size: 36px 36px;
}

.post-visual::after,
.project-visual::after,
.row-visual::after {
  position: absolute;
  inset: auto 20% 30% 20%;
  height: 2px;
  content: "";
  background: var(--cyan);
  box-shadow:
    0 0 18px var(--cyan),
    0 -28px 32px rgba(70, 153, 255, 0.32),
    0 28px 32px rgba(114, 85, 255, 0.32);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.tag-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.tag-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(74, 97, 255, 0.22);
  color: #b8ccff;
  font-size: 12px;
}

.facet-chips {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.topic-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(43, 184, 255, 0.16);
  color: #8de7ff;
  font-size: 12px;
}

.post-card h3,
.project-card h3,
.article-row h3 {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.45;
}

.post-card p,
.project-card p,
.article-row p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #aebbd2;
  font-size: 13px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.meta-row {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}

.article-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
}

.category-panel {
  display: grid;
  align-self: start;
  gap: 10px;
}

.facet-panel {
  display: grid;
  gap: 8px;
}

.facet-panel h3 {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-filter,
.archive-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 52px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(12, 25, 52, 0.72);
  color: var(--muted);
  padding: 0 14px;
  text-align: left;
}

.tag-index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-filter {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid rgba(73, 126, 255, 0.18);
  border-radius: 6px;
  background: rgba(8, 20, 43, 0.74);
  color: var(--muted);
  font-size: 11px;
}

.tag-filter small {
  color: var(--soft);
}

.tag-filter:hover,
.tag-filter:focus-visible,
.tag-filter.is-active {
  border-color: rgba(43, 184, 255, 0.52);
  background: rgba(20, 55, 96, 0.82);
  color: #ffffff;
  outline: none;
}

.category-filter.is-active,
.archive-filter.is-active,
.category-filter:hover,
.archive-filter:hover,
.category-filter:focus-visible,
.archive-filter:focus-visible {
  border-color: rgba(91, 108, 255, 0.36);
  background: rgba(26, 39, 88, 0.84);
  color: #ffffff;
  outline: none;
}

.category-filter strong,
.archive-filter strong {
  color: var(--soft);
  font-size: 13px;
}

.archive-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(73, 126, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 15, 33, 0.58);
}

.archive-panel h3 {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
}

.archive-list {
  display: grid;
  gap: 8px;
}

.archive-filter {
  min-height: 40px;
  padding: 0 10px;
  font-size: 12px;
}

.article-stream {
  display: grid;
  gap: 14px;
}

.search-row {
  display: none;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 15, 33, 0.78);
  padding: 0 14px;
  color: var(--muted);
}

.search-row.is-open {
  display: grid;
}

.search-row input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.article-list {
  display: grid;
  gap: 14px;
}

.article-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 160px;
  gap: 18px;
  align-items: center;
  min-height: 112px;
  padding: 14px;
}

.row-visual {
  width: 100%;
  height: auto;
  aspect-ratio: 2.35 / 1;
  border-radius: 6px;
}

.row-content {
  display: grid;
  gap: 8px;
}

.row-stats {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 12px;
}

.pager button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 20, 43, 0.8);
  color: var(--muted);
}

.pager button.is-active {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #ffffff;
}

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

.project-visual {
  height: 138px;
}

.project-card .card-body {
  min-height: 168px;
}

.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stack-row span {
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--soft);
  font-size: 12px;
}

.card-link {
  color: #56a8ff;
  font-size: 13px;
  font-weight: 800;
}

.about-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 300px 250px;
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.avatar-orbit {
  display: grid;
  width: 170px;
  height: 170px;
  place-items: center;
  border: 1px solid rgba(59, 161, 255, 0.35);
  border-radius: 50%;
  background:
    conic-gradient(from 180deg, rgba(94, 87, 255, 0.9), transparent 14%, rgba(31, 188, 255, 0.8), transparent 44%, rgba(94, 87, 255, 0.9)),
    rgba(9, 23, 49, 0.8);
  box-shadow: 0 0 50px rgba(47, 158, 255, 0.28);
}

.avatar-face {
  display: block;
  width: 132px;
  height: 132px;
  object-fit: cover;
  object-position: 52% 28%;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 38px rgba(21, 141, 255, 0.28);
}

.about-copy h3 {
  margin: 0 0 14px;
  font-size: 22px;
}

.about-copy p {
  margin: 0;
  color: var(--soft);
  line-height: 1.8;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.about-tags span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--soft);
  font-size: 12px;
}

.timeline {
  display: grid;
  gap: 18px;
  color: var(--soft);
  font-size: 13px;
}

.timeline div {
  display: grid;
  gap: 4px;
  padding-left: 16px;
  border-left: 2px solid rgba(84, 116, 255, 0.5);
}

.timeline strong {
  color: #ffffff;
}

.timeline span {
  color: var(--muted);
}

.timeline a {
  color: #62aaff;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats-grid div {
  display: grid;
  min-height: 92px;
  place-items: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-grid div:nth-child(2n) {
  border-right: 0;
}

.stats-grid div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.stats-grid strong {
  color: var(--blue);
  font-size: 28px;
}

.stats-grid span {
  color: var(--soft);
  font-size: 13px;
}

.message-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
}

.message-form {
  display: grid;
  gap: 14px;
}

.reply-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(43, 184, 255, 0.24);
  border-radius: 8px;
  background: rgba(12, 34, 68, 0.62);
  color: var(--soft);
  font-size: 13px;
}

.reply-context[hidden] {
  display: none;
}

.reply-context button {
  min-height: 26px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
}

.message-form input,
.message-form textarea,
.subscribe-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 18, 39, 0.76);
  color: var(--text);
  outline: none;
}

.message-form input {
  min-height: 44px;
  padding: 0 14px;
}

.message-form textarea {
  resize: vertical;
  padding: 14px;
}

.message-list {
  display: grid;
  gap: 14px;
}

.message-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
}

.message-card.is-reply {
  padding: 12px;
  background: rgba(8, 20, 43, 0.5);
}

.message-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #ffffff;
  font-weight: 900;
}

.message-main {
  min-width: 0;
}

.message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.message-card h3 {
  margin: 0;
  font-size: 14px;
}

.owner-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 6px;
  padding: 0 6px;
  border: 1px solid rgba(82, 240, 200, 0.28);
  border-radius: 999px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.message-card p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
}

.message-card time {
  color: var(--muted);
  font-size: 12px;
}

.message-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.reply-button {
  min-height: 30px;
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  background: transparent;
  color: #62aaff;
  font-size: 12px;
}

.message-replies {
  display: grid;
  grid-column: 2;
  gap: 10px;
  margin-top: -2px;
  padding-left: 12px;
  border-left: 1px solid rgba(73, 126, 255, 0.18);
}

.message-status {
  min-height: 18px;
  color: #62e6c4;
  font-size: 12px;
}

.message-status.is-error {
  color: #ff8aa2;
}

.site-footer {
  margin: 18px 0 0;
  padding: 26px;
  border: 1px solid rgba(73, 126, 255, 0.18);
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, rgba(7, 17, 36, 0.76), rgba(3, 8, 19, 0.92));
}

.footer-brand {
  gap: 12px;
  margin-bottom: 26px;
}

.footer-brand p {
  margin: 6px 0 0;
  color: var(--muted);
}

.footer-columns {
  display: grid;
  grid-template-columns: minmax(118px, 0.55fr) minmax(138px, 0.58fr) minmax(410px, 1.45fr) minmax(300px, 0.98fr);
  gap: 20px 22px;
  align-items: stretch;
}

.footer-columns > div {
  min-width: 0;
}

.footer-columns > div:not(.footer-resources):not(.subscribe-anchor) {
  padding-top: 14px;
}

.footer-columns h3,
.subscribe-form h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.footer-columns a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-resource-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.footer-resources {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(73, 126, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 15, 32, 0.52);
}

.subscribe-anchor {
  display: block;
  height: 100%;
  scroll-margin-top: 96px;
}

.resource-card {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  margin: 0 !important;
  padding: 9px 10px;
  border: 1px solid rgba(73, 126, 255, 0.2);
  border-radius: 8px;
  background: rgba(8, 20, 43, 0.62);
}

.resource-card strong,
.resource-card em {
  display: block;
  font-style: normal;
}

.resource-card strong {
  color: var(--text);
  font-size: 14px;
}

.resource-card em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.resource-badge {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.resource-badge.is-jlu {
  background: linear-gradient(135deg, #185ddc, #37c9ff);
}

.resource-badge.is-xhs {
  background: linear-gradient(135deg, #ff274f, #ff7a9e);
}

.footer-account-group {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.footer-account-group h4 {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.qrcode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 64px));
  gap: 8px;
  align-items: start;
}

.qrcode-card {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 92px;
  padding: 7px 5px;
  border: 1px solid rgba(73, 126, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 15, 32, 0.72);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.qrcode-card:hover,
.qrcode-card:focus-visible {
  border-color: rgba(43, 184, 255, 0.5);
  outline: none;
  transform: translateY(-1px);
}

.qrcode-card img {
  width: min(100%, 50px);
  aspect-ratio: 1;
  object-fit: cover;
  padding: 3px;
  border-radius: 6px;
  background: #ffffff;
  transition: width 0.18s ease, padding 0.18s ease;
}

.qrcode-card strong {
  color: var(--text);
  font-size: 10.5px;
  line-height: 1.25;
}

.qrcode-card.is-expanded {
  grid-column: span 2;
  min-height: 128px;
  background: rgba(8, 26, 54, 0.9);
  border-color: rgba(43, 184, 255, 0.56);
}

.qrcode-card.is-expanded img {
  width: min(100%, 88px);
  padding: 5px;
}

.subscribe-form {
  height: 100%;
  padding: 16px;
  border: 1px solid rgba(73, 126, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 15, 32, 0.52);
}

.subscribe-form p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.subscribe-form label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.subscribe-form input {
  min-height: 42px;
  padding: 0 12px;
}

.subscribe-form button {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #ffffff;
  cursor: pointer;
}

.subscribe-status {
  min-height: 18px;
  margin-top: 10px;
  color: #62e6c4;
  font-size: 12px;
  line-height: 1.5;
}

.subscribe-status.is-error {
  color: #ff8aa2;
}

.qr-modal[hidden] {
  display: none;
}

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(1, 5, 14, 0.74);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.qr-modal-panel {
  position: relative;
  z-index: 1;
  width: min(340px, 92vw);
  padding: 22px;
  border: 1px solid rgba(73, 126, 255, 0.28);
  border-radius: 8px;
  background: rgba(7, 17, 36, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  text-align: center;
}

.qr-modal-panel h3 {
  margin: 0 34px 16px;
  font-size: 18px;
}

.qr-modal-panel img {
  width: min(260px, 72vw);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 12px;
  border-radius: 8px;
  background: #ffffff;
}

.qr-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(73, 126, 255, 0.24);
  border-radius: 8px;
  background: rgba(4, 11, 26, 0.78);
  color: var(--soft);
  cursor: pointer;
}

.footer-bottom {
  justify-content: space-between;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(73, 126, 255, 0.12);
  color: var(--muted);
  font-size: 13px;
}

.article-page .page-shell {
  width: min(100% - 64px, 1180px);
}

.article-page[data-reader-width="wide"] .page-shell {
  width: min(100% - 64px, 1440px);
}

.article-page .site-header {
  grid-template-columns: 190px minmax(0, 1fr) 92px;
}

.article-page .site-nav {
  gap: 32px;
}

.article-page .header-actions {
  min-width: 0;
}

.article-page .subscribe-button {
  width: 78px;
  padding: 0 14px;
}

.article-detail {
  margin: 34px 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 18, 39, 0.76);
}

.article-page[data-reader-width="comfortable"] .article-detail {
  max-width: 920px;
  margin-right: auto;
  margin-left: auto;
}

.article-page[data-reader-width="wide"] .article-detail {
  max-width: none;
}

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

.back-link {
  color: #62aaff;
  font-weight: 800;
}

.reader-width-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(78px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 12, 28, 0.72);
}

.reader-width-toggle button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.reader-width-toggle button.is-active {
  background: linear-gradient(135deg, rgba(91, 82, 255, 0.92), rgba(43, 184, 255, 0.92));
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(43, 184, 255, 0.18);
}

.article-header h1 {
  margin: 16px 0;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.15;
}

.article-header p,
.article-content {
  color: var(--soft);
  line-height: 1.9;
}

.article-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(74, 97, 255, 0.2);
  color: #b8ccff;
  font-size: 12px;
}

.article-cover,
.article-image img {
  display: block;
  width: 100%;
  border-radius: 8px;
}

.article-cover {
  aspect-ratio: 2.35 / 1;
  max-height: none;
  margin: 24px 0;
  object-fit: cover;
}

.article-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.article-topic {
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(43, 184, 255, 0.16);
  color: #8de7ff;
  font-size: 12px;
}

.article-content h2,
.article-content h3 {
  color: #ffffff;
}

.article-content a {
  color: #62aaff;
}

.article-content p,
.article-content li {
  overflow-wrap: anywhere;
}

.article-image {
  margin: 22px 0;
}

.article-image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.article-table-wrap {
  overflow-x: auto;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
}

.article-content th,
.article-content td {
  padding: 10px 12px;
  border: 1px solid var(--line);
}

.article-content pre,
.article-content code {
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
}

.article-content pre {
  overflow-x: auto;
  padding: 16px;
}

.article-content blockquote {
  margin-left: 0;
  padding: 14px 18px;
  border-left: 3px solid var(--blue);
  background: rgba(43, 184, 255, 0.08);
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 190px minmax(0, 1fr) 150px;
  }

  .site-nav {
    gap: 22px;
  }

  .hero-section,
  .about-card {
    grid-template-columns: 1fr;
  }

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

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

  .about-card {
    align-items: start;
  }
}

@media (max-width: 860px) {
  .page-shell,
  .article-page .page-shell {
    width: min(100% - 28px, 1440px);
  }

  .site-header {
    position: relative;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 0;
  }

  .article-page .site-header {
    grid-template-columns: 1fr auto;
  }

  .article-page .brand {
    min-width: 0;
  }

  .article-page .brand > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
  }

  .site-nav a {
    min-height: 38px;
    white-space: nowrap;
  }

  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 0 24px 14px;
    background-position: 74% center;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .home-section {
    padding: 22px;
  }

  .featured-grid,
  .project-grid,
  .footer-columns,
  .message-layout,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .qrcode-grid {
    grid-template-columns: repeat(4, minmax(0, 62px));
  }

  .footer-resource-links {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 22px;
  }

  .footer-brand {
    margin-bottom: 18px;
  }

  .article-page .site-footer {
    margin-top: 12px;
  }

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

  .article-row {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .row-stats {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .brand-copy strong {
    font-size: 16px;
  }

  .header-actions {
    gap: 8px;
  }

  .article-page .site-nav {
    gap: 16px;
  }

  .article-detail {
    margin: 18px 0 24px;
    padding: 22px;
  }

  .article-header h1 {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.18;
  }

  .article-header p,
  .article-content {
    line-height: 1.82;
  }

  .article-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .reader-width-toggle {
    width: 100%;
  }

  .article-cover {
    margin: 18px 0;
  }

  .article-image {
    margin: 18px 0;
  }

  .article-content table {
    min-width: 560px;
  }

  .subscribe-button {
    padding: 0 12px;
  }

  .hero-copy {
    padding-top: 34px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-action,
  .ghost-action {
    width: 100%;
  }

  .featured-grid,
  .category-panel {
    grid-template-columns: 1fr;
  }

  .article-row {
    grid-template-columns: 1fr;
  }

  .row-visual {
    height: auto;
  }

  .qrcode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .qrcode-card {
    min-height: 86px;
  }

  .qrcode-card.is-expanded {
    grid-column: span 1;
  }

  .footer-columns > div:not(.footer-resources):not(.subscribe-anchor) {
    padding-top: 4px;
  }

  .subscribe-form label {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .message-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .message-card time,
  .message-card .reply-button {
    grid-column: 2;
    justify-self: start;
  }
}
