@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');

:root {
  --blue: #3bb1ff;
  --blue-deep: #0b4a72;
  --blue-pale: #e4f4ff;
  --red: #ff5252;
  --red-pale: #ffe3e3;
  --ink: #000;
  --paper: #f3f8fc;
  --white: #fff;
  --bd: 3px solid #000;
  --sh: 6px 6px 0 #000;
  --sh-sm: 3px 3px 0 #000;
  --head: 'Orbitron', 'Exo 2', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --body: 'Exo 2', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --bar: 150px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

img { max-width: 100%; }
menu, ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--blue-deep); }

:focus-visible {
  outline: 3px dashed var(--red);
  outline-offset: 3px;
}

/* ---------- 顶部：品牌行 + 菜单行 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
  border-bottom: var(--bd);
  box-shadow: 0 5px 0 #000;
}

.brandrow {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: var(--bd);
  background: var(--white);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--head);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.04em;
}

.brandmark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border: var(--bd);
  background: var(--blue);
  box-shadow: var(--sh-sm);
  font-family: var(--head);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.brandmark-img { object-fit: cover; background: var(--white); }

.brand-txt { border-bottom: 5px solid var(--red); padding-bottom: 1px; }

.menurrow {
  background: var(--blue);
  padding: 8px 16px;
}

.nav-details { position: relative; }

summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: var(--bd);
  background: var(--white);
  box-shadow: var(--sh-sm);
  font-family: var(--head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.14em;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

summary::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--red);
  border: 2px solid var(--ink);
}

.nav-details[open] summary { background: var(--ink); color: var(--white); }
.nav-details[open] summary::before { background: var(--blue); }

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border: var(--bd);
  background: var(--white);
  box-shadow: var(--sh-sm);
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  background: var(--red);
  color: var(--white);
}

.dot {
  width: 12px;
  height: 12px;
  flex: none;
  background: var(--blue);
  border: 2px solid var(--ink);
}

.nav-menu a:hover .dot { background: var(--white); }

@media (max-width: 899px) {
  .nav-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 12px);
    flex-direction: column;
    gap: 6px;
    background: var(--white);
    border: var(--bd);
    box-shadow: 8px 8px 0 #000;
    padding: 12px;
    max-height: 68vh;
    overflow: auto;
    z-index: 70;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--blue);
  border-bottom: 6px solid var(--ink);
}

.hero-flat {
  background: var(--blue);
}

.hero-media { position: absolute; inset: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-veil {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1020px;
  padding: 110px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  color: var(--white);
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(30px, 6.4vw, 60px);
  line-height: 1.18;
  letter-spacing: 0.01em;
  text-shadow: 4px 4px 0 #000;
}

.hero-stripe {
  width: 210px;
  max-width: 60vw;
  height: 14px;
  background: var(--red);
  border: var(--bd);
  transform: skewX(-24deg);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.85);
}

.hero-flat .hero-veil { background: rgba(0, 0, 0, 0.34); }

/* ---------- 正文骨架 ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 16px 60px;
}

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

@media (min-width: 900px) {
  .grid {
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 30px;
  }
}

.side {
  order: 2;
  border: var(--bd);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  box-shadow: var(--sh);
  padding: 18px 16px 20px;
}

@media (min-width: 900px) {
  .side {
    order: 0;
    position: sticky;
    top: calc(var(--bar) + 12px);
    align-self: start;
  }
}

.side h2 {
  font-size: 16px;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
}

.side hr { border-top: 4px solid var(--red); margin: 0 0 14px; }

.side-list { display: grid; gap: 8px; }

.side-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: var(--bd);
  background: var(--white);
  box-shadow: var(--sh-sm);
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

.side-list a:hover,
.side-list a:focus-visible { background: var(--blue); }

article.post { min-width: 0; }

article.post > section {
  border: var(--bd);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(8px);
  box-shadow: var(--sh);
  padding: 22px 18px;
  margin: 0 0 28px;
  scroll-margin-top: var(--bar);
}

@media (min-width: 720px) {
  article.post > section { padding: 32px 30px; }
}

article.post > section:last-child { margin-bottom: 0; }

h2, h3 {
  font-family: var(--head);
  line-height: 1.32;
  letter-spacing: 0.02em;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(21px, 3.2vw, 27px);
  margin: 0 0 10px;
}

h3 { font-size: 19px; margin: 24px 0 8px; }

hr {
  border: 0;
  border-top: 4px solid var(--ink);
  margin: 0 0 16px;
}

article.post p { margin: 0 0 15px; }
article.post ul, article.post ol { margin: 0 0 16px; padding-left: 22px; }
article.post ul { list-style: square; }
article.post ol { list-style: decimal; }
article.post li { margin: 0 0 8px; }

article.post a {
  color: var(--blue-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}

article.post img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border: var(--bd);
  border-radius: 18px;
  box-shadow: var(--sh);
}

article.post blockquote {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-left: 8px solid var(--red);
  border-top: var(--bd);
  border-right: var(--bd);
  border-bottom: var(--bd);
  background: var(--red-pale);
  border-radius: 0 18px 18px 0;
}

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

article.post table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 16px;
}

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

article.post th { background: var(--blue-pale); }
article.post code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  background: var(--blue-pale);
  border: 2px solid var(--ink);
  padding: 1px 5px;
  font-size: 15px;
}

/* ---------- 页脚 ---------- */
.foot {
  background: var(--ink);
  color: var(--white);
  border-top: 6px solid var(--blue);
  padding: 34px 16px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}

@media (min-width: 760px) {
  .foot {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 24px;
    padding: 46px 32px 0;
  }
}

.foot h2 {
  font-size: 16px;
  letter-spacing: 0.14em;
  margin: 0 0 8px;
  color: var(--blue);
}

.foot hr { border-top: 4px solid var(--red); margin: 0 0 12px; }

.foot ul { display: grid; gap: 4px; }

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

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

.f-brand { display: grid; gap: 10px; align-content: start; }
.foot-brand { min-height: 44px; }
.f-name {
  margin: 0;
  font-family: var(--head);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.f-bar {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 14px 0 22px;
  border-top: 3px solid var(--white);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

/* ---------- 动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

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

@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap { padding: 28px 12px 46px; }
  .hero-inner { padding: 96px 16px; }
  .hero h1 { text-shadow: 3px 3px 0 #000; }
}

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