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

:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --ink: #000000;
  --paper: #f1f3f6;
  --white: #ffffff;
  --rail: 232px;
  --sh: 5px 5px 0 #000;
}

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

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

html,
body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Exo', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.68;
  font-weight: 400;
}

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

a { color: inherit; }

/* ---------- 左侧固定竖排导航 ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 14px;
  background: var(--ink);
  border-right: 4px solid var(--ink);
  overflow-y: auto;
}

.brand {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--red);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
}

.brand-char {
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
}

.brand-img { width: 100%; height: 100%; object-fit: cover; }

.brand:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--red); }

.rail-nav p {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 11px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--blue);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  animation: pop .4s ease both;
}

.rail-nav a:nth-child(n+3) { box-shadow: 4px 4px 0 var(--red); }

.rail-nav a:hover,
.rail-nav a:focus-visible {
  background: var(--blue);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

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

.contact {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px;
  background: var(--red);
  border: 3px solid var(--white);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--blue);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .08em;
}

.contact:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--blue); }

/* ---------- 主区 ---------- */
main { padding: 26px 26px 0 calc(var(--rail) + 26px); }

.wrap { max-width: 1160px; margin: 0 auto; }

.layout {
  display: grid;
  grid-template-columns: 202px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

/* ---------- 侧栏 ---------- */
aside {
  position: sticky;
  top: 22px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: var(--sh);
  padding: 14px;
}

aside h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  letter-spacing: .1em;
  font-family: 'Roboto Mono', monospace;
}

aside ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }

aside a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 7px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.35;
}

aside a:hover { background: var(--blue); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 45vh;
  padding: 26px 22px 0;
  margin-bottom: 26px;
  text-align: right;
  background: var(--blue);
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 8px 8px 0 var(--ink);
}

.hero-mark {
  position: absolute;
  top: -14px;
  right: 0;
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  font-size: clamp(46px, 10vw, 128px);
  line-height: 1;
  letter-spacing: -.05em;
  white-space: nowrap;
  color: rgba(255, 255, 255, .7);
  -webkit-text-stroke: 2px var(--ink);
  pointer-events: none;
  will-change: transform;
}

.hero-brand {
  position: relative;
  margin: 0 0 10px;
  align-self: flex-end;
  padding: 3px 9px;
  background: var(--ink);
  color: var(--white);
  font-family: 'Roboto Mono', monospace;
  font-size: .8rem;
  letter-spacing: .22em;
}

.hero h1 {
  position: relative;
  margin: 0 0 18px;
  font-size: clamp(28px, 4.6vw, 54px);
  line-height: 1.12;
  letter-spacing: -.02em;
  font-weight: 700;
  text-shadow: 3px 3px 0 rgba(255, 255, 255, .8);
}

.hero-img {
  position: relative;
  width: calc(100% + 44px);
  margin: 0 -22px;
  max-height: 270px;
  object-fit: cover;
  border-top: 3px solid var(--ink);
}

/* ---------- 正文 ---------- */
.subtitle {
  margin: 0 0 14px;
  font-family: 'Roboto Mono', monospace;
  font-size: .9rem;
  line-height: 1.5;
  color: #2b3238;
}

article > div {
  padding: 28px 0 6px;
  border-top: 3px dashed var(--ink);
  scroll-margin-top: 96px;
}

article > div:first-of-type { border-top: 0; padding-top: 4px; }

article h2 {
  margin: 0 0 10px;
  padding-left: 13px;
  border-left: 9px solid var(--red);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}

article h3 {
  margin: 24px 0 8px;
  font-size: 1.15rem;
  line-height: 1.35;
  border-bottom: 3px solid var(--blue);
  display: inline-block;
  padding-bottom: 3px;
}

article p { margin: 0 0 15px; }

article ul,
article ol { margin: 0 0 16px; padding-left: 24px; }

article li { margin-bottom: 8px; }

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

article a:hover { background: var(--blue); }

article strong { background: #d9ecff; padding: 0 3px; }

article blockquote {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--red);
}

article blockquote p:last-child { margin-bottom: 0; }

article img {
  border: 3px solid var(--ink);
  border-radius: 10px;
  margin: 0 0 16px;
}

article hr { border: 0; border-top: 3px dashed var(--ink); margin: 26px 0; }

article table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  background: var(--white);
  font-size: .95rem;
}

article th,
article td { border: 2px solid var(--ink); padding: 9px 10px; text-align: left; }

article th { background: var(--blue); }

article > div > p:last-child { margin-bottom: 18px; }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.on { opacity: 1; transform: none; }

/* ---------- 页脚 ---------- */
.site-foot {
  margin-top: 44px;
  padding: 36px 26px 18px calc(var(--rail) + 26px);
  background: var(--ink);
  color: var(--white);
  border-top: 4px solid var(--ink);
}

.foot-inner { max-width: 1160px; margin: 0 auto; }

.cta {
  padding: 22px;
  margin-bottom: 30px;
  background: var(--blue);
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 7px 7px 0 var(--red);
  color: var(--ink);
}

.cta h2 {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 3.6vw, 2.1rem);
  line-height: 1.2;
}

.cta .subtitle { color: #10222e; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  margin-top: 10px;
  padding: 10px 18px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 9px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }

.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 3px solid #4b4b4b;
}

.cols dt {
  font-family: 'Roboto Mono', monospace;
  font-size: .78rem;
  letter-spacing: .18em;
  color: var(--blue);
  margin-bottom: 8px;
}

.cols dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #e6e6e6;
}

.cols dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.cols dd a:hover { color: var(--red); border-bottom-color: var(--red); }

.bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 4px;
  font-family: 'Roboto Mono', monospace;
  font-size: .82rem;
  color: #b9b9b9;
}

.bottom p { margin: 0; }

.bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--white);
  text-decoration: none;
  border-bottom: 2px solid var(--red);
}

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .rail {
    position: sticky;
    inset: auto;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 4px solid var(--ink);
    overflow: visible;
  }

  .brand { width: 44px; height: 44px; box-shadow: 3px 3px 0 var(--red); }

  .rail-nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; padding-bottom: 4px; }

  .rail-nav p { flex-direction: row; flex-wrap: nowrap; gap: 8px; }

  .rail-nav a { white-space: nowrap; padding: 10px 12px; }

  .contact {
    margin-top: 0;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    padding: 0;
    font-size: .82rem;
    letter-spacing: 0;
  }

  main { padding: 18px 14px 0; }

  .layout { grid-template-columns: 1fr; gap: 20px; }

  aside { position: static; order: -1; box-shadow: 4px 4px 0 var(--ink); }

  aside ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

  aside a { font-size: .9rem; }

  .hero { min-height: 38vh; padding: 22px 16px 0; box-shadow: 5px 5px 0 var(--ink); }

  .hero-img { width: calc(100% + 32px); margin: 0 -16px; }

  .site-foot { padding: 28px 14px 14px; margin-top: 34px; }

  .cols { grid-template-columns: 1fr; gap: 16px; }

  .cta { box-shadow: 5px 5px 0 var(--red); }
}

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

  .rail-nav a { animation: none; }

  .reveal { opacity: 1; transform: none; transition: none; }

  .brand:hover,
  .contact:hover,
  .btn:hover,
  .rail-nav a:hover { transform: none; }
}

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