@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=EB+Garamond:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #170f1f;
  --ink: #1f1726;
  --purple: #56228b;
  --purple-lt: #8b58c4;
  --ochre: #8b4513;
  --ochre-lt: #bf7a37;
  --cream: #f5eef8;
  --muted: #c3b1cf;
  --line: rgba(245, 238, 248, 0.2);
  --line-soft: rgba(245, 238, 248, 0.11);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(1100px 640px at 84% -12%, rgba(86, 34, 139, 0.5), transparent 62%),
    radial-gradient(900px 620px at -14% 44%, rgba(139, 69, 19, 0.3), transparent 62%),
    var(--bg);
  color: var(--cream);
  font-family: 'Crimson Text', Georgia, 'Songti SC', 'Noto Serif SC', serif;
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: 'EB Garamond', 'Crimson Text', Georgia, serif;
  font-weight: 600;
  line-height: 1.24;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--cream);
  text-decoration: none;
}

a:hover {
  color: var(--ochre-lt);
}

:focus-visible {
  outline: 2px solid var(--ochre-lt);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 18px;
}

.skip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  padding: 10px 16px;
  background: var(--purple);
  border: 1px solid var(--ochre-lt);
  transform: translateY(-130%);
}

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

/* 顶部细条 */
.topbar {
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
}

.topbar .wrap {
  padding: 7px 18px;
}

.topbar-txt {
  letter-spacing: 0.26em;
}

/* 导航 */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(20, 13, 27, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px 11px;
  font-family: 'EB Garamond', 'Crimson Text', Georgia, serif;
  font-size: 21px;
  letter-spacing: 0.04em;
}

.brand-txt {
  border-bottom: 1px solid transparent;
}

.brand:hover .brand-txt {
  border-bottom-color: var(--ochre);
}

.mark {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 1px solid var(--ochre-lt);
  border-radius: 62% 38% 55% 45% / 48% 58% 42% 52%;
  transform: rotate(-14deg);
}

.nav-menu {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 12px 12px;
  scrollbar-width: thin;
}

.navlink {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 16px;
  white-space: nowrap;
}

.navlink:hover,
.navlink:focus-visible {
  color: var(--cream);
  border-color: var(--line);
}

.ico {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border: 1px solid var(--ochre-lt);
  border-radius: 60% 40% 55% 45% / 50% 55% 45% 50%;
}

.navlink:nth-child(2n) .ico {
  border-color: var(--purple-lt);
  border-radius: 42% 58% 38% 62% / 56% 44% 62% 38%;
}

/* 首屏 */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-image: radial-gradient(rgba(245, 238, 248, 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(to top, rgba(23, 15, 31, 0.9), transparent);
  pointer-events: none;
}

.hero-in {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 26px;
  padding: 30px 18px 40px;
  text-align: center;
}

.kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ochre);
  color: var(--ochre-lt);
  font-size: 16px;
  letter-spacing: 0.24em;
}

h1 {
  margin: 0 auto 0.4em;
  max-width: 22ch;
  font-size: clamp(29px, 7.4vw, 54px);
  letter-spacing: 0.01em;
}

.lede {
  max-width: 36ch;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 17px;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 26px;
  border: 1px solid var(--ochre-lt);
  letter-spacing: 0.14em;
  font-size: 16px;
}

.cta:hover {
  background: var(--ochre);
  border-color: var(--ochre);
  color: var(--cream);
}

.hero-art {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 232px;
}

.vine {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 168px;
  height: 100%;
  color: rgba(191, 122, 55, 0.6);
  pointer-events: none;
}

.arch {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(258px, 82%);
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 50% 50% 0 0 / 38% 38% 0 0;
  background: linear-gradient(158deg, rgba(86, 34, 139, 0.5), rgba(139, 69, 19, 0.34));
}

.slides {
  position: relative;
  z-index: 2;
  width: min(258px, 82%);
  height: 100%;
  overflow: hidden;
  border-radius: 50% 50% 0 0 / 38% 38% 0 0;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.slide.is-on {
  opacity: 1;
}

/* 正文区 */
main {
  padding: 40px 0 62px;
}

.doc {
  display: grid;
  gap: 32px;
}

.side {
  border: 1px solid var(--line);
  padding: 18px 18px 16px;
  background: rgba(31, 23, 38, 0.62);
}

.side h2 {
  margin-bottom: 10px;
  font-size: 18px;
  letter-spacing: 0.2em;
  color: var(--ochre-lt);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 5px 0;
  border-bottom: 1px dotted var(--line-soft);
  color: var(--muted);
  font-size: 16px;
}

.side-list a:hover {
  color: var(--cream);
  padding-left: 5px;
  transition: padding 0.2s ease;
}

.top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  color: var(--ochre-lt);
  font-size: 16px;
  border-bottom: 1px dashed var(--ochre);
}

.body {
  min-width: 0;
}

.body > div {
  padding: 28px 0 6px;
  border-top: 1px dashed var(--line);
  scroll-margin-top: 132px;
}

.body > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.body h2 {
  margin-bottom: 0.6em;
  padding-left: 14px;
  border-left: 3px solid var(--ochre);
  font-size: clamp(22px, 4.6vw, 30px);
}

.body h2 > span,
.body h3 > span {
  display: inline;
}

.body h3 {
  margin-top: 1.4em;
  color: var(--ochre-lt);
  font-size: 20px;
}

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

.body li {
  margin: 0.34em 0;
}

.body li::marker {
  color: var(--ochre-lt);
}

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

.body a {
  border-bottom: 1px solid var(--ochre);
}

.body a:hover {
  color: var(--ochre-lt);
}

.body blockquote {
  margin: 1.3em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--purple-lt);
  background: rgba(86, 34, 139, 0.2);
  color: #eee3f3;
}

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

.body table {
  width: 100%;
  margin: 1.2em 0;
  border-collapse: collapse;
  font-size: 16px;
}

.body th,
.body td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.body th {
  background: rgba(86, 34, 139, 0.26);
  font-weight: 600;
}

.body code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 15px;
}

.body time {
  color: var(--ochre-lt);
  font-variant-numeric: tabular-nums;
}

.body img {
  display: block;
  margin: 1.1em 0;
  border: 1px solid var(--line);
}

/* 页脚 */
.site-foot {
  padding: 32px 0 22px;
  border-top: 1px solid var(--line);
  background: rgba(13, 8, 18, 0.72);
  font-size: 16px;
}

.foot-grid {
  display: grid;
  gap: 24px;
}

.foot-nav {
  display: contents;
}

.foot-grid dl {
  margin: 0;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.foot-grid dt {
  margin-bottom: 6px;
  color: var(--ochre-lt);
  letter-spacing: 0.2em;
  font-size: 16px;
}

.foot-grid dd {
  margin: 0;
}

.foot-grid dd a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--muted);
}

.foot-grid dd a:hover {
  color: var(--cream);
}

.foot-brand {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ochre);
  font-family: 'EB Garamond', 'Crimson Text', Georgia, serif;
  font-size: 18px;
}

.foot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 16px;
}

.foot-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  border-bottom: 1px dashed var(--ochre);
  color: var(--ochre-lt);
}

/* 断点 */
@media (min-width: 700px) {
  .foot-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

@media (min-width: 960px) {
  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 70;
    height: 38px;
    display: flex;
    align-items: center;
    padding-left: 246px;
  }

  .topbar .wrap {
    padding: 0 18px;
  }

  .nav {
    position: fixed;
    top: 38px;
    left: 0;
    bottom: 0;
    width: 246px;
    height: auto;
    padding-bottom: 26px;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .brand {
    padding: 20px 20px 14px;
    font-size: 22px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
  }

  .nav-menu {
    flex-direction: column;
    gap: 2px;
    padding: 0 14px;
    overflow: visible;
  }

  .navlink {
    width: 100%;
    padding: 10px 12px;
  }

  body {
    padding-top: 38px;
    padding-left: 246px;
  }

  main {
    padding: 50px 0 76px;
  }

  .hero-in {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    min-height: 70vh;
    padding: 52px 0;
    text-align: left;
    gap: 40px;
  }

  h1,
  .lede {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-art {
    height: min(58vh, 460px);
  }

  .vine {
    width: 200px;
  }

  .doc {
    grid-template-columns: 238px minmax(0, 1fr);
    gap: 52px;
    align-items: start;
  }

  .side {
    position: sticky;
    top: 78px;
  }

  .body > div {
    scroll-margin-top: 96px;
  }
}

@media (min-width: 1300px) {
  .wrap {
    max-width: 1140px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

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