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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --edge: #000000;
  --hair: #e4e4e4;
  --line: 4px;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- 左侧竖排导航 ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  width: 232px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.75rem 1rem 1.5rem;
  overflow-y: auto;
  background: var(--paper);
  border-right: var(--line) solid var(--edge);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  word-break: break-all;
}

.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  border: 2px solid var(--edge);
  border-radius: 4px;
}

.pills {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.pills a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 2px solid var(--edge);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.2;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.pills a:hover,
.pills a:focus-visible,
.pills a[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
  transform: translateX(4px);
}

.contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: auto;
  padding: 0.55rem 0.85rem;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--edge);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
}

.contact:hover {
  background: var(--paper);
  color: var(--ink);
}

main,
footer {
  margin-left: 232px;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 70vh;
  padding: 3rem 1.5rem 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-bottom: var(--line) solid var(--edge);
}

.hero-ghost {
  position: absolute;
  top: -4vw;
  left: -3vw;
  font-size: 40vw;
  line-height: 0.78;
  font-weight: 700;
  letter-spacing: -0.07em;
  color: var(--paper);
  opacity: 0.13;
  pointer-events: none;
  user-select: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  margin-left: auto;
  max-width: 44rem;
  padding-bottom: 1.75rem;
  text-align: right;
}

h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.4rem, 8.5vw, 6.5rem);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.055em;
  word-break: break-word;
}

.hero-lead {
  margin: 0 0 1.6rem auto;
  max-width: 32rem;
  font-size: 1rem;
  opacity: 0.86;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--paper);
  border-radius: 999px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.18s ease, color 0.18s ease;
}

.hero-btn:hover,
.hero-btn:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.hero-fig {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 26vh;
  margin: 0;
  overflow: hidden;
  background: #0a0a0a;
  border: var(--line) solid var(--paper);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.hero-fig img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- 正文与右侧栏 ---------- */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  align-items: start;
  border-bottom: var(--line) solid var(--edge);
}

.content {
  min-width: 0;
  padding: 0 1.5rem;
}

.content > section {
  padding: 3.5rem 0;
  border-top: var(--line) solid var(--edge);
  border-bottom: 8px solid var(--edge);
  border-radius: 4px;
  scroll-margin-top: 24px;
}

.content > section:first-child {
  border-top: 0;
  padding-top: 2.75rem;
}

.content > section:last-child {
  border-bottom: 0;
}

.content h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.content h3 {
  margin: 2rem 0 0.7rem;
  font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.content p,
.content ul,
.content ol {
  max-width: 42rem;
}

.content p {
  margin: 0 0 1.15rem;
}

.content ul,
.content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

.content li {
  margin: 0.4rem 0;
}

.content a {
  text-underline-offset: 3px;
}

.content strong {
  font-weight: 700;
}

.content blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.2rem;
  background: #f5f5f5;
  border-left: 10px solid var(--edge);
  border-radius: 4px;
}

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

.content img {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border: var(--line) solid var(--edge);
  border-radius: 4px;
}

.content small,
.rail small {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
}

.content time {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--edge);
}

.content figure {
  margin: 1.6rem 0;
}

.content figcaption {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.rail {
  position: sticky;
  top: 0;
  padding: 2.5rem 1.15rem 3rem;
  border-left: var(--line) solid var(--edge);
}

.rail-title {
  margin: 0 0 1.1rem;
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.rail-list {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
  border-top: 2px solid var(--edge);
}

.rail-list li {
  border-bottom: 2px solid var(--hair);
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.5rem 0.15rem;
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.25;
  transition: padding-left 0.16s ease, background 0.16s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  padding-left: 0.6rem;
  background: #f2f2f2;
}

.rail-top {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--edge);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
}

.rail-top:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- 页脚 ---------- */
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.5rem 2rem;
  padding: 2.75rem 1.5rem 3rem;
  background: var(--ink);
  color: var(--paper);
}

footer a {
  color: var(--paper);
  text-decoration: none;
  text-underline-offset: 4px;
}

footer a:hover {
  text-decoration: underline;
}

.f-cta {
  flex: 1 1 100%;
  padding-bottom: 1.2rem;
  border-bottom: var(--line) solid var(--paper);
}

.f-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  font-size: clamp(2rem, 6.5vw, 4.2rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.055em;
  transition: transform 0.18s ease;
}

.f-cta a:hover {
  transform: translateX(8px);
}

.f-brand {
  flex: 0 0 auto;
}

.f-logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.f-nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.1rem;
  margin: 0;
}

.f-nav dt {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  opacity: 0.7;
}

.f-nav dd {
  margin: 0;
}

.f-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.85rem;
}

.f-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-left: auto;
  font-size: 0.78rem;
}

.f-cc {
  opacity: 0.72;
}

.f-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.35rem 0.85rem;
  border: 2px solid var(--paper);
  border-radius: 999px;
}

.f-top:hover {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
  .sidebar {
    position: sticky;
    right: 0;
    bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: var(--line) solid var(--edge);
  }

  .brand {
    flex: 0 0 auto;
    font-size: 0.82rem;
    max-width: 6.5rem;
  }

  .pills {
    flex-direction: row;
    flex: 0 0 auto;
    gap: 0.4rem;
    margin-top: 0;
  }

  .pills a {
    min-height: 40px;
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
  }

  .pills a:hover,
  .pills a:focus-visible,
  .pills a[aria-current="true"] {
    transform: none;
  }

  .contact {
    flex: 0 0 auto;
    margin-top: 0;
    margin-left: auto;
    min-height: 40px;
    font-size: 0.78rem;
  }

  main,
  footer {
    margin-left: 0;
  }

  .hero {
    min-height: 70vh;
    padding: 2.25rem 1rem 0;
  }

  .hero-ghost {
    font-size: 46vw;
    top: -2vw;
    left: -4vw;
  }

  .hero-copy {
    padding-bottom: 1.4rem;
  }

  .content {
    padding: 0 1rem;
  }

  .content > section {
    padding: 2.5rem 0;
    scroll-margin-top: 96px;
  }

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

  .rail {
    position: static;
    border-left: 0;
    border-top: var(--line) solid var(--edge);
    padding: 2rem 1rem 2.5rem;
  }

  .rail-list a,
  .rail-top {
    min-height: 44px;
  }

  footer {
    padding: 2.25rem 1rem 2.75rem;
  }

  .f-copy {
    margin-left: 0;
    flex: 1 1 100%;
  }
}

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

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

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