@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: #e3e3e3;
  --muted: #565656;
  --pad: clamp(1.1rem, 4vw, 3.5rem);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans Mono CJK SC", "PingFang SC", monospace;
}

*,
*::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(--mono);
  font-size: 17px;
  line-height: 1.75;
  padding-bottom: 7rem;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
}

p {
  margin: 0 0 1.1rem;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #000;
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

/* ---------- 底部固定条 ---------- */

.site-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem var(--pad);
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid #1b1b1b;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.mark {
  font-size: 1.15rem;
  line-height: 1;
}

.mark-img {
  display: block;
  height: 28px;
  width: auto;
}

.burger {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--paper);
  border: 1px solid #fff;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 0.5rem 1.15rem;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.burger:hover,
body.open .burger {
  background: var(--paper);
  color: var(--ink);
}

.site-bar a:focus-visible,
.site-bar button:focus-visible,
.nav a:focus-visible {
  outline-color: #fff;
}

/* ---------- 全屏遮罩菜单 ---------- */

.nav {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh var(--pad) 14vh;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.42s;
}

body.open .nav {
  transform: translateY(0);
  visibility: visible;
}

.nav-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 46rem;
  margin: 0;
  gap: 0.1rem;
}

.nav-row a {
  display: block;
  color: var(--paper);
  text-decoration: none;
  font-size: clamp(1.5rem, 6vw, 3.2rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.045em;
  padding: 0.4rem 0;
  min-height: 48px;
  border-bottom: 1px solid #1e1e1e;
  transition: padding-left 0.25s ease, color 0.25s ease;
}

.nav-row a:hover {
  padding-left: 0.85rem;
  color: #cfcfcf;
}

body.open {
  overflow: hidden;
}

/* ---------- 主区 ---------- */

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16.5rem;
  align-items: start;
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5.5rem) var(--pad) clamp(2rem, 5vw, 4rem);
}

div {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 5vw, 4.5rem);
  min-width: 0;
}

div > article {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(1.4rem, 4vw, 3rem);
  box-shadow: 0 22px 44px -30px rgba(0, 0, 0, 0.55);
  scroll-margin-top: 1.5rem;
  transition: box-shadow 0.3s ease;
}

div > article:hover {
  box-shadow: 0 26px 54px -28px rgba(0, 0, 0, 0.6);
}

div > article > :first-child {
  margin-top: 0;
}

div > article > :last-child {
  margin-bottom: 0;
}

div > article h2 {
  font-size: clamp(1.55rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 0.85rem;
}

div > article h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.3;
  margin: 1.6rem 0 0.7rem;
}

div > article img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
}

div > article ul,
div > article ol {
  padding-left: 1.3rem;
  margin: 0 0 1.1rem;
}

div > article li {
  margin-bottom: 0.45rem;
}

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

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  min-height: 45vh;
  padding-top: clamp(2.9rem, 6vw, 4rem);
}

.hero-text {
  min-width: 0;
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.8rem, 9vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.hero .lead {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.badge {
  position: absolute;
  top: 0.9rem;
  left: 1.1rem;
  display: inline-block;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.15rem 0.85rem;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0.08em;
  background: var(--paper);
}

.hero-figure {
  margin: 0;
  height: 45vh;
  min-height: 220px;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
}

.hero-figure .hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.6s ease;
}

.hero-figure:hover .hero-img {
  transform: scale(1.04);
}

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

.side {
  position: sticky;
  top: 1.5rem;
  border-left: 2px solid var(--ink);
  padding-left: 1.1rem;
  font-size: 1rem;
}

.side h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.side hr {
  height: 2px;
  background: var(--ink);
  border: 0;
  margin: 0.65rem 0 0.9rem;
}

.side-links {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.side-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed #d6d6d6;
  transition: padding-left 0.2s ease;
}

.side-links a:hover {
  padding-left: 0.45rem;
}

.side-links a:last-child {
  border-bottom: 0;
}

hr {
  height: 4px;
  background: var(--ink);
  border: 0;
  margin: 1.6rem 0;
}

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

.foot {
  border-top: 2px solid var(--ink);
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad) 1.6rem;
}

.foot-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(1.25rem, 4vw, 3rem);
  max-width: 1400px;
  margin: 0 auto;
}

.foot dl {
  margin: 0;
}

.foot dt {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 0.6rem;
}

.foot dd {
  margin: 0 0 0.3rem;
  color: var(--muted);
  font-size: 1rem;
}

.foot-cols dl:nth-child(2) dd {
  display: flex;
  flex-direction: column;
}

.foot dd a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.foot dd a:hover {
  border-bottom-color: var(--ink);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 1400px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.foot-base p {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

.foot-base a {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.foot-base a:hover {
  text-decoration: underline;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 900px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .side {
    position: static;
    border-left: 0;
    border-top: 2px solid var(--ink);
    padding-left: 0;
    padding-top: 0.9rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    align-items: start;
  }

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

  .hero-figure {
    height: 32vh;
    min-height: 180px;
  }

  .foot-cols {
    grid-template-columns: 1fr 1fr;
  }

  .foot-cols dl:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  div > article {
    border-radius: 22px;
    padding: 1.15rem;
  }

  .hero h1 {
    font-size: 2.35rem;
  }
}

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

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

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