:root {
  --ink: #000000;
  --paper: #ffffff;
  --ink-2: #3b3b3b;
  --rule: #000000;
  --r: 10px;
  --sans: 'Space Mono', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC',
    'PingFang SC', 'Microsoft YaHei', sans-serif;
  --wide: 'Syncopate', 'Space Mono', 'Noto Sans SC', 'PingFang SC', system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

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

.top {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--paper);
  border-bottom: 2px solid var(--rule);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.3rem 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--wide);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.brand::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-right: 0.6rem;
  border-radius: 2px;
  background: var(--ink);
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.95rem;
  border: 2px solid var(--rule);
  border-radius: var(--r);
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: background 0.22s ease, color 0.22s ease;
}

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

.menu p {
  display: flex;
  gap: 0.1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0.9rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.menu p::-webkit-scrollbar {
  display: none;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  border-bottom: 3px solid transparent;
  font-size: 0.85rem;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.menu a:hover,
.menu a[aria-current='true'] {
  border-bottom-color: var(--ink);
}

main {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.2rem 1.1rem 4rem;
}

.side {
  position: sticky;
  top: 116px;
  padding: 1rem 0.9rem 1.1rem;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
}

.side-title {
  margin: 0 0 0.8rem;
  font-family: var(--wide);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.26em;
}

.side-title span {
  display: inline-block;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--paper);
}

.toc {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li {
  animation: rise 0.45s both;
  animation-delay: calc(var(--i) * 45ms);
}

.toc a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 40px;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  color: var(--paper);
  font-size: 0.84rem;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.toc a:hover,
.toc a[aria-current='true'] {
  background: var(--paper);
  color: var(--ink);
}

.num {
  font-family: var(--wide);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 0.9rem;
  border-bottom: 2px solid var(--paper);
  color: var(--paper);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.doc {
  min-width: 0;
}

.doc div {
  padding: 2.6rem 0 2.2rem;
  border-top: 3px solid var(--rule);
  scroll-margin-top: 132px;
}

.doc div:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.doc .hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 2rem;
  min-height: 70vh;
  padding: 0 0 3.4rem;
  border-top: 0;
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 12px;
  background: var(--ink);
  transform: skewY(-1.6deg);
  transform-origin: left bottom;
}

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

.mark {
  margin: 0 0 1rem;
  font-family: var(--wide);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.3em;
}

.mark span {
  display: inline-block;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--ink);
}

h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2rem, 5.2vw, 3.9rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.hero-desc {
  max-width: 34ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 0.94rem;
}

.hero-media {
  position: relative;
  display: grid;
  gap: 0.9rem;
}

.shot {
  margin: 0;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--ink);
  aspect-ratio: 4 / 5;
  transition: transform 0.22s ease;
}

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

.shot-a {
  transform: translateY(-14px) rotate(-1.4deg);
}

.shot-b {
  width: 82%;
  transform: translate(18%, 22px) rotate(1.4deg);
}

.shot:hover {
  transform: translate(0, -2px) rotate(0deg);
}

.doc h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.doc h2 span {
  display: inline;
  padding-bottom: 2px;
  border-bottom: 6px solid var(--ink);
  box-decoration-break: clone;
}

.doc h3 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.14rem;
  line-height: 1.35;
}

.doc p {
  max-width: 66ch;
  margin: 0 0 1rem;
}

.doc ul,
.doc ol {
  max-width: 66ch;
  margin: 0 0 1.2rem;
  padding-left: 1.3rem;
}

.doc li {
  margin: 0.35rem 0;
}

.doc a {
  border-bottom: 2px solid var(--ink);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

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

.doc img {
  height: auto;
  margin: 0.8rem 0;
  border-radius: var(--r);
}

.doc figure {
  margin: 1.2rem 0;
}

.doc blockquote {
  margin: 1.4rem 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
}

.doc blockquote p {
  max-width: none;
}

.doc blockquote p:last-child {
  margin: 0;
}

.doc strong {
  font-weight: 700;
}

.doc hr {
  margin: 2rem 0;
  border: 0;
  border-top: 3px solid var(--rule);
}

.doc table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.doc th,
.doc td {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--rule);
  text-align: left;
}

.foot {
  margin-top: 3rem;
  padding: 2.6rem 1.1rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
}

.foot-brand {
  max-width: 1200px;
  margin: 0 auto;
  font-family: var(--wide);
  font-size: clamp(2.2rem, 11vw, 6.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.foot small {
  display: block;
  max-width: 1200px;
  margin: 1.2rem auto 0;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

  .side {
    position: static;
  }

  .toc {
    grid-template-columns: 1fr 1fr;
  }

  .doc .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 1.4rem;
    padding-bottom: 2.8rem;
  }

  .hero-media {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .shot-a {
    transform: rotate(-1.4deg);
  }

  .shot-b {
    width: 100%;
    transform: translateY(16px) rotate(1.4deg);
  }

  .doc div {
    scroll-margin-top: 122px;
  }
}

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

  .brand {
    letter-spacing: 0.12em;
  }

  .toc {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

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

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