@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: rgba(0, 0, 0, 0.16);
  --line-hard: #000000;
  --pad: clamp(1.15rem, 4vw, 5rem);
  --r: 4px;
  --display: "Lexend Mega", "Public Sans", system-ui, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --body: "Public Sans", system-ui, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

*,
*::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: var(--body);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0.01em;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.04;
  margin: 0;
  overflow-wrap: break-word;
}

p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }
figure { margin: 0; }

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

/* 顶栏：品牌行 + 菜单行 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 2px solid var(--line-hard);
  padding: 0.85rem var(--pad) 0.55rem;
}

.brandline {
  display: flex;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.15rem, 4.2vw, 2rem);
  letter-spacing: -0.06em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 1.55em;
  height: 1.55em;
  border: 2px solid var(--line-hard);
  border-radius: var(--r);
  font-size: 0.82em;
  letter-spacing: 0;
}

.menu-wrap { padding-top: 0.3rem; }

.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 0.3rem;
}

.menu li { position: relative; }

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border-bottom: 4px solid transparent;
  border-radius: 0 0 var(--r) var(--r);
}

.menu a:hover,
.menu a:focus-visible { border-bottom-color: var(--line-hard); }

.menu .has-sub > a::after {
  content: "+";
  margin-left: 0.45em;
  font-weight: 900;
  letter-spacing: 0;
}

.menu .has-sub ul {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 50;
  flex-direction: column;
  align-items: stretch;
  min-width: 11rem;
  background: var(--paper);
  border: 2px solid var(--line-hard);
  border-radius: var(--r);
  padding: 0.35rem;
}

.menu .has-sub:hover ul,
.menu .has-sub:focus-within ul { display: block; }

/* 主视觉 */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(2.4rem, 9vw, 7rem) var(--pad);
  border-bottom: 2px solid var(--line-hard);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 24ch;
}

.hero h1 {
  font-size: clamp(2.5rem, 9.5vw, 7.5rem);
}

.hero-lead {
  margin-top: clamp(0.9rem, 2.4vw, 1.6rem);
  max-width: 34ch;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  opacity: 0.68;
}

.hero-art {
  z-index: 2;
  width: clamp(3.6rem, 10vw, 7rem);
  align-self: center;
}

.hero-art svg {
  display: block;
  transform-origin: 50% 50%;
  animation: turn 26s linear infinite;
}

@keyframes turn { to { transform: rotate(360deg); } }

.hero-mark {
  position: absolute;
  right: -0.05em;
  bottom: -0.2em;
  z-index: 1;
  line-height: 0.78;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(7rem, 26vw, 20rem);
  letter-spacing: -0.07em;
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  pointer-events: none;
  will-change: transform;
}

/* 正文 + 右侧栏 */
.content-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14.5rem;
  gap: clamp(1.6rem, 5vw, 4rem);
  padding: clamp(2.4rem, 7vw, 6rem) var(--pad) clamp(3rem, 8vw, 7rem);
}

.prose { max-width: 62ch; }

.prose article {
  padding-bottom: clamp(1.9rem, 4.5vw, 3.4rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(1.9rem, 4.5vw, 3.4rem);
  scroll-margin-top: 11.5rem;
}

.prose article:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.prose h2 {
  display: inline-block;
  font-size: clamp(1.65rem, 4.2vw, 2.9rem);
  padding-bottom: 0.5rem;
  border-bottom: 4px solid var(--line-hard);
}

.prose h3 {
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  margin-top: 1.8rem;
}

.prose p { margin-top: 0.9rem; }

.prose p.subtitle,
.prose p.subhead,
.prose p.lead,
.prose p.desc,
.prose p[class*="desc"] {
  opacity: 0.66;
  font-size: 1.02rem;
}

.prose ul,
.prose ol {
  margin: 0.9rem 0 0;
  padding-left: 1.3rem;
}

.prose li { margin-top: 0.45rem; }

.prose img {
  border-radius: var(--r);
  margin-top: 1rem;
}

.prose blockquote {
  margin: 1.2rem 0 0;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 4px solid var(--line-hard);
}

.prose a {
  text-decoration: none;
  border-bottom: 2px solid var(--line-hard);
}

.prose strong { font-weight: 700; }

.sidebar {
  position: sticky;
  top: 12rem;
  align-self: start;
  display: grid;
  gap: 0.4rem;
}

.side-h {
  font-family: var(--display);
  font-weight: 900;
  font-size: 0.86rem;
  letter-spacing: -0.03em;
  border-bottom: 2px solid var(--line-hard);
  padding-bottom: 0.4rem;
}

.sidebar a {
  display: block;
  min-height: 44px;
  padding: 0.6rem 0;
  text-decoration: none;
  font-size: 0.98rem;
  border-bottom: 1px solid var(--line);
}

.sidebar a:hover,
.sidebar a:focus-visible { border-bottom-color: var(--line-hard); }

/* 页脚：单行 */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.4rem;
  border-top: 2px solid var(--line-hard);
  padding: 1rem var(--pad);
}

.f-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.02rem;
  letter-spacing: -0.05em;
}

.f-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.f-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.15rem;
  text-decoration: none;
  font-size: 0.92rem;
  border-bottom: 2px solid transparent;
}

.f-nav a:hover,
.f-nav a:focus-visible { border-bottom-color: var(--line-hard); }

.f-copy {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-size: 0.84rem;
  opacity: 0.7;
  overflow-wrap: break-word;
}

@media (max-width: 860px) {
  .content-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: static;
    margin-top: 0.5rem;
    border-top: 2px solid var(--line-hard);
    padding-top: 0.9rem;
  }
  .side-h { border-bottom: 0; padding-bottom: 0; }
}

@media (max-width: 760px) {
  .menu ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .menu a {
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 0.6rem 0.2rem;
  }
  .menu .has-sub ul {
    position: static;
    display: block;
    border: 0;
    border-left: 2px solid var(--line-hard);
    border-radius: 0;
    padding: 0 0 0.3rem 0.9rem;
    min-width: 0;
  }
  .menu .has-sub > a::after { content: ""; }
  .hero {
    min-height: auto;
    padding-top: clamp(2rem, 12vw, 3.5rem);
    padding-bottom: clamp(2.5rem, 14vw, 4rem);
  }
  .hero-mark { font-size: clamp(6rem, 34vw, 11rem); bottom: -0.12em; }
  .site-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .f-nav ul { justify-content: center; }
  .f-copy { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art svg { animation: none; }
  .hero-mark { will-change: auto; }
}

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