:root {
  --ink: #000000;
  --paper: #ffffff;
  --rail: 236px;
  --r: 28px;
  --ease: cubic-bezier(.2, .6, .2, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.68;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.035em;
  line-height: 1.14;
  font-weight: 600;
  margin: 0;
}

a { color: var(--ink); }

img { max-width: 100%; }

hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 0;
  height: 0;
}

.tick {
  display: inline-block;
  width: 6px;
  height: 6px;
  border: 1px solid var(--ink);
  margin-right: .55rem;
  vertical-align: 2px;
  transition: background .2s var(--ease);
}

/* ---------- 左侧固定竖栏 ---------- */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rail);
  padding: 1.15rem 1rem 1.4rem;
  border-right: 1px solid var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 30;
}

.rail-top { display: flex; flex-direction: column; gap: 1.6rem; }

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--ink);
  border-radius: 15px;
  text-decoration: none;
  transition: background .22s var(--ease), color .22s var(--ease);
}

.brand img { display: block; width: 30px; height: 30px; object-fit: contain; }

.mark-glyph {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.06em;
}

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

.rail-nav p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 16px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: .45rem .4rem;
  text-decoration: none;
  border-radius: 10px;
  transition: background .22s var(--ease), padding-left .22s var(--ease);
}

.rail-nav a:hover { background: #f2f2f2; padding-left: .9rem; }
.rail-nav a:hover .tick,
.rail-nav a.on .tick { background: var(--ink); }
.rail-nav a.on { font-weight: 600; }

.rail-foot { display: block; }

.contact {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: .4rem;
  font-size: 16px;
  text-decoration: none;
  border-top: 1px solid var(--ink);
  padding-top: .8rem;
}

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

/* ---------- 主区 ---------- */
main {
  margin-left: var(--rail);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 70vh;
  align-items: stretch;
  border-bottom: 1px solid var(--ink);
  background-image: radial-gradient(rgba(0, 0, 0, .18) 1px, transparent 1px);
  background-size: 22px 22px;
}

.hero-figure {
  margin: 0;
  display: grid;
  overflow: hidden;
  padding: clamp(1rem, 3vw, 2.4rem);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  scale: 1.04;
  will-change: transform;
}

.hero-copy {
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.2rem, 3vw, 3rem);
}

.hero-copy h1 {
  font-size: clamp(1.95rem, 4.4vw, 3.6rem);
  max-width: 15em;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.6rem) clamp(1rem, 3.5vw, 2.6rem) 5rem;
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.side {
  position: sticky;
  top: 2rem;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  padding: 1.1rem 1.1rem 1.3rem;
}

.side h2 {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.side hr { margin: .6rem 0 .9rem; }

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

.side ul a {
  display: flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  padding: .35rem 0;
  transition: padding-left .2s var(--ease);
}

.side ul a:hover { padding-left: .4rem; }
.side ul a:hover .tick { background: var(--ink); }

.board { min-width: 0; }

.prose { display: block; }

.prose > article {
  border: 1px solid var(--ink);
  border-radius: var(--r);
  padding: clamp(1.2rem, 3vw, 2.4rem);
  margin-bottom: 1.4rem;
  scroll-margin-top: 96px;
  transition: transform .22s var(--ease), border-color .22s var(--ease);
}

.prose > article:hover { transform: translate3d(0, -2px, 0); }

.prose h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  margin-bottom: .55rem;
}

.prose h2 + hr { margin-bottom: 1.15rem; }
.prose h3 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }

.prose p { margin: 0 0 1rem; max-width: 66ch; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose blockquote {
  margin: 1.2rem 0;
  padding: .2rem 0 .2rem 1.1rem;
  border-left: 1px solid var(--ink);
}
.prose strong { font-weight: 600; }

.prose a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose img,
.prose figure img {
  border: 1px solid var(--ink);
  border-radius: 16px;
  display: block;
  height: auto;
}

/* ---------- 页脚 ---------- */
.foot {
  border-top: 1px solid var(--ink);
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 3.5vw, 2.6rem) 1.4rem;
  overflow: hidden;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2.6rem;
}

.foot dl { margin: 0; }

.foot dt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: .08em;
  padding-bottom: .5rem;
  margin-bottom: .6rem;
  border-bottom: 1px solid var(--ink);
}

.foot dd {
  margin: 0;
  font-size: 16px;
}

.foot dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
}

.foot dd a:hover { text-decoration: underline; text-underline-offset: 4px; }

.foot-brand {
  margin: 0 auto .9rem;
  max-width: 1200px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(3rem, 14vw, 9.5rem);
  line-height: .92;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.foot-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--ink);
  padding-top: .9rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.foot-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .rail {
    top: 0;
    right: 0;
    bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: .6rem;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    padding: .5rem .7rem;
  }

  .rail-top {
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    gap: .6rem;
  }

  .brand { width: 40px; height: 40px; border-radius: 13px; flex: 0 0 auto; }
  .brand img { width: 24px; height: 24px; }
  .mark-glyph { font-size: 13px; }

  .rail-nav { flex: 1 1 auto; min-width: 0; }

  .rail-nav p {
    flex-direction: row;
    gap: .1rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .rail-nav p::-webkit-scrollbar { display: none; }

  .rail-nav a {
    padding: .4rem .55rem;
    border-radius: 8px;
  }

  .rail-nav a:hover { padding-left: .55rem; background: #f2f2f2; }

  .rail-foot { display: none; }

  main { margin-left: 0; padding-top: 57px; }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy { order: -1; padding: 2rem 1.1rem 1.4rem; }
  .hero-copy h1 { font-size: clamp(1.8rem, 8.2vw, 2.4rem); }

  .hero-figure {
    aspect-ratio: 4 / 3;
    padding: .9rem;
  }

  .wrap {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding: 1.6rem 1rem 3.2rem;
  }

  .side {
    position: static;
    border-radius: 20px;
    padding: .8rem .9rem 1rem;
  }

  .side ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .2rem .9rem;
  }

  .side ul a { padding: .2rem 0; }

  .prose > article { scroll-margin-top: 78px; }

  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
  .foot-brand { font-size: clamp(2.6rem, 17vw, 4.5rem); }
  .foot-bar { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .hero-img { transform: none !important; }
}

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