:root {
  color-scheme: dark;
  --bg: #0a0c11;
  --line: rgba(255, 255, 255, .09);
  --text: #e8edf5;
  --muted: #8b96a8;
  --mint: #6ee7b7;
  --cyan: #4dd6ff;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }
::selection { background: rgba(110, 231, 183, .25); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 30;
  padding: 10px 16px;
  border-radius: 0 0 12px 12px;
  background: var(--mint);
  color: #06110c;
  font-weight: 600;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* ---------- 背景 ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.backdrop__grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(72% 62% at 50% 16%, #000 18%, transparent 86%);
  mask-image: radial-gradient(72% 62% at 50% 16%, #000 18%, transparent 86%);
}
.backdrop__aurora {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(42% 38% at 76% 6%, rgba(77, 214, 255, .22), transparent 70%),
    radial-gradient(38% 34% at 16% 12%, rgba(167, 139, 250, .18), transparent 70%),
    radial-gradient(52% 42% at 50% 100%, rgba(110, 231, 183, .10), transparent 72%);
  filter: blur(12px);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: 13px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: rgba(10, 12, 17, .72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: .3px;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 13px;
  color: #06110c;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  box-shadow: 0 6px 18px -6px rgba(77, 214, 255, .7);
  transition: transform .3s ease;
}
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }
.brand__name { font-size: 15px; }
.nav__links {
  display: flex;
  gap: clamp(14px, 2.4vw, 32px);
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
}
.nav__links a { transition: color .2s ease; }
.nav__links a:hover { color: var(--text); }
.nav__domain {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 92px) clamp(20px, 5vw, 56px) clamp(20px, 3vw, 32px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 1.6px;
  color: var(--muted);
}
.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(110, 231, 183, .12);
  animation: breathe 2.8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.8); }
}
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.14;
  letter-spacing: -1px;
  font-weight: 700;
}
.grad {
  background: linear-gradient(100deg, var(--mint) 0%, var(--cyan) 48%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.lede {
  max-width: 40em;
  margin: 0 0 28px;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--muted);
}
.lede code {
  font-size: .92em;
  color: var(--cyan);
  background: rgba(77, 214, 255, .08);
  padding: 2px 6px;
  border-radius: 6px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary {
  color: #06110c;
  background: linear-gradient(120deg, var(--mint), var(--cyan));
  box-shadow: 0 14px 30px -14px rgba(77, 214, 255, .8);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px -14px rgba(77, 214, 255, 1);
}
.btn--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, .03);
  border-color: var(--line);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .2);
}
.btn__icon { font-size: 15px; line-height: 1; }
.btn.is-spin .btn__icon { animation: spin .7s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.hero__facts li { display: flex; flex-direction: column; gap: 4px; }
.hero__facts b { font-size: 13.5px; font-weight: 600; }
.hero__facts span {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- Vibe Coding 动画窗口 ---------- */
.vibe { position: relative; }
.vibe__window {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: linear-gradient(180deg, #151a24 0%, #0c0f16 100%);
  box-shadow:
    0 40px 90px -45px rgba(77, 214, 255, .45),
    0 30px 70px -40px rgba(0, 0, 0, .95),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  overflow: hidden;
  transition: opacity .42s ease, transform .42s ease;
}
.vibe__window.is-fading { opacity: 0; transform: translateY(8px) scale(.985); }
.vibe__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .02);
}
.dots { display: inline-flex; gap: 6px; }
.dots i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2b3240;
}
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.vibe__file {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}
.vibe__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .3px;
  color: var(--muted);
  transition: color .3s ease, border-color .3s ease, background .3s ease;
}
.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.vibe__state.is-thinking {
  color: var(--violet);
  border-color: rgba(167, 139, 250, .3);
  background: rgba(167, 139, 250, .08);
}
.vibe__state.is-writing {
  color: var(--cyan);
  border-color: rgba(77, 214, 255, .3);
  background: rgba(77, 214, 255, .08);
}
.vibe__state.is-writing .pulse { animation: breathe 1s ease-in-out infinite; }
.vibe__state.is-done {
  color: var(--mint);
  border-color: rgba(110, 231, 183, .35);
  background: rgba(110, 231, 183, .09);
}
.vibe__prompt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 56px;
  padding: 14px 16px;
  border-bottom: 1px dashed rgba(255, 255, 255, .07);
}
.vibe__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 600;
  color: #06110c;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
}
.vibe__prompt p {
  margin: 0;
  padding-top: 2px;
  font-size: 13px;
  line-height: 1.6;
  color: #c4cddc;
}
.vibe__editor {
  --code-lh: 23px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-content: start;
  align-items: start;
  height: clamp(248px, 34vh, 336px);
  overflow: auto;
  background: #0b0e15;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: var(--code-lh);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .15) transparent;
}
.vibe__gutter {
  position: sticky;
  left: 0;
  padding: 14px 10px 18px 0;
  border-right: 1px solid rgba(255, 255, 255, .05);
  background: #0b0e15;
  text-align: right;
  color: #3d4657;
  user-select: none;
}
.code-line__num {
  display: block;
  height: var(--code-lh);
  line-height: var(--code-lh);
}
.vibe__code {
  min-width: 0;
  padding: 14px 16px 18px 12px;
  white-space: pre;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.code-line { min-height: var(--code-lh); }

.tok-k { color: #ff7ac6; }
.tok-s { color: #8fe3b4; }
.tok-n { color: #ffd479; }
.tok-f { color: #7cd4ff; }
.tok-c { color: #566173; font-style: italic; }
.tok-p { color: #9aa7b8; }

.caret {
  display: inline-block;
  width: 7px;
  height: 1.02em;
  margin-left: 1px;
  border-radius: 1px;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(110, 231, 183, .55);
  vertical-align: text-bottom;
  animation: blink 1s steps(2, start) infinite;
}
.caret--text {
  width: 2px;
  background: var(--cyan);
  box-shadow: none;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.vibe__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .015);
  font-family: var(--mono);
  font-size: 11px;
  color: #5d6979;
}
.vibe__tip { color: #7c8798; }
.vibe__brand { color: var(--violet); letter-spacing: .5px; }
.vibe__caption {
  margin: 14px 2px 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- 随笔区 ---------- */
section { scroll-margin-top: 84px; }
.notes,
.about {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 56px);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.section-head h2,
.about h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -.4px;
}
.section-head p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}
.notes__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012));
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(110, 231, 183, .32);
  box-shadow: 0 22px 50px -32px rgba(110, 231, 183, .55);
}
.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.tag {
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .4px;
}
.tag--study { color: var(--cyan); }
.tag--life { color: var(--violet); }
.tag--pit { color: var(--amber); }
.tag--idea { color: var(--mint); }
.card time {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #5d6979;
}
.card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.5;
}
.card p {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, .07);
  font-family: var(--mono);
  font-size: 11.5px;
  color: #5d6979;
}
.card__more { color: var(--mint); }
.card--link { cursor: pointer; }
.card--link:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
.card--link .card__more {
  display: inline-block;
  transition: transform .2s ease;
}
.card--link:hover .card__more { transform: translateX(3px); }

/* ---------- 关于 ---------- */
.about {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.about__text h2 { margin-bottom: 16px; }
.about__text p {
  max-width: 46ch;
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--muted);
}
.about__info {
  margin: 0;
  padding: 6px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01));
}
.about__info div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .06);
}
.about__info div:last-child { border-bottom: 0; }
.about__info dt {
  font-size: 12.5px;
  color: var(--muted);
}
.about__info dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #c9d3e1;
  text-align: right;
}

/* ---------- 页脚 ---------- */
.foot {
  padding: 30px clamp(20px, 5vw, 56px) 40px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.foot__brand {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--mint);
}
.foot__line {
  margin: 0 0 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.foot__note {
  margin: 0;
  font-size: 11.5px;
  color: #5d6979;
}
.foot__icp {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.foot__icp a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.foot__icp a:hover {
  color: var(--accent, #6ee7b7);
  text-decoration: underline;
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .vibe { order: -1; }
  .about { grid-template-columns: 1fr; }
  .vibe__editor { height: 300px; }
}
@media (max-width: 640px) {
  .nav { gap: 12px; }
  .nav__links { gap: 14px; font-size: 13px; }
  .nav__domain { display: none; }
  .hero__facts { grid-template-columns: 1fr; gap: 12px; }
  .hero__facts li {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }
  .vibe__bar { gap: 8px; }
  .vibe__state { padding: 3px 7px; }
  .vibe__editor { grid-template-columns: 36px 1fr; height: 280px; font-size: 11px; }
  .vibe__gutter { padding-right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
