@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syncopate:wght@400;700&display=swap');

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

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

body {
  margin: 0;
  padding-left: 244px;
  min-height: 100vh;
  background-color: #f5e6c8;
  background-image: radial-gradient(120vw 85vh at 52% -10%, #fbf2df 0%, #f5e6c8 64%);
  color: #262117;
  font-family: 'Space Mono', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', monospace, serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.13;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.55;
  background-image:
    radial-gradient(56vw 40vh at 94% 3%, rgba(212, 165, 116, 0.85), rgba(245, 230, 200, 0) 68%),
    radial-gradient(44vw 52vh at 1% 97%, rgba(212, 165, 116, 0.58), rgba(245, 230, 200, 0) 72%);
}

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

a { color: #262117; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #8a5f2c; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.skip {
  position: absolute;
  left: 12px;
  top: 8px;
  z-index: 40;
  padding: 10px 16px;
  min-height: 40px;
  background: #262117;
  color: #f5e6c8;
  text-decoration: none;
  transform: translateY(-180%);
}
.skip:focus { transform: translateY(0); }

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

.rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 244px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 18px 24px;
  border-right: 1px solid rgba(38, 33, 23, 0.18);
  background: linear-gradient(180deg, #f8ecd5 0%, #f1dfc0 100%);
  overflow-y: auto;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid rgba(38, 33, 23, 0.35);
  border-radius: 50%;
  color: #262117;
  text-decoration: none;
}
.mark:hover { background: #262117; color: #f5e6c8; }

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

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 6px;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 1px dotted rgba(38, 33, 23, 0.22);
}
.rail-nav a .no {
  font-size: 12px;
  letter-spacing: 0.12em;
  opacity: 0.55;
}
.rail-nav a::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  transition: background 0.25s ease, transform 0.25s ease;
}
.rail-nav a:hover::before,
.rail-nav a:focus-visible::before {
  background: currentColor;
  transform: rotate(0deg);
}
.rail-nav li.off { display: none; }

.rail-search {
  margin-top: auto;
  display: flex;
  gap: 6px;
}
.rail-search input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  font: inherit;
  font-size: 16px;
  color: #262117;
  background: #fbf3e2;
  border: 1px solid rgba(38, 33, 23, 0.4);
  border-radius: 0;
}
.rail-search input::placeholder { color: rgba(38, 33, 23, 0.5); }
.rail-search button {
  flex: 0 0 auto;
  width: 44px;
  min-height: 42px;
  font: inherit;
  font-size: 16px;
  color: #f5e6c8;
  background: #262117;
  border: 1px solid #262117;
  border-radius: 0;
  cursor: pointer;
}
.rail-search button:hover { background: #8a5f2c; border-color: #8a5f2c; }

/* ---------- 首屏 ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: 44px;
  min-height: 100vh;
  padding: 56px 48px;
}

.hero-shot {
  margin: 0;
  justify-self: start;
  width: 100%;
  max-width: 470px;
  padding: 13px 13px 50px;
  background: #fdf8ec;
  border-radius: 3px;
  transform: rotate(-1.6deg);
  box-shadow: 0 22px 44px rgba(38, 33, 23, 0.22), 0 2px 0 rgba(38, 33, 23, 0.1);
}

.shot-in {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(160deg, #e8d3ab 0%, #cba877 55%, #a98250 100%);
}

.shot-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.3) contrast(1.06) saturate(0.78);
}

.shot-void {
  background: linear-gradient(160deg, #e8d3ab 0%, #cba877 55%, #a98250 100%);
}

.hero-copy { text-align: right; }

.hero-copy h1 {
  margin: 0;
  font-family: 'Syncopate', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: clamp(30px, 4.3vw, 58px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: tracking 7s steps(1, end) infinite;
}

@keyframes tracking {
  0%, 92%, 100% { transform: none; filter: none; }
  93% { transform: skewX(-2.4deg) translateX(3px); filter: blur(0.4px); }
  95% { transform: skewX(1.6deg) translateX(-2px); }
  97% { transform: none; }
}

/* ---------- 主体：左 aside + 右正文 ---------- */

main { padding: 0 0 46px; }

main article {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 22px 30px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 40px;
}

main article > *:not(aside) { grid-column: 2; }

.side {
  grid-column: 1;
  grid-row: 1 / span 40;
  position: sticky;
  top: 26px;
  padding: 16px 14px;
  background: rgba(253, 248, 236, 0.72);
  border-radius: 18px;
}

.side-h {
  margin: 0 0 10px;
  font-family: 'Syncopate', 'PingFang SC', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.side-list a {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 7px 4px;
  min-height: 40px;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  border-bottom: 1px dashed rgba(38, 33, 23, 0.22);
}
.side-list a .no { font-size: 12px; opacity: 0.5; }

main article > section {
  grid-column: 2;
  margin: 0 0 20px;
  padding: 28px 30px;
  background: #f9eed9;
  border-radius: 28px;
  scroll-margin-top: 24px;
}

.intro { background: #262117; color: #f5e6c8; }
.intro h2 {
  margin: 0 0 12px;
  font-family: 'Syncopate', 'PingFang SC', sans-serif;
  font-size: clamp(20px, 2.2vw, 27px);
  letter-spacing: 0.12em;
  line-height: 1.35;
}

.subtitle {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: #d4a574;
}

main article > section h2 {
  margin: 0 0 14px;
  font-family: 'Syncopate', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.07em;
}

main article > section h3 {
  margin: 1.5em 0 0.6em;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

main article > section h3::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  margin-right: 10px;
  vertical-align: middle;
  background: currentColor;
}

main article > section ul,
main article > section ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}
main article > section li { margin-bottom: 0.45em; }

main article > section blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  background: rgba(212, 165, 116, 0.28);
  border-radius: 16px;
  font-style: normal;
}

main article > section strong { font-weight: 700; }

main article > section code,
main article > section pre {
  font-family: 'Space Mono', monospace;
  font-size: 15px;
}

main article > div figure { margin: 1.2em 0; }

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

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 28px;
  padding: 24px 20px 36px;
  border-top: 1px solid rgba(38, 33, 23, 0.18);
}
.foot div { margin: 0; }
.foot p { margin: 0; font-size: 16px; line-height: 1.6; }
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 2px;
  font-size: 16px;
}

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

.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.rv.on { opacity: 1; transform: none; }

/* ---------- 移动端 ---------- */

@media (max-width: 900px) {
  body { padding-left: 0; }

  .rail {
    position: sticky;
    top: 0;
    bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(38, 33, 23, 0.2);
    overflow: visible;
  }

  .mark { width: 42px; height: 42px; }

  .rail-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .rail-nav ol { flex-direction: row; gap: 4px; }
  .rail-nav a {
    min-height: 44px;
    padding: 10px 8px;
    white-space: nowrap;
    border-bottom: 0;
    gap: 6px;
  }
  .rail-nav a .no { display: none; }

  .rail-search { margin-top: 0; flex: 0 0 auto; }
  .rail-search input { width: 92px; flex: 0 0 auto; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    min-height: calc(100vh - 59px);
    padding: 24px 18px 44px;
  }
  .hero-copy { order: -1; text-align: left; }
  .hero-copy h1 { font-size: clamp(28px, 8.4vw, 40px); }
  .hero-shot { justify-self: stretch; max-width: 330px; padding: 11px 11px 42px; }

  main article {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 0 16px;
  }
  main article > *:not(aside),
  main article > div { grid-column: 1; }

  .side {
    position: static;
    grid-column: 1;
    grid-row: auto;
  }
  .side-list { flex-direction: row; flex-wrap: wrap; gap: 2px 10px; }
  .side-list a { min-height: 40px; border-bottom: 0; }

  main article > div {
    padding: 22px 18px;
    border-radius: 28px;
    scroll-margin-top: 76px;
  }

  .foot { gap: 2px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy h1 { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
}

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