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

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

:root {
  --black: #000000;
  --panel: #121212;
  --surface: #1a1a1a;
  --surface2: #222222;
  --midnight: #0d1b3e;
  --midnight-light: #1a2f6e;
  --accent: #3a6bcc;
  --accent-glow: #4a7ef0;
  --neon-blue: #4fc3f7;
  --neon-gold: #ffd54f;
  --neon-green: #69f0ae;
  --text-primary: #f0f0f0;
  --text-secondary: #aaaaaa;
  --text-muted: #666666;
  --border: #2a2a2a;
  --border-accent: #3a6bcc;
  --header-h: 60px;
  --anchor-h: 40px;
  --radius: 0;
  --font-main: 'Noto Sans Arabic', 'Noto Naskh Arabic', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-serif: 'Noto Naskh Arabic', 'Noto Sans Arabic', Georgia, serif;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body.oled-dark {
  background: var(--black);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* scroll margin for sticky nav */
section[id] {
  scroll-margin-top: calc(var(--header-h) + var(--anchor-h) + 8px);
}

/* === 链接 === */
a {
  color: var(--neon-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent-glow);
}
a:focus-visible {
  outline: 2px solid var(--accent-glow);
  outline-offset: 3px;
}

/* === 排版 === */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.3rem;
}

/* small 眉题样式 */
small {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon-blue);
  margin-bottom: 0.4rem;
  font-family: var(--font-main);
  font-weight: 500;
}

/* === 页面包装 === */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === 顶部导航 === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(0, 0, 0, 0.95);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 1rem;
}

.brand-corner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--text-primary);
}

.brand-icon,
.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.brand-text-icon {
  width: 36px;
  height: 36px;
  background: var(--midnight-light);
  color: var(--neon-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  border: 1px solid var(--border-accent);
  text-shadow: 0 0 10px var(--neon-blue);
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  min-height: 44px;
  min-width: 44px;
}

.toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* aside 导航容器 */
.header-aside {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.header-aside nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.header-aside nav ul li a.nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  min-height: 40px;
  line-height: 1;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.header-aside nav ul li a.nav-link:hover,
.header-aside nav ul li a.nav-link:focus-visible {
  color: var(--neon-blue);
  border-bottom-color: var(--neon-blue);
  text-shadow: 0 0 10px rgba(79, 195, 247, 0.4);
}

/* CTA 按钮 */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: none;
  min-height: 40px;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

.header-cta {
  background: var(--midnight-light);
  color: var(--neon-blue);
  border: 1px solid var(--border-accent);
}

.header-cta:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(74, 126, 240, 0.5);
}

.cta-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
}

.cta-primary:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 16px rgba(74, 126, 240, 0.6);
  color: #fff;
}

.cta-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.cta-ghost:hover {
  border-color: var(--neon-blue);
  color: var(--neon-blue);
}

/* === 粘性锚点条 === */
.sticky-anchor-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 900;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  height: var(--anchor-h);
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-anchor-bar::-webkit-scrollbar {
  display: none;
}

.anchor-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.25rem;
  gap: 0;
  min-width: max-content;
}

.anchor-link {
  display: inline-flex;
  align-items: center;
  padding: 0 0.9rem;
  height: 100%;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  border-right: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.anchor-link:first-child {
  border-left: 1px solid var(--border);
}

.anchor-link:hover {
  color: var(--neon-blue);
  background: rgba(79, 195, 247, 0.06);
}

/* === Hero 区块 === */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + var(--anchor-h));
  overflow: hidden;
  background: var(--black);
}

.hero-deco-text {
  position: absolute;
  right: -0.1em;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(8rem, 20vw, 18rem);
  font-weight: 700;
  color: rgba(26, 47, 110, 0.15);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
  font-family: var(--font-serif);
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-text-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-eyebrow {
  font-size: 0.75rem;
  color: var(--neon-blue);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

.hero-h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero 右侧图像区 */
.hero-img-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16/10;
  border: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
}

.hero-img-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(58, 107, 204, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-num {
  font-size: 5rem;
  font-weight: 700;
  color: rgba(79, 195, 247, 0.15);
  font-family: var(--font-serif);
  text-shadow: 0 0 10px rgba(79, 195, 247, 0.2);
  letter-spacing: -0.05em;
}

/* === 正文主体 === */
.site-main {
  flex: 1;
  background: var(--black);
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.content-section {
  width: 100%;
}

.content-article {
  width: 100%;
}

/* 正文内容样式 */
.content-article h2 {
  font-size: clamp(1.3rem, 2.8vw, 1.9rem);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

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

.content-article h3 {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--neon-blue);
}

.content-article p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.content-article ul,
.content-article ol {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.content-article li {
  line-height: 1.7;
  margin-bottom: 0.4rem;
}

.content-article strong {
  color: var(--text-primary);
  font-weight: 600;
}

.content-article a {
  color: var(--neon-blue);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.content-article a:hover {
  border-bottom-color: var(--neon-blue);
}

/* section 分隔 */
.content-article section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.content-article section:last-child {
  border-bottom: none;
}

/* small 眉题在正文内 */
.content-article small {
  font-size: 0.72rem;
  color: var(--neon-blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.3rem;
}

/* time 标签 */
time {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* 卡片样式（正文内如有） */
.content-article .card,
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--accent);
  border-radius: 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: border-bottom-color 0.25s, box-shadow 0.25s;
}

.content-article .card:hover,
.card:hover {
  border-bottom-color: var(--neon-blue);
  box-shadow: 0 4px 20px rgba(79, 195, 247, 0.1);
}

/* === 页脚 === */
.site-footer {
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  text-align: center;
}

.site-footer p.footer-brand {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.site-footer small.footer-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* === 动效 === */
@media (prefers-reduced-motion: no-preference) {
  .hero-h1 {
    animation: fadeInUp 0.7s ease both;
  }

  .hero-eyebrow {
    animation: fadeInUp 0.5s ease both;
  }

  .hero-desc {
    animation: fadeInUp 0.8s ease 0.1s both;
  }

  .hero-actions {
    animation: fadeInUp 0.8s ease 0.2s both;
  }

  .hero-img-frame {
    animation: fadeInRight 0.9s ease 0.15s both;
  }

  .cta-btn {
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
  }

  .cta-btn:hover {
    transform: translateY(-1px);
  }

  .card,
  .content-article .card {
    transition: border-bottom-color 0.25s, box-shadow 0.25s, transform 0.2s;
  }

  .card:hover,
  .content-article .card:hover {
    transform: translateY(-2px);
  }
}

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* === 移动端断点 === */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 1.25rem;
  }

  .hero-img-col {
    order: -1;
  }

  .hero-img-frame {
    max-width: 100%;
  }

  .hero-deco-text {
    font-size: 35vw;
    opacity: 0.6;
  }

  .header-aside nav ul {
    gap: 0;
  }
}

@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .header-aside {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(18, 18, 18, 0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 1.25rem;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 990;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .header-aside.open {
    transform: translateY(0);
    opacity: 1;
  }

  .header-aside nav {
    width: 100%;
  }

  .header-aside nav ul {
    flex-direction: column;
    width: 100%;
  }

  .header-aside nav ul li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .header-aside nav ul li a.nav-link {
    padding: 0.9rem 0;
    font-size: 1rem;
    min-height: 48px;
    border-bottom: none;
  }

  .header-cta {
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem 1.25rem;
  }

  .hero-section {
    min-height: auto;
    padding-top: calc(var(--header-h) + var(--anchor-h) + 1rem);
  }

  .hero-h1 {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .cta-btn {
    width: 100%;
    min-height: 48px;
  }

  .wrap {
    padding: 2rem 1rem;
  }

  .content-article h2 {
    margin-top: 2rem;
  }

  .anchor-link {
    padding: 0 0.65rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 375px) {
  .hero-h1 {
    font-size: 1.5rem;
  }

  .site-header {
    height: 56px;
  }

  :root {
    --header-h: 56px;
  }
}

/* === 辅助工具 === */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
