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

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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --ash: #f1f1ef;
  --line: #000000;
  --r: 28px;
  --head-h: 134px;
  --pad: clamp(1.15rem, 5vw, 4.5rem);
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Exo 2', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

h1, h2, h3, .wordmark, .brand, .grp-btn {
  font-family: 'Orbitron', 'Exo 2', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

::selection { background: var(--ink); color: var(--paper); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.foot :focus-visible, .rail :focus-visible { outline-color: var(--paper); }

main [id] { scroll-margin-top: calc(var(--head-h) + 1.2rem); }

/* 顶部两行 */
.top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}

.brandline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem var(--pad);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-weight: 700;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  letter-spacing: -0.03em;
}

.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 1.3rem;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background 0.25s ease, color 0.25s ease;
}

.contact:hover { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }

.menuline { background: var(--paper); }

.menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem var(--pad);
}

.grp { position: relative; }

.grp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.25rem 0.95rem;
  border-radius: var(--r);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, color 0.2s ease;
}

.grp-btn::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.grp:hover .grp-btn,
.grp:focus-within .grp-btn,
.grp.open .grp-btn { background: var(--ink); color: var(--paper); }

.grp ul {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 70;
  display: none;
  min-width: 240px;
  margin: 0;
  padding: 0.6rem;
  list-style: none;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r);
}

.grp:hover ul,
.grp:focus-within ul,
.grp.open ul { display: block; }

.grp li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}

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

/* 大标题 */
.hero {
  display: grid;
  place-items: center;
  min-height: 45vh;
  padding: clamp(2rem, 6vw, 4rem) var(--pad);
  background: var(--ink);
  color: var(--paper);
}

.hero h1 {
  margin: 0;
  max-width: 22ch;
  text-align: center;
  font-weight: 900;
  font-size: clamp(2.4rem, 10vw, 7.5rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  overflow-wrap: break-word;
}

/* 内容 + 右侧栏 */
.mid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.8rem, 5vw, 3.5rem);
  max-width: 1380px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) var(--pad) clamp(2.5rem, 8vw, 5.5rem);
}

.col { min-width: 0; }

.content { max-width: 72ch; overflow-wrap: break-word; counter-reset: sec; }

.content > section {
  counter-increment: sec;
  padding: clamp(2rem, 5vw, 3.4rem) 0;
  border-top: 2px solid var(--line);
}

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

.content > section::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: 0.8rem;
  font-family: 'Orbitron', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  color: #7a7a7a;
}

.content h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.content h3 {
  margin: 1.7rem 0 0.7rem;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.content p { margin: 0 0 1.1rem; }
.content ul, .content ol { margin: 0 0 1.2rem; padding-left: 1.25rem; }
.content li { margin-bottom: 0.45rem; }
.content a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.content img { border-radius: var(--r); margin: 1rem 0; }

.content blockquote {
  margin: 1.6rem 0;
  padding: 1.1rem 1.4rem;
  background: var(--ash);
  border-left: 6px solid var(--ink);
  border-radius: 0 var(--r) var(--r) 0;
}

.content time {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-family: 'Orbitron', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: #6c6c6c;
}

.content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.content th, .content td { padding: 0.6rem 0.7rem; border-bottom: 1px solid #d8d8d5; text-align: left; }
.content code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 0.92em; background: var(--ash); padding: 0.1em 0.35em; border-radius: 6px; }

/* 侧栏 */
.rail {
  align-self: start;
  padding: 1.6rem 1.4rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r);
}

.rail small {
  display: block;
  font-family: 'Orbitron', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.34em;
  color: #b6b6b6;
}

.rail h2 {
  margin: 0.3rem 0 1rem;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.rail-list { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rail-list li { counter-increment: r; }

.rail-list a {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  min-height: 44px;
  padding: 0.35rem 0;
  border-top: 1px solid #3a3a3a;
  font-size: 0.95rem;
  line-height: 1.45;
}

.rail-list a::before {
  content: "0" counter(r);
  font-family: 'Orbitron', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: #8f8f8f;
}

.rail-list a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* 图区 */
.shots {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 var(--pad) clamp(2.5rem, 6vw, 4rem);
}

.shots figure { margin: 0 0 1rem; border-radius: var(--r); overflow: hidden; background: var(--ash); }

/* 页脚 */
.foot {
  margin-top: clamp(2rem, 6vw, 4rem);
  padding: clamp(2.2rem, 6vw, 4rem) var(--pad) 0;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r) var(--r) 0 0;
}

.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.wordmark {
  margin: 0;
  font-weight: 900;
  font-size: clamp(2.2rem, 9vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  overflow-wrap: break-word;
}

.foot-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

.foot-nav dl { margin: 0; }
.foot-nav dt, .foot-nav dd { margin: 0; }
.foot-nav dt { font-weight: 700; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.15rem 0;
  border-bottom: 1px solid #3a3a3a;
  font-size: 0.95rem;
  line-height: 1.4;
}

.foot-nav a:hover { border-color: var(--paper); }

.foot-base {
  margin-top: 2.5rem;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid #3a3a3a;
}

.foot-base p {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: #cfcfcf;
}

/* 入场 */
.rv { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.rv.in { opacity: 1; transform: none; }

@media (min-width: 900px) {
  .mid { grid-template-columns: minmax(0, 1fr) 290px; }
  .rail { position: sticky; top: calc(var(--head-h) + 1.5rem); }
}

@media (min-width: 760px) {
  .foot-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(2rem, 6vw, 4rem); }
}

@media (min-width: 560px) {
  .foot-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  :root { --head-h: 124px; }

  .menu {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.35rem var(--pad) 0.55rem;
    scrollbar-width: thin;
  }

  .grp { display: flex; flex: 0 0 auto; align-items: center; gap: 0.3rem; }

  .grp-btn {
    padding: 0.2rem 0.5rem;
    border-radius: 16px;
    background: var(--ash);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
  }

  .grp-btn::after { width: 5px; height: 5px; }

  .grp ul {
    position: static;
    display: flex;
    gap: 0.3rem;
    min-width: 0;
    padding: 0;
    background: none;
    color: inherit;
    border-radius: 0;
  }

  .grp li a {
    padding: 0.3rem 0.85rem;
    border-radius: 18px;
    background: var(--ash);
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .rail { position: static; }
  .rail-list a { min-height: 46px; }
}

@media (max-width: 640px) {
  .content table { display: block; overflow-x: auto; }
  .content blockquote { border-radius: 0 var(--r) var(--r) 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .contact, .grp-btn, .grp li a { transition: none; }
}

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