@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 {
  --sky: #3bb1ff;
  --red: #ff5252;
  --ink: #000;
  --paper: #fdfaf3;
  --line: 3px solid #000;
  --hard: 6px 6px 0 #000;
  --hard-sm: 4px 4px 0 #000;
  --serif: 'Source Serif 4', Georgia, 'Songti SC', 'Noto Serif SC', serif;
  --display: 'Playfair Display', 'Songti SC', Georgia, serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(0, 0, 0, .08) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: .01em;
  overflow-x: hidden;
}

img { max-width: 100%; }

::selection { background: var(--red); color: #fff; }

/* ---------- 左侧竖排导航 ---------- */
.rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 210px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px 18px;
  background: var(--sky);
  border-right: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin-bottom: 8px;
  padding: 4px;
  border: var(--line);
  background: #fff;
  box-shadow: var(--hard-sm);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -.02em;
  line-height: 1.1;
  text-align: center;
}

.brand img { display: block; width: 100%; height: auto; }

.navgroup { position: relative; }

.navgroup > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 44px;
  padding: 6px 10px;
  border: var(--line);
  background: #fff;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: .1em;
  user-select: none;
}

.navgroup > summary::-webkit-details-marker { display: none; }
.navgroup > summary::after { content: "+"; font-weight: 700; font-size: 18px; }

.navgroup[open] > summary {
  background: var(--red);
  color: #fff;
  box-shadow: var(--hard-sm);
}

.navgroup[open] > summary::after { content: "\2212"; }

.navgroup menu {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  left: calc(100% + 12px);
  top: -3px;
  width: 196px;
  background: #fff;
  border: var(--line);
  box-shadow: var(--hard);
  z-index: 70;
}

.navgroup menu li + li { border-top: 2px solid var(--ink); }

.navgroup menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
}

.navgroup menu a:hover,
.navgroup menu a:focus-visible { background: var(--sky); }

.cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 10px;
  border: var(--line);
  background: var(--red);
  box-shadow: var(--hard-sm);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .08em;
  text-align: center;
}

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

/* ---------- 主体骨架 ---------- */
main { margin-left: 210px; display: block; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 22px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 26px;
  align-items: start;
}

/* ---------- 头图区 ---------- */
.hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 12px 26px;
  align-items: end;
  align-content: center;
  min-height: 45vh;
  padding-bottom: 26px;
  border-bottom: var(--line);
}

.hero-title {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.hero-copy { padding-bottom: 6px; }

.hero-copy h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 24px);
  letter-spacing: -.01em;
  line-height: 1.3;
}

.subtitle {
  margin: 0;
  padding-left: 12px;
  border-left: 7px solid var(--red);
  font-size: 16px;
  line-height: 1.65;
  color: #141414;
}

.collage {
  position: relative;
  padding: 0 10px 16px 0;
}

.shot {
  margin: 0;
  display: block;
  border: var(--line);
  background: #fff;
  box-shadow: var(--hard);
  overflow: hidden;
}

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

.shot-a { aspect-ratio: 4 / 3; }

.shot-b {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46%;
  aspect-ratio: 1 / 1;
  box-shadow: var(--hard-sm);
}

.shot-a.blank { background: var(--sky); }
.shot-b.blank { background: var(--red); }

/* ---------- 正文 ---------- */
.post {
  border: var(--line);
  background: #fff;
  box-shadow: var(--hard);
  padding: 24px 22px 30px;
}

.post > article {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 3px solid var(--ink);
}

.post > article:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

article[id] { scroll-margin-top: 92px; }

.post h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(23px, 3.2vw, 32px);
  line-height: 1.22;
  letter-spacing: -.02em;
}

.post h2 + .subtitle,
.post h2 + p.subtitle {
  margin-bottom: 18px;
  border-left-color: var(--sky);
}

.post h3 {
  margin: 22px 0 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.35;
}

.post p { margin: 0 0 1.05em; }
.post p:last-child { margin-bottom: 0; }

.post ul, .post ol { margin: 0 0 1.1em; padding-left: 1.35em; }
.post li { margin-bottom: .5em; }
.post li::marker { color: var(--red); font-weight: 700; }

.post a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid var(--sky);
  padding-bottom: 1px;
}

.post a:hover { background: var(--sky); }

.post blockquote {
  margin: 0 0 1.1em;
  padding: 12px 16px;
  border: var(--line);
  border-left-width: 10px;
  background: var(--paper);
  box-shadow: var(--hard-sm);
}

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

.post table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.2em;
  font-size: 16px;
}

.post th, .post td {
  border: 2px solid var(--ink);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.post th { background: var(--sky); }

.post img { border: var(--line); height: auto; }

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 20px;
  border: var(--line);
  background: var(--sky);
  box-shadow: var(--hard);
  padding: 16px 14px;
}

.side h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: .02em;
}

.side ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: s;
}

.side li { counter-increment: s; }
.side li + li { margin-top: 8px; }

.side a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
}

.side a::before {
  content: counter(s, decimal-leading-zero);
  margin-right: 8px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--red);
}

.side a:hover, .side a:focus-visible { background: var(--red); color: #fff; }
.side a:hover::before, .side a:focus-visible::before { color: #fff; }

/* ---------- 页脚 ---------- */
.foot {
  margin-left: 210px;
  margin-top: 34px;
  padding: 30px 22px 24px;
  background: var(--ink);
  color: #fff;
  border-top: 3px solid var(--ink);
}

.foot .giant {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(48px, 10vw, 116px);
  line-height: .92;
  letter-spacing: -.045em;
  color: var(--sky);
  word-break: break-all;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 2px solid #fff;
}

.foot address {
  font-style: normal;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: .06em;
  color: #f2f2f2;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot ul a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 12px;
  border: 2px solid #fff;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}

.foot ul a:hover, .foot ul a:focus-visible { background: var(--red); border-color: var(--red); }

a:focus-visible, summary:focus-visible, .brand:focus-visible, .cta:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* ---------- 动效 ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .45s ease, transform .45s ease;
  }
  .js .reveal.in { opacity: 1; transform: none; }

  .js .side li:nth-child(2) { transition-delay: .05s; }
  .js .side li:nth-child(3) { transition-delay: .1s; }
  .js .side li:nth-child(4) { transition-delay: .15s; }
  .js .side li:nth-child(5) { transition-delay: .2s; }
  .js .side li:nth-child(6) { transition-delay: .25s; }
  .js .side li:nth-child(7) { transition-delay: .3s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 中屏 ---------- */
@media (max-width: 1100px) {
  .wrap { grid-template-columns: minmax(0, 1fr) 200px; }
  .side a { font-size: 16px; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
  .rail {
    position: sticky;
    top: 0;
    bottom: auto;
    left: auto;
    right: auto;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-right: 0;
    border-bottom: var(--line);
  }

  .brand {
    flex: 0 0 auto;
    min-height: 44px;
    width: auto;
    margin: 0;
    padding: 2px 10px;
    box-shadow: 3px 3px 0 #000;
    font-size: 16px;
  }

  .navgroup { position: static; }

  .navgroup > summary {
    min-height: 44px;
    padding: 4px 8px;
    letter-spacing: .04em;
  }

  .navgroup menu {
    position: fixed;
    left: 8px;
    right: 8px;
    top: 62px;
    width: auto;
    box-shadow: var(--hard);
  }

  .cta {
    margin: 0 0 0 auto;
    min-height: 44px;
    padding: 4px 10px;
    font-size: 16px;
  }

  main, .foot { margin-left: 0; }

  .wrap {
    grid-template-columns: 1fr;
    padding: 16px 12px;
    gap: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    align-content: start;
    gap: 14px;
    padding-bottom: 18px;
  }

  .hero-title { font-size: clamp(30px, 9vw, 46px); }

  .collage { padding: 0 8px 14px 0; }

  .shot-a { aspect-ratio: 16 / 10; }
  .shot-b { width: 40%; }

  article[id] { scroll-margin-top: 74px; }

  .post {
    padding: 18px 15px 24px;
    box-shadow: var(--hard-sm);
  }

  .post > article {
    margin-top: 22px;
    padding-top: 22px;
  }

  .side {
    position: static;
    box-shadow: var(--hard-sm);
  }

  .foot {
    margin-top: 24px;
    padding: 24px 12px 20px;
  }

  .foot-base { flex-direction: column; align-items: flex-start; }
}

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