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

/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body, .nb-body {
  font-family: 'Exo', 'Roboto Mono', 'Segoe UI', system-ui, sans-serif;
  background: #f5f5f0;
  color: #000;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 导航 ===== */
.nav-details {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 3px solid #000;
  box-shadow: 0 4px 0 #000;
}

.nav-details > summary {
  list-style: none;
  cursor: default;
  display: block;
}

.nav-details > summary::-webkit-details-marker {
  display: none;
}

.nav-summary {
  display: block;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 64px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 1rem;
}

menu, .nav-left, .nav-right {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.nav-right {
  justify-content: flex-end;
}

.nav-left {
  justify-content: flex-start;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: #000;
  text-decoration: none;
  border: 2.5px solid #000;
  border-radius: 999px;
  background: #fff;
  box-shadow: 3px 3px 0 #000;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  min-height: 40px;
}

.nav-pill:hover {
  background: #3bb1ff;
  box-shadow: 5px 5px 0 #000;
  transform: translate(-1px, -1px);
}

.brand-center {
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #000;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.8rem;
  border: 3px solid #000;
  background: #ff5252;
  box-shadow: 4px 4px 0 #000;
}

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 64px;
  overflow: hidden;
  background: #fff;
  border-bottom: 3px solid #000;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.hero-text-block {
  position: relative;
  z-index: 2;
  text-align: right;
  padding: 4rem 2.5rem 2rem;
  max-width: 700px;
  margin-left: auto;
}

.hero-h1 {
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 1.1;
  color: #000;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
  text-shadow: 5px 5px 0 #3bb1ff;
}

.hero-desc {
  font-size: 1.1rem;
  color: #111;
  line-height: 1.7;
  border-right: 4px solid #ff5252;
  padding-right: 1.2rem;
}

.hero-img-block {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 45vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: 1.5rem;
  border-top: 3px solid #000;
}

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

.hero-placeholder {
  background: #3bb1ff;
  min-height: 200px;
}

/* ===== div scroll-margin ===== */
div[id] {
  scroll-margin-top: 80px;
}

/* ===== 主内容区 ===== */
main {
  display: block;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.content-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* aside 在左侧 */
.content-aside {
  flex-shrink: 0;
  width: 220px;
  position: sticky;
  top: 80px;
}

.aside-inner {
  background: #fff;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
  padding: 1.2rem 1rem;
}

.aside-title {
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
  color: #000;
}

.aside-inner hr {
  border: none;
  border-top: 2px solid #000;
  margin-bottom: 0.8rem;
}

.aside-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.aside-nav-list a {
  display: block;
  font-size: 0.85rem;
  font-family: 'Roboto Mono', monospace;
  font-weight: 500;
  color: #000;
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
  min-height: 40px;
  line-height: 1.4;
  display: flex;
  align-items: center;
}

.aside-nav-list a:hover {
  background: #3bb1ff;
  border-color: #000;
  box-shadow: 2px 2px 0 #000;
  transform: translate(-1px, -1px);
}

/* section */
.content-article {
  flex: 1;
  min-width: 0;
}

.page-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #111;
}

/* ===== 正文内 div 样式 ===== */
.page-content div {
  margin-bottom: 3.5rem;
  padding: 2rem;
  background: #fff;
  border: 3px solid #000;
  box-shadow: 6px 6px 0 #000;
  border-radius: 0;
  transition: box-shadow 0.18s, transform 0.18s;
}

.page-content div:hover {
  box-shadow: 9px 9px 0 #000;
  transform: translate(-2px, -2px);
}

.page-content h2 {
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 1.55rem;
  color: #000;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.page-content h2 + hr {
  border: none;
  border-top: 3px solid #ff5252;
  margin-bottom: 1.2rem;
  box-shadow: 3px 3px 0 #000;
}

.page-content h3 {
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #000;
  margin: 1.4rem 0 0.5rem;
}

.page-content h3 + hr {
  border: none;
  border-top: 2px solid #3bb1ff;
  margin-bottom: 1rem;
}

.page-content p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.page-content ul, .page-content ol {
  margin: 0.8rem 0 1rem 1.5rem;
}

.page-content li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.page-content a {
  color: #000;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #3bb1ff;
  text-decoration-thickness: 2px;
  transition: color 0.12s, text-decoration-color 0.12s;
}

.page-content a:hover {
  color: #ff5252;
  text-decoration-color: #ff5252;
}

.page-content strong {
  font-weight: 700;
  color: #000;
}

.page-content blockquote {
  border-left: 5px solid #ff5252;
  padding: 0.8rem 1.2rem;
  background: #fff8f8;
  margin: 1.2rem 0;
  font-style: normal;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.95rem;
}

.page-content img {
  max-width: 100%;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
  display: block;
  margin: 1rem 0;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
}

.page-content th, .page-content td {
  border: 2px solid #000;
  padding: 0.6rem 0.9rem;
  text-align: left;
}

.page-content th {
  background: #3bb1ff;
  font-weight: 700;
}

.page-content tr:nth-child(even) td {
  background: #f0f8ff;
}

/* ===== 页脚 ===== */
footer {
  background: #000;
  color: #fff;
  border-top: 3px solid #000;
}

.footer-top {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 3rem;
  padding: 3rem 1.5rem 2rem;
  align-items: flex-start;
}

.footer-brand-col {
  flex: 1;
}

.footer-brand-giant {
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #3bb1ff;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.8rem;
  text-shadow: 4px 4px 0 #ff5252;
}

.footer-brand-desc {
  font-size: 0.9rem;
  color: #ccc;
  line-height: 1.6;
  max-width: 320px;
}

.footer-links-col {
  flex-shrink: 0;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  color: #fff;
  text-decoration: none;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border: 2px solid transparent;
  display: block;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.footer-nav a:hover {
  background: #3bb1ff;
  border-color: #fff;
  color: #000;
}

.footer-bottom {
  border-top: 2px solid #333;
  padding: 1.2rem 1.5rem;
  text-align: center;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-copy {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 0.3rem;
}

.footer-note {
  font-size: 0.8rem;
  color: #666;
}

/* ===== 动效：stagger list ===== */
@media (prefers-reduced-motion: no-preference) {
  .aside-nav-list li {
    opacity: 0;
    transform: translateX(-12px);
    animation: fadeSlideIn 0.3s forwards;
  }

  .aside-nav-list li:nth-child(1) { animation-delay: 0.05s; }
  .aside-nav-list li:nth-child(2) { animation-delay: 0.10s; }
  .aside-nav-list li:nth-child(3) { animation-delay: 0.15s; }
  .aside-nav-list li:nth-child(4) { animation-delay: 0.20s; }
  .aside-nav-list li:nth-child(5) { animation-delay: 0.25s; }
  .aside-nav-list li:nth-child(6) { animation-delay: 0.30s; }
  .aside-nav-list li:nth-child(7) { animation-delay: 0.35s; }

  @keyframes fadeSlideIn {
    to { opacity: 1; transform: translateX(0); }
  }

  .page-content div {
    opacity: 0;
    animation: sectionReveal 0.4s forwards;
  }

  .page-content div:nth-child(1) { animation-delay: 0.1s; }
  .page-content div:nth-child(2) { animation-delay: 0.18s; }
  .page-content div:nth-child(3) { animation-delay: 0.26s; }
  .page-content div:nth-child(4) { animation-delay: 0.34s; }
  .page-content div:nth-child(5) { animation-delay: 0.42s; }
  .page-content div:nth-child(6) { animation-delay: 0.50s; }
  .page-content div:nth-child(7) { animation-delay: 0.58s; }

  @keyframes sectionReveal {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .aside-nav-list li,
  .page-content div {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .content-section {
    flex-direction: column;
  }

  .content-aside {
    width: 100%;
    position: static;
  }

  .aside-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .footer-top {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
}

@media (max-width: 600px) {
  .nav-inner {
    padding: 0 0.8rem;
    height: 56px;
    gap: 0.4rem;
  }

  .nav-pill {
    font-size: 0.72rem;
    padding: 0.4rem 0.6rem;
  }

  .nav-details {
    overflow-x: auto;
  }

  .hero-text-block {
    padding: 2rem 1.2rem 1.2rem;
    text-align: right;
  }

  .hero-h1 {
    font-size: 1.9rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .wrap {
    padding: 1.8rem 1rem 3rem;
  }

  .page-content div {
    padding: 1.2rem 1rem;
    box-shadow: 4px 4px 0 #000;
  }

  .footer-brand-giant {
    font-size: 2rem;
  }

  .footer-top {
    padding: 2rem 1rem 1.5rem;
  }

  div[id] {
    scroll-margin-top: 68px;
  }
}

@media (max-width: 400px) {
  .nav-left, .nav-right {
    gap: 0.25rem;
  }

  .nav-pill {
    font-size: 0.68rem;
    padding: 0.35rem 0.5rem;
  }

  .hero-h1 {
    font-size: 1.5rem;
  }
}
