@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --rail: 15rem;
  --top: 3rem;
  --edge: clamp(1.25rem, 4vw, 3.5rem);
  --display: "Playfair Display", "Source Serif 4", "Songti SC", "Source Han Serif SC", serif;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

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

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

body {
  margin: 0;
  padding-top: var(--top);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
}

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

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--top);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--edge);
  background: var(--ink);
  color: var(--paper);
}

.topbar-mark {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.14em;
  padding: 0.4rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.35rem 0.95rem;
  border: 1px solid var(--paper);
  border-radius: 999px;
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.topbar-link:hover,
.topbar-link:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.site-nav {
  position: fixed;
  top: var(--top);
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 50;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  background: var(--paper);
  border-right: 1px solid var(--ink);
}

.pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.25;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.pill:hover,
.pill:focus-visible {
  background: var(--ink);
  color: var(--paper);
  transform: translateX(3px);
}

.pill-num {
  font-family: var(--mono);
  font-size: 16px;
  opacity: 0.55;
}

.pill-txt {
  min-width: 0;
}

.hero {
  position: relative;
  margin-left: var(--rail);
  min-height: clamp(320px, 45vh, 520px);
  display: grid;
  place-items: center;
  padding: 2.5rem var(--edge);
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background-image:
    repeating-linear-gradient(to right, rgba(0, 0, 0, 0.09) 0 1px, transparent 1px 4rem),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.09) 0 1px, transparent 1px 4rem);
}

.hero-core {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 38rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin: 0 auto;
  max-width: 32rem;
  font-size: 17px;
  line-height: 1.6;
}

.plate {
  position: absolute;
  z-index: 1;
  display: block;
  width: clamp(6rem, 13vw, 10rem);
  aspect-ratio: 3 / 4;
  border: 1px solid var(--ink);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(45deg, #000 0 1px, transparent 1px 11px);
  overflow: hidden;
  will-change: transform;
}

.plate-a {
  left: 7%;
  top: 14%;
}

.plate-b {
  right: 7%;
  bottom: 14%;
}

.plate-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

main {
  margin-left: var(--rail);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  align-items: start;
}

div {
  min-width: 0;
  padding: 3rem var(--edge) 4rem;
}

div > section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--ink);
  scroll-margin-top: 5rem;
}

div > section:first-child {
  padding-top: 0;
  border-top: 0;
}

div h2 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.7vw, 2.35rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
}

div h3 {
  margin: 1.9rem 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
}

div p {
  margin: 0 0 1rem;
  max-width: 42rem;
}

div ul,
div ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  max-width: 42rem;
}

div li {
  margin-bottom: 0.45rem;
}

div a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

div blockquote {
  margin: 1.6rem 0;
  padding: 0.4rem 0 0.4rem 1.25rem;
  border-left: 3px solid var(--ink);
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.45;
}

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

div table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 16px;
}

div th,
div td {
  border: 1px solid var(--ink);
  padding: 0.5rem 0.7rem;
  text-align: left;
}

div strong {
  font-weight: 700;
}

.subtitle {
  margin: 0 0 1rem;
  font-size: 17px;
  line-height: 1.6;
}

.rail {
  position: sticky;
  top: calc(var(--top) + 1rem);
  align-self: start;
  max-height: calc(100vh - var(--top) - 2rem);
  overflow-y: auto;
  padding: 3rem 1.5rem;
  border-left: 1px solid var(--ink);
}

.rail h2 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.2;
}

.rail .subtitle {
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

.rail-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 40px;
  padding: 0.35rem 0;
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  transition: padding-left 0.18s ease, background 0.18s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  padding-left: 0.35rem;
  background: rgba(0, 0, 0, 0.05);
}

.rn {
  font-family: var(--mono);
  font-size: 16px;
  opacity: 0.5;
}

.rail-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  transition: background 0.18s ease, color 0.18s ease;
}

.rail-top:hover,
.rail-top:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

footer {
  margin-left: var(--rail);
  border-top: 1px solid var(--ink);
}

.foot-cta {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.5rem, 6vw, 5rem) var(--edge);
}

.foot-cta h2 {
  margin: 0 0 1.5rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  line-height: 1.08;
  max-width: 30rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.6rem 1.6rem;
  border: 1px solid var(--paper);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.cta-btn:hover,
.cta-btn:focus-visible {
  background: transparent;
  color: var(--paper);
}

.cta-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  font-weight: 500;
}

.cta-ghost:hover,
.cta-ghost:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  padding: 3rem var(--edge);
  border-bottom: 1px solid var(--ink);
}

.foot-grid dl {
  margin: 0;
}

.foot-grid dt {
  font-family: var(--mono);
  font-size: 16px;
  opacity: 0.5;
  line-height: 1.2;
}

.foot-grid dd {
  margin: 0 0 0.3rem;
}

.foot-grid dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.25rem 0;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease;
}

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

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.4rem;
  line-height: 1.15;
}

.foot-base {
  padding: 1.5rem var(--edge) 2.5rem;
  text-align: center;
}

.copyright {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.08em;
}

@media (max-width: 1180px) {
  .plate {
    display: none;
  }

  main {
    grid-template-columns: minmax(0, 1fr) 17rem;
  }
}

@media (max-width: 900px) {
  body {
    padding-top: 0;
  }

  .topbar {
    position: static;
    height: auto;
    padding: 0.6rem var(--edge);
  }

  .site-nav {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    padding: 0.6rem var(--edge);
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    background: var(--paper);
  }

  .pills {
    flex-direction: row;
    width: max-content;
  }

  .pill {
    white-space: nowrap;
  }

  .pill:hover,
  .pill:focus-visible {
    transform: none;
  }

  .hero {
    margin-left: 0;
    min-height: clamp(300px, 45vh, 460px);
    padding: 2rem var(--edge);
  }

  main {
    margin-left: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  div {
    padding: 2rem var(--edge) 3rem;
  }

  div > section {
    scroll-margin-top: 5rem;
  }

  .rail {
    position: static;
    max-height: none;
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--ink);
    padding: 2rem var(--edge);
  }

  footer {
    margin-left: 0;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 560px) {
  .foot-grid {
    grid-template-columns: 1fr;
  }

  .foot-cta h2 {
    font-size: 1.8rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

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