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

:root {
  --ink: #1f1f1f;
  --paper: #ffffff;
  --soft: #f5f5f5;
  --line: #e6e6e6;
  --muted: #5c5c5c;
  --shadow: 0 6px 24px rgba(31, 31, 31, 0.08);
  --shadow-soft: 0 3px 12px rgba(31, 31, 31, 0.06);
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--soft);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
}

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

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

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

menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.top {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brandline,
.menuline {
  padding-inline: max(20px, calc((100% - 1180px) / 2));
}

.brandline {
  padding-block: 10px 6px;
}

.menuline {
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.sitenav {
  position: relative;
}

.drop {
  position: relative;
  display: inline-block;
}

.drop summary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 116px;
  height: 44px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.drop summary::-webkit-details-marker {
  display: none;
}

.drop summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.drop[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.drop summary:hover {
  background: #000000;
}

.drop menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  width: 290px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.drop:not([open]) menu {
  display: none;
}

.drop menu li + li {
  border-top: 1px solid var(--line);
}

.drop menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.18s ease, padding-left 0.18s ease;
}

.drop menu a:hover {
  background: var(--soft);
  padding-left: 16px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--paper);
  background: linear-gradient(135deg, #1f1f1f 0%, #3a3a3a 100%);
  clip-path: polygon(0 0, 100% 0, 100% 93%, 0 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(31, 31, 31, 0.88) 0%, rgba(31, 31, 31, 0.42) 72%, rgba(31, 31, 31, 0.24) 100%);
  pointer-events: none;
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.hero.has-img:hover .hero-img {
  transform: scale(1.02);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  max-width: 1228px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 96px 24px 120px;
}

.hero h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.15rem, 6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero .lead {
  max-width: 54ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.65;
}

main {
  padding-bottom: 56px;
}

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 20px;
  max-width: 1228px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.body {
  min-width: 0;
}

article {
  padding: clamp(20px, 4vw, 44px);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

article h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

article .subtitle {
  max-width: 62ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

article > section {
  scroll-margin-top: 122px;
}

article > section:first-of-type {
  margin-top: 36px;
}

article > section + section {
  margin-top: 38px;
  padding-top: 38px;
  border-top: 1px solid var(--line);
}

article h3 {
  margin: 32px 0 10px;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
}

article h4 {
  margin: 26px 0 8px;
  font-size: 1.05rem;
  line-height: 1.4;
}

article p {
  margin: 14px 0;
}

article ul,
article ol {
  margin: 14px 0;
  padding-left: 1.35em;
}

article li + li {
  margin-top: 8px;
}

article blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--soft);
  border-left: 4px solid var(--ink);
}

article blockquote p {
  margin: 0;
}

article pre {
  max-width: 100%;
  padding: 16px;
  overflow-x: auto;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  line-height: 1.6;
}

article code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

article table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

article th,
article td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

article img {
  margin: 18px 0;
}

.side {
  position: sticky;
  top: 116px;
  align-self: start;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.side-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.side-list li + li {
  border-top: 1px solid var(--line);
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 0;
  font-size: 16px;
  line-height: 1.45;
  text-decoration: none;
  transition: padding-left 0.18s ease, color 0.18s ease;
}

.side-list a:hover {
  padding-left: 4px;
  text-decoration: underline;
}

footer {
  padding: 56px 24px 44px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}

footer p {
  margin: 0 auto 12px;
  max-width: 1100px;
  overflow-wrap: anywhere;
  font-size: clamp(38px, 10vw, 100px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

footer small {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.6;
}

.js article > section.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js article > section.reveal.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 20px 48px;
  }

  .side {
    position: static;
    order: 2;
  }

  .hero-inner {
    min-height: 100svh;
    padding: 80px 20px 96px;
  }

  .hero h1 {
    max-width: 12ch;
    font-size: clamp(2rem, 9vw, 3.1rem);
  }

  .hero .lead {
    font-size: 17px;
  }

  .drop menu {
    width: min(420px, calc(100vw - 40px));
  }

  article {
    padding: 18px;
  }

  article > section:first-of-type {
    margin-top: 28px;
  }

  article > section + section {
    margin-top: 30px;
    padding-top: 30px;
  }

  .side-list a {
    min-height: 44px;
  }

  footer {
    padding: 40px 20px 32px;
  }

  footer p {
    font-size: clamp(34px, 13vw, 76px);
  }
}

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

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

  .js article > section.reveal {
    opacity: 1;
    transform: none;
  }
}

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