/* Material Design 3 (M3) 主题 - 黑白灰配色 */
:root {
  --md-sys-color-primary: #1a1a1a;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #e8e8e8;
  --md-sys-color-on-primary-container: #1a1a1a;
  --md-sys-color-secondary: #444444;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #e8e8e8;
  --md-sys-color-on-secondary-container: #1a1a1a;
  --md-sys-color-surface: #ffffff;
  --md-sys-color-on-surface: #1a1a1a;
  --md-sys-color-surface-variant: #f5f5f5;
  --md-sys-color-on-surface-variant: #444444;
  --md-sys-color-background: #f5f5f5;
  --md-sys-color-on-background: #1a1a1a;
  --md-sys-color-outline: #cccccc;
  --md-sys-color-outline-variant: #e0e0e0;
  --md-sys-color-shadow: rgba(0,0,0,0.1);
  --md-sys-color-surface-container: #fafafa;
  --md-sys-color-surface-container-high: #f0f0f0;
  --md-elevation-level1: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --md-elevation-level2: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --md-elevation-level3: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --md-sys-typescale-headline-large-size: 32px;
  --md-sys-typescale-headline-medium-size: 28px;
  --md-sys-typescale-title-large-size: 22px;
  --md-sys-typescale-title-medium-size: 16px;
  --md-sys-typescale-body-large-size: 16px;
  --md-sys-typescale-body-medium-size: 14px;
  --md-sys-typescale-label-large-size: 14px;
}

@font-face{
  font-family:"PJS";
  src:url("../fonts/pjs.ttf") format("truetype");
  font-weight:normal;
  font-style:normal;
  font-display:swap;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{
  display:flex;
  flex-direction:column;
  font-family:"PJS",Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  background:var(--md-sys-color-background);
  color:var(--md-sys-color-on-background);
  -webkit-font-smoothing:antialiased;
}
main{flex:1}

/* 页面容器 */
.page-container{
  max-width:1100px;
  margin:0 auto;
  padding:24px;
}

/* 顶部应用栏 - Material Design Top App Bar */
.top-app-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 24px;
  height:64px;
  min-height:64px;
  background:var(--md-sys-color-surface);
  box-shadow:var(--md-elevation-level1);
  position:sticky;
  top:0;
  z-index:100;
}
.top-app-bar .brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:inherit;
}
.top-app-bar .logo{
  width:40px;
  height:40px;
  border-radius:50%;
}
.top-app-bar .brand-text{
  display:flex;
  flex-direction:column;
  justify-content:center;
  line-height:1.2;
}
.top-app-bar .brand-text h1{
  margin:0;
  font-size:var(--md-sys-typescale-title-large-size);
  font-weight:500;
  color:var(--md-sys-color-on-surface);
  line-height:1.3;
}
.top-app-bar .brand-text p{
  margin:0;
  font-size:var(--md-sys-typescale-body-medium-size);
  color:var(--md-sys-color-on-surface-variant);
  line-height:1.3;
}

/* 导航 */
.nav-links{
  display:flex;
  gap:4px;
}
.nav-links a{
  text-decoration:none;
  color:var(--md-sys-color-on-surface-variant);
  padding:8px 16px;
  border-radius:100px;
  font-size:var(--md-sys-typescale-label-large-size);
  font-weight:500;
  transition:background 0.2s;
}
.nav-links a:hover{background:var(--md-sys-color-surface-variant)}
.nav-links a.active{
  background:var(--md-sys-color-primary-container);
  color:var(--md-sys-color-on-primary-container);
}

/* GitHub 按钮（替换导航切换按钮） */
.github-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  text-decoration:none;
  color:var(--md-sys-color-on-surface-variant);
  padding:8px 16px;
  border-radius:100px;
  font-size:var(--md-sys-typescale-label-large-size);
  font-weight:500;
  transition:background 0.2s;
  white-space:nowrap;
}
.github-btn:hover{background:var(--md-sys-color-surface-variant)}
.github-btn img{width:20px;height:20px}

/* Hero 区域 */
.hero-section{
  padding:64px 0 48px;
}
.hero-grid{
  display:grid;
  grid-template-columns:1fr 360px;
  gap:32px;
  align-items:start;
}
.hero-title{
  font-size:var(--md-sys-typescale-headline-large-size);
  font-weight:400;
  margin:0 0 16px;
  color:var(--md-sys-color-on-background);
}
.hero-subtitle{
  font-size:var(--md-sys-typescale-body-large-size);
  color:var(--md-sys-color-on-surface-variant);
  line-height:1.6;
  margin:0 0 24px;
}
.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.hero-card{
  background:var(--md-sys-color-surface);
  border-radius:16px;
  padding:24px;
  box-shadow:var(--md-elevation-level1);
  border:1px solid var(--md-sys-color-outline-variant);
}
.badge-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.badge-row img{height:32px;border-radius:8px}

/* 通用章节 */
.section{padding:48px 0}
.section-title{
  font-size:var(--md-sys-typescale-headline-medium-size);
  font-weight:400;
  margin:0 0 24px;
  color:var(--md-sys-color-on-background);
}
.section-subtitle{
  font-size:var(--md-sys-typescale-title-medium-size);
  font-weight:500;
  margin:24px 0 12px;
  color:var(--md-sys-color-on-surface);
}

/* 卡片网格 */
.card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:16px;
}
.material-card{
  background:var(--md-sys-color-surface);
  border-radius:12px;
  padding:20px;
  box-shadow:var(--md-elevation-level1);
  border:1px solid var(--md-sys-color-outline-variant);
  transition:box-shadow 0.2s;
}
.material-card:hover{box-shadow:var(--md-elevation-level2)}
.material-card h4{
  margin:0 0 8px;
  font-size:var(--md-sys-typescale-title-medium-size);
  font-weight:500;
}

/* 列表样式 */
.material-list{
  list-style:none;
  padding:0;
  margin:0;
}
.material-list li{
  padding:12px 16px;
  border-radius:8px;
  display:flex;
  align-items:center;
  gap:12px;
  font-size:var(--md-sys-typescale-body-medium-size);
  color:var(--md-sys-color-on-surface);
}
.material-list li:nth-child(odd){background:var(--md-sys-color-surface-variant)}
.material-list li::before{
  content:"•";
  color:var(--md-sys-color-primary);
  font-weight:bold;
  font-size:18px;
}

/* 代码块 */
.code-block{
  background:var(--md-sys-color-surface-container);
  border:1px solid var(--md-sys-color-outline-variant);
  border-radius:12px;
  padding:16px;
  overflow:auto;
  font-family:"JetBrains Mono","Fira Code","Consolas",monospace;
  font-size:var(--md-sys-typescale-body-medium-size);
  line-height:1.6;
  color:var(--md-sys-color-on-surface);
}

/* 底部 */
.site-footer{
  position:relative;
  z-index:10;
  background:var(--md-sys-color-surface);
  border-top:1px solid var(--md-sys-color-outline-variant);
  padding:12px 0;
  color:var(--md-sys-color-on-surface-variant);
  font-size:var(--md-sys-typescale-body-medium-size);
}
.site-footer a{
  color:var(--md-sys-color-primary);
  text-decoration:none;
}
.site-footer a:hover{text-decoration:underline}
.site-footer .container{
  max-width:1100px;
  margin:0 auto;
  padding:0 24px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}

/* 响应式 */
@media (max-width:880px){
  .hero-grid{grid-template-columns:1fr}
  .nav-links{
    display:none;
    position:absolute;
    top:64px;
    left:0;
    right:0;
    flex-direction:column;
    background:var(--md-sys-color-surface);
    padding:8px;
    box-shadow:var(--md-elevation-level3);
    border-bottom:1px solid var(--md-sys-color-outline-variant);
  }
  .nav-links.open{display:flex}
  .nav-links a{border-radius:8px;padding:12px 16px}
  .top-app-bar .brand-text p{display:none}
}
