@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: rgba(0, 0, 0, 0.14);
  --hair: rgba(0, 0, 0, 0.08);
  --glass: rgba(255, 255, 255, 0.74);
  --r: 18px;
  --gutter: clamp(1.15rem, 5vw, 4.5rem);
  --max: 1240px;
}

*,
*::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: Figtree, 'Noto Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: 0.004em;
  overflow-x: hidden;
  padding-bottom: calc(5.6rem + env(safe-area-inset-bottom));
}

img {
  max-width: 100%;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

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

.skip {
  position: absolute;
  left: 0.9rem;
  top: -5rem;
  z-index: 90;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: top 0.22s ease;
}

.skip:focus {
  top: 0.9rem;
}

/* ---------- 顶部角落标识 + 底部固定导航条 ---------- */

.chrome {
  position: relative;
  z-index: 70;
}

.mark {
  position: fixed;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
}

.dock {
  position: fixed;
  left: 50%;
  bottom: calc(0.9rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  width: min(1180px, calc(100% - 1.4rem));
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.12);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.dock::-webkit-scrollbar {
  display: none;
}

.dock p {
  display: flex;
  gap: 0.2rem;
  margin: 0;
  padding: 0 0.15rem;
  width: max-content;
  min-width: 100%;
}

.dock a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.22s ease, color 0.22s ease;
}

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

/* ---------- 主框架：main > div.wrap > section > article ---------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

article {
  min-width: 0;
}

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

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding: 7rem 0 clamp(2.5rem, 6vw, 4.5rem);
  gap: clamp(1rem, 2.6vw, 1.8rem);
}

.kicker {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  opacity: 0.55;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 11vw, 9.5rem);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.055em;
  word-break: break-word;
}

.lede {
  margin: 0;
  max-width: 32ch;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  opacity: 0.72;
}

.collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.7rem, 2vw, 1.4rem);
  max-width: 44rem;
  margin-top: clamp(0.8rem, 3vw, 2rem);
}

.shot {
  margin: 0;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: #f4f4f4;
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-b {
  transform: translateY(clamp(1rem, 4vw, 2.6rem));
}

/* ---------- 正文 ---------- */

article > section[id] {
  padding-block: clamp(3rem, 8vw, 6.5rem);
  border-top: 1px solid var(--ink);
  scroll-margin-top: 5.5rem;
}

small {
  display: block;
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  opacity: 0.55;
}

article h2 {
  margin: 0 0 1.5rem;
  max-width: 24ch;
  font-size: clamp(1.75rem, 5vw, 3.4rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.045em;
}

article h3 {
  margin: 2.2rem 0 0.8rem;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.02em;
}

article p,
article ul,
article ol,
article blockquote,
article figure {
  margin: 0 0 1.3rem;
  max-width: 66ch;
}

article ul,
article ol {
  padding-left: 1.15rem;
}

article li {
  margin: 0.35rem 0;
}

article strong {
  font-weight: 700;
}

article a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

article a:hover {
  text-decoration-thickness: 2px;
}

article blockquote {
  margin-inline: 0;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

article figure img {
  border-radius: var(--r);
}

article code {
  font-size: 0.92em;
}

article hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.4rem 0;
  max-width: 66ch;
}

/* ---------- 右侧栏 ---------- */

.rail {
  position: sticky;
  top: 5rem;
  align-self: start;
  padding: 1.15rem 1.15rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}

.rail small {
  margin-bottom: 0.45rem;
}

.rail h3 {
  margin: 0 0 0.9rem;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.rail ol {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0.55rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
  transition: background 0.2s ease, color 0.2s ease;
}

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

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

footer {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr;
  gap: 2.25rem;
  max-width: var(--max);
  margin: clamp(3rem, 8vw, 6rem) auto 0;
  padding: clamp(3rem, 8vw, 5rem) var(--gutter) 1rem;
  border-top: 1px solid var(--ink);
}

footer section {
  min-width: 0;
}

footer p {
  margin: 0;
}

.f-mark a {
  display: inline-block;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.f-toc p {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.f-toc a,
.f-top a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.9rem;
  text-decoration: none;
}

.f-toc a:hover,
.f-top a:hover,
.f-mark a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.f-legal {
  grid-column: 1 / -1;
  margin-top: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.6;
}

/* ---------- 滚动显现 ---------- */

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(18px);
  }

  html.js .reveal.in {
    opacity: 1;
    transform: none;
    transition: opacity 0.75s ease, transform 0.85s cubic-bezier(0.22, 0.7, 0.2, 1);
  }
}

/* ---------- 断点 ---------- */

@media (max-width: 900px) {
  .panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: static;
    margin-top: 2.5rem;
  }

  footer {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }

  .f-mark {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .mark {
    font-size: 0.78rem;
    padding: 0.5rem 0.9rem;
  }

  .dock {
    width: calc(100% - 1rem);
    bottom: calc(0.5rem + env(safe-area-inset-bottom));
  }

  .hero {
    min-height: auto;
    padding-top: 6.5rem;
  }

  .collage {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
  }

  .shot-b {
    transform: none;
  }

  footer {
    grid-template-columns: 1fr;
  }

  .f-mark {
    grid-column: auto;
  }
}

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