:root {
  --red: #ff0000;
  --violet: #8b00ff;
  --ink: #261717;
  --paper: #f7ece7;
  --muted: rgba(255, 240, 235, 0.72);
  --glass: rgba(255, 255, 255, 0.075);
  --glass-2: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.18);
  --line-soft: rgba(255, 255, 255, 0.1);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  --r-card: 18px;
  --r-big: 28px;
  --nav-w: 236px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--ink);
  color: var(--paper);
  font-family: "DM Sans", "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(58% 46% at 12% 6%, rgba(255, 0, 0, 0.34), transparent 72%),
    radial-gradient(54% 44% at 88% 16%, rgba(139, 0, 255, 0.32), transparent 72%),
    radial-gradient(78% 62% at 58% 98%, rgba(255, 64, 88, 0.2), transparent 76%),
    linear-gradient(158deg, #301c18 0%, #1c1211 52%, #251418 100%);
}

.blob {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
}

.blob-1 {
  width: 380px;
  height: 380px;
  top: -120px;
  left: 16%;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.7), transparent 68%);
}

.blob-2 {
  width: 420px;
  height: 420px;
  top: 40%;
  right: -140px;
  background: radial-gradient(circle, rgba(139, 0, 255, 0.62), transparent 68%);
}

.blob-3 {
  width: 340px;
  height: 340px;
  bottom: -160px;
  left: 34%;
  background: radial-gradient(circle, rgba(255, 92, 120, 0.5), transparent 70%);
}

a {
  color: #ffb2a6;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
}

:focus-visible {
  outline: 2px solid #ffd0c6;
  outline-offset: 3px;
  border-radius: 8px;
}

.skip {
  position: fixed;
  left: 10px;
  top: -70px;
  z-index: 90;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.22s ease;
}

.skip:focus {
  top: 10px;
  color: #fff;
}

/* ---------- 左侧竖排导航 ---------- */

.side-nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--nav-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 15px 26px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.07);
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 46px rgba(0, 0, 0, 0.24);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}

.brand {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(255, 0, 0, 0.32);
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-mark {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 900;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(140deg, var(--red), var(--violet));
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.nav-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 9px 12px;
  border-radius: 13px;
  border: 1px solid transparent;
  color: rgba(255, 244, 240, 0.9);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: var(--glass-2);
  border-color: var(--line);
  transform: translateX(3px);
}

.nav-i {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
}

.nav-t {
  min-width: 0;
}

.cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.92), rgba(139, 0, 255, 0.92));
  color: #fff;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(255, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover,
.cta:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(139, 0, 255, 0.34);
}

.cta-wide {
  width: 100%;
  margin-top: 0;
}

/* ---------- 主区 ---------- */

main {
  margin-left: var(--nav-w);
  max-width: 1340px;
  padding: 30px clamp(15px, 3vw, 40px) 54px;
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 26px;
  display: grid;
  gap: 16px;
  align-self: start;
}

.rail-card {
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--red), var(--violet)) 1;
  background: var(--glass);
  padding: 16px 15px 18px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(15px) saturate(128%);
  backdrop-filter: blur(15px) saturate(128%);
}

.rail-h {
  margin: 0 0 10px;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 248, 245, 0.82);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: rail;
}

.rail-list a {
  display: block;
  padding: 8px 6px;
  min-height: 38px;
  border-radius: 10px;
  font-size: 16px;
  color: rgba(255, 244, 240, 0.86);
  text-decoration: none;
  border-left: 2px solid rgba(255, 255, 255, 0.16);
  transition: border-color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  border-left-color: var(--red);
  background: rgba(255, 255, 255, 0.07);
  padding-left: 12px;
}

.rail-cta {
  margin: 0;
}

.post {
  min-width: 0;
  max-width: 860px;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  align-items: center;
  gap: 24px;
  min-height: 68vh;
  padding: clamp(22px, 4vw, 46px);
  text-align: center;
  border-radius: var(--r-big);
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05) 62%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  overflow: hidden;
}

.hero-copy {
  min-width: 0;
  padding: 6px 2px;
}

.hero h1 {
  margin: 0 0 14px;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
  background: linear-gradient(118deg, #ffffff 22%, #ffb9b3 58%, #d9b6ff 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 34px rgba(255, 0, 0, 0.18);
}

.hero-desc {
  margin: 0 auto;
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.08rem);
  line-height: 1.7;
  color: rgba(255, 242, 238, 0.86);
}

.hero-media {
  min-width: 0;
}

.hero-media img,
.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 58vh;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 26px 62px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ---------- 正文 ---------- */

.body {
  display: block;
  margin-top: 22px;
}

.body > article {
  position: relative;
  margin: 0 0 18px;
  padding: clamp(18px, 2.6vw, 30px);
  border-radius: var(--r-card);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  scroll-margin-top: 104px;
}

.body > article::after {
  content: "";
  display: block;
  height: 3px;
  margin-top: 24px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--red), var(--violet));
  opacity: 0.9;
}

.body > article:last-child {
  margin-bottom: 0;
}

.body h2,
.body h3 {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 900;
  line-height: 1.32;
  color: #fff;
  letter-spacing: -0.005em;
}

.body h2 {
  margin: 0 0 0.7em;
  font-size: clamp(1.32rem, 2.4vw, 1.85rem);
}

.body h3 {
  margin: 1.4em 0 0.5em;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}

.body h2 > span,
.body h3 > span {
  position: relative;
}

.body h2 > span::before,
.body h3 > span::before {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-right: 0.5em;
  border-radius: 50%;
  vertical-align: 0.14em;
  background: linear-gradient(135deg, var(--red), var(--violet));
  box-shadow: 0 0 14px rgba(255, 0, 0, 0.75);
}

.body p {
  margin: 0 0 1em;
  font-size: 1.02rem;
  line-height: 1.82;
  color: rgba(255, 244, 240, 0.9);
}

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

.body ul,
.body ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.body li {
  margin: 0 0 0.5em;
  line-height: 1.78;
}

.body strong {
  color: #fff;
  font-weight: 700;
}

.body img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
}

.body blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--violet);
  border-radius: 0 14px 14px 0;
  background: rgba(139, 0, 255, 0.13);
  color: rgba(255, 246, 243, 0.92);
}

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

.body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1em;
  font-size: 0.98rem;
}

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

.body th {
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
}

.body code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.94em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- 页脚 ---------- */

.site-foot {
  margin-left: var(--nav-w);
  padding: 20px clamp(15px, 3vw, 40px) 46px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  border-top: 1px solid var(--line-soft);
}

.foot-cta {
  order: 1;
  flex: 1 1 100%;
  margin: 0;
}

.foot-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 14px 20px;
  border-radius: var(--r-card);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.6), rgba(139, 0, 255, 0.6));
  color: #fff;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(255, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.foot-cta a:hover,
.foot-cta a:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(139, 0, 255, 0.3);
}

.foot-links {
  order: 2;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 2px;
  color: rgba(255, 240, 235, 0.86);
  font-size: 16px;
  text-decoration: none;
}

.foot-links a:hover {
  color: #fff;
}

.site-foot small {
  order: 3;
  margin-left: auto;
  font-size: 0.95rem;
  color: rgba(255, 236, 231, 0.62);
}

/* ---------- 动效 ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.62s cubic-bezier(0.22, 0.7, 0.3, 1), transform 0.62s cubic-bezier(0.22, 0.7, 0.3, 1);
  will-change: opacity, transform;
}

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

.body > article,
.rail-list a,
.nav-list a,
.brand {
  transition-duration: 0.22s;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 1080px) {
  main {
    grid-template-columns: 228px minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .side-nav {
    position: sticky;
    inset: 0 auto auto 0;
    width: auto;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 8px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  }

  .brand {
    margin-right: auto;
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .nav-list {
    order: 3;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 2px 0 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-list li {
    flex: 0 0 auto;
  }

  .nav-list a {
    min-height: 44px;
    padding: 9px 13px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--line-soft);
  }

  .nav-list a:hover {
    transform: none;
  }

  .cta {
    margin-top: 0;
    min-height: 42px;
    padding: 9px 15px;
    font-size: 14px;
  }

  main {
    margin-left: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px 15px 34px;
  }

  .post {
    order: 1;
    max-width: none;
  }

  .rail {
    order: 2;
    position: static;
    gap: 14px;
  }

  .rail-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .rail-list a {
    border-left: 0;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 8px 13px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
  }

  .rail-list a:hover {
    padding-left: 13px;
    border-color: var(--red);
  }

  .hero {
    min-height: 0;
    padding: 22px 18px 26px;
    gap: 18px;
  }

  .hero-media img,
  .hero-img {
    max-height: 44vh;
  }

  .body > article {
    scroll-margin-top: 120px;
    padding: 18px 16px;
  }

  .site-foot {
    margin-left: 0;
    padding: 16px 15px 38px;
  }

  .site-foot small {
    margin-left: 0;
    flex: 1 1 100%;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 16.5px;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.2rem);
  }

  .foot-cta a {
    font-size: 1rem;
    min-height: 60px;
  }
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cta,
  .brand,
  .nav-list a,
  .foot-cta a,
  .rail-list a {
    transition: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
