@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;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Exo 2', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: #fafaf8;
  color: #1a1a1a;
  line-height: 1.7;
  position: relative;
  overflow-x: hidden;
}

/* ===== 纸张纹理背景（CSS 伪元素模拟） ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      #4a4a4a 29px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 44px,
      #4a4a4a 45px
    );
}

body > * {
  position: relative;
  z-index: 1;
}

/* ===== 站点头部 ===== */
.site-header {
  background-color: #fafaf8;
  border-bottom: 2px solid #1a1a1a;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand {
  padding: 14px 32px 10px;
  border-bottom: 1px dashed #4a4a4a;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand-logo-link,
.brand-name-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

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

.brand-name {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-tagline {
  font-size: 0.82rem;
  color: #4a4a4a;
  font-weight: 300;
  letter-spacing: 0.03em;
  border-left: 2px solid #4a4a4a;
  padding-left: 14px;
  max-width: 480px;
  line-height: 1.4;
}

.header-nav-bar {
  padding: 0 32px;
  background-color: #1a1a1a;
}

.top-nav .nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.top-nav .nav-list li a {
  display: block;
  padding: 13px 18px;
  color: #fafaf8;
  text-decoration: none;
  font-size: 0.85rem;
  font-family: 'Orbitron', monospace;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-right: 1px solid rgba(250,250,248,0.12);
  transition: none;
  position: relative;
}

.top-nav .nav-list li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #fafaf8;
  transform: scaleX(0);
  transform-origin: left;
}

.top-nav .nav-list li a:hover {
  background-color: #4a4a4a;
  color: #fafaf8;
}

.top-nav .nav-list li a:hover::after {
  transform: scaleX(1);
}

.top-nav .nav-list li:first-child a {
  border-left: 1px solid rgba(250,250,248,0.12);
}

/* ===== Hero ===== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  border-bottom: 2px solid #1a1a1a;
  overflow: hidden;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(74,74,74,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}

.hero-media {
  background-color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 100vh;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05);
}

.hero-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  background:
    repeating-linear-gradient(
      45deg,
      #1a1a1a,
      #1a1a1a 2px,
      #2a2a2a 2px,
      #2a2a2a 18px
    );
}

.hero-placeholder-text {
  font-family: 'Orbitron', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fafaf8;
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  opacity: 0.6;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  padding: 60px 48px 60px 32px;
  background-color: #fafaf8;
  position: relative;
}

.hero-text::before {
  content: '';
  position: absolute;
  top: 40px;
  right: 40px;
  width: 80px;
  height: 80px;
  border: 3px solid #4a4a4a;
  opacity: 0.2;
  transform: rotate(12deg);
  pointer-events: none;
}

.hero-h1 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  position: relative;
}

.hero-h1::after {
  content: '';
  display: block;
  height: 4px;
  background: #4a4a4a;
  margin-top: 16px;
  margin-left: auto;
  width: 60%;
  opacity: 0.5;
}

.hero-sub {
  font-size: 1rem;
  color: #4a4a4a;
  line-height: 1.8;
  max-width: 380px;
  font-weight: 300;
}

/* ===== 主内容区 ===== */
main {
  padding: 64px 0;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.content-section {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.main-article {
  min-width: 0;
}

.article-body {
  color: #1a1a1a;
}

/* ===== 正文内容样式 ===== */
.article-body h2 {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 56px;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid #4a4a4a;
  letter-spacing: 0.04em;
  position: relative;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h2::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%) rotate(-2deg);
  width: 6px;
  height: 70%;
  background: #4a4a4a;
  opacity: 0.5;
}

.article-body h3 {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 32px;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid #4a4a4a;
}

.article-body p {
  font-size: 1rem;
  line-height: 1.85;
  color: #1a1a1a;
  margin-bottom: 18px;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.article-body li {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 8px;
}

.article-body a {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #4a4a4a;
}

.article-body a:hover {
  color: #4a4a4a;
}

.article-body strong {
  font-weight: 600;
  color: #1a1a1a;
}

.article-body div {
  margin-bottom: 40px;
  padding: 32px;
  border: 1.5px solid #4a4a4a;
  border-radius: 28px;
  background: rgba(250,250,248,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  position: relative;
  scroll-margin-top: 90px;
}

.article-body div::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 20px;
  right: 20px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #4a4a4a, transparent);
  opacity: 0.3;
}

/* 拼贴感旋转装饰 */
.article-body div:nth-child(odd) {
  transform: rotate(-0.3deg);
}

.article-body div:nth-child(even) {
  transform: rotate(0.2deg);
}

/* ===== 侧边栏 ===== */
.sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
}

.sidebar-inner {
  border: 2px solid #1a1a1a;
  border-radius: 28px;
  padding: 28px 24px;
  background: rgba(250,250,248,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  transform: rotate(0.5deg);
}

.sidebar-inner::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: -6px;
  inset-inline-end: -6px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border: 2px solid #4a4a4a;
  border-radius: 28px;
  z-index: -1;
  opacity: 0.3;
}

.sidebar-title {
  font-family: 'Orbitron', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.subtitle,
.sidebar .subtitle {
  font-size: 0.8rem;
  color: #4a4a4a;
  margin-bottom: 18px;
  line-height: 1.5;
}

.sidebar-nav {
  list-style: none;
  margin-bottom: 24px;
}

.sidebar-nav li {
  border-bottom: 1px dashed rgba(74,74,74,0.3);
}

.sidebar-nav li:last-child {
  border-bottom: none;
}

.sidebar-nav li a {
  display: block;
  padding: 10px 4px;
  color: #1a1a1a;
  text-decoration: none;
  font-size: 0.88rem;
  font-family: 'Exo 2', sans-serif;
  font-weight: 500;
  min-height: 40px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  transition: none;
}

.sidebar-nav li a:hover {
  color: #4a4a4a;
  padding-left: 10px;
}

.sidebar-card {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 16px;
}

.sidebar-card-text {
  font-size: 0.82rem;
  color: #fafaf8;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ===== 页脚 ===== */
.site-footer {
  background-color: #1a1a1a;
  color: #fafaf8;
  border-top: 3px solid #4a4a4a;
  margin-top: 80px;
}

.footer-nav-section {
  padding: 40px 32px 24px;
  border-bottom: 1px dashed rgba(250,250,248,0.15);
}

.footer-nav-dl {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 0;
}

.footer-nav-title {
  font-family: 'Orbitron', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(250,250,248,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: 20px;
  flex-shrink: 0;
}

.footer-nav-dl dd {
  display: inline;
}

.footer-nav-dl dd a {
  display: inline-block;
  color: #fafaf8;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 8px 14px;
  min-height: 40px;
  line-height: 24px;
  font-family: 'Exo 2', sans-serif;
  border-right: 1px solid rgba(250,250,248,0.12);
  transition: none;
}

.footer-nav-dl dd:last-child a {
  border-right: none;
}

.footer-nav-dl dd a:hover {
  color: rgba(250,250,248,0.6);
  text-decoration: underline;
}

.footer-copy-section {
  padding: 16px 32px;
  text-align: center;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(250,250,248,0.4);
  font-family: 'Exo 2', sans-serif;
  letter-spacing: 0.03em;
  margin-bottom: 0;
}

/* ===== Scroll Reveal 动效 ===== */
.article-body div,
.sidebar-inner {
  opacity: 0;
  transform: translateY(20px) rotate(-0.3deg);
  transition: none;
}

.article-body div:nth-child(even) {
  transform: translateY(20px) rotate(0.2deg);
}

.article-body div.is-visible,
.sidebar-inner.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(-0.3deg);
  transition: opacity 0.4s step-start, transform 0.3s ease-out;
}

.article-body div:nth-child(even).is-visible {
  transform: translateY(0) rotate(0.2deg);
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .article-body div,
  .sidebar-inner {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .article-body div.is-visible,
  .sidebar-inner.is-visible {
    transform: none;
    transition: none;
  }
  .article-body div:nth-child(odd) {
    transform: none;
  }
  .article-body div:nth-child(even) {
    transform: none;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .content-section {
    grid-template-columns: 1fr 260px;
    gap: 32px;
  }
  .wrap {
    padding: 0 24px;
  }
}

@media (max-width: 768px) {
  .header-brand {
    padding: 12px 20px 10px;
  }
  .brand-name {
    font-size: 1.2rem;
  }
  .brand-tagline {
    display: none;
  }
  .header-nav-bar {
    padding: 0 12px;
  }
  .top-nav .nav-list {
    gap: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .top-nav .nav-list li a {
    padding: 13px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
    min-height: 44px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-media {
    min-height: 40vh;
    max-height: 50vh;
  }
  .hero-placeholder {
    min-height: 40vh;
  }
  .hero-text {
    min-height: auto;
    padding: 48px 28px;
    text-align: right;
    align-items: flex-end;
  }
  .hero-h1 {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }
  .content-section {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .sidebar {
    position: static;
    order: -1;
  }
  .sidebar-inner {
    transform: rotate(0.3deg);
  }
  .wrap {
    padding: 0 16px;
  }
  main {
    padding: 40px 0;
  }
  .article-body div {
    padding: 24px 20px;
    margin-bottom: 28px;
  }
  .article-body h2 {
    font-size: 1.15rem;
    margin-top: 36px;
  }
  .footer-nav-section {
    padding: 28px 20px 18px;
  }
  .footer-nav-dl {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .footer-nav-title {
    margin-bottom: 10px;
    margin-right: 0;
  }
  .footer-nav-dl dd {
    display: block;
    width: 100%;
  }
  .footer-nav-dl dd a {
    border-right: none;
    border-bottom: 1px dashed rgba(250,250,248,0.12);
    display: block;
    padding: 11px 8px;
    min-height: 44px;
  }
  .footer-copy-section {
    padding: 14px 20px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: auto;
  }
  .hero-text::before {
    display: none;
  }
  .article-body h2::before {
    display: none;
  }
}

/* ===== 玻璃拟态卡片辅助 ===== */
@supports (backdrop-filter: blur(4px)) {
  .article-body div {
    background: rgba(250,250,248,0.6);
  }
  .sidebar-inner {
    background: rgba(250,250,248,0.75);
  }
}
