/* 星河绫个人主页 · 薄荷清新风（与 PRTI 同色系） */
:root {
  --bg: #e6f7f6;
  --card: #ffffff;
  --accent: #2bb3a6;
  --accent-dark: #23978c;
  --text: #1f2d3d;
  --muted: #5b6b7a;
  --border: #d9eceb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft Yahei", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 导航 */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-weight: 700; font-size: 17px; color: var(--accent-dark); }
.nav-links { display: flex; gap: 18px; }
.nav-links a { color: var(--muted); font-size: 14px; }

/* 主体 */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* Hero */
.hero {
  padding: 48px 0 40px;
  text-align: center;
}
.hero-name {
  font-size: 34px;
  color: var(--accent-dark);
  margin-bottom: 10px;
}
.hero-desc { color: var(--text); font-size: 16px; }
.hero-note { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* 项目卡片轮播 */
.projects { margin: 28px 0 40px; }
.carousel { display: flex; align-items: center; gap: 14px; }
.carousel-viewport { flex: 1; overflow: hidden; border-radius: 16px; }
.projects-track { display: flex; transition: transform .5s ease; }

.carousel-arrow {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--accent-dark);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease;
}
.carousel-arrow:hover { background: #e6fffb; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #c5dcd9;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all .25s ease;
}
.carousel-dots .dot.active { width: 22px; background: var(--accent); }

.project-card {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  padding: 26px 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2bb3a6, #177a70);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(35, 151, 140, 0.2);
  transition: transform .2s ease, box-shadow .2s ease;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(35, 151, 140, 0.32);
  text-decoration: none;
}
.project-badge {
  display: inline-block;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 12px;
  border-radius: 999px;
  align-self: flex-start;
  margin-bottom: 12px;
}
.project-card h3 { font-size: 18px; color: #fff; margin: 0 0 6px; }
.project-card p { font-size: 13px; color: rgba(255, 255, 255, 0.9); line-height: 1.6; margin: 0 0 14px; flex-grow: 1; }
.project-personas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.project-personas span { font-size: 11px; background: rgba(255, 255, 255, 0.16); padding: 3px 9px; border-radius: 999px; }
.project-cta {
  align-self: flex-start;
  display: inline-block;
  text-align: center;
  background: #fff;
  color: #177a70;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px;
  white-space: nowrap;
}
.project-cta .arrow { margin-left: 4px; }

/* PRTI 特殊：统一上下布局，底部横排双按钮 */
.project-card-split {
  flex: 0 0 100%;
}
.project-card-split .project-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}
.project-card-split .project-info:hover { text-decoration: none; }
.project-card-split .project-info p { margin-bottom: 12px; }
.project-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-shrink: 0;
}
.project-cta-gh {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}
.project-cta-gh:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
}

/* 帖子列表 */
.section-title {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 700;
}
.posts { display: flex; flex-direction: column; gap: 14px; }

.post-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  transition: all .2s ease;
}
.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(35, 151, 140, 0.08);
}
.post-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.post-card-head h3 { font-size: 16px; color: var(--text); }
.post-card-head time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.post-card-excerpt {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 标签 */
.tags { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 12px;
  color: var(--accent-dark);
  background: #e6fffb;
  border-radius: 999px;
  padding: 2px 10px;
}

/* 帖子详情 */
.post { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 24px 22px; }
.post-header h1 { font-size: 24px; margin-bottom: 10px; }
.post-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.post-content { font-size: 15px; }
.post-content h2 { font-size: 19px; margin: 24px 0 10px; }
.post-content h3 { font-size: 16px; margin: 20px 0 8px; }
.post-content p { margin-bottom: 14px; }
.post-content ul, .post-content ol { margin: 0 0 14px 1.4em; }
.post-content blockquote { border-left: 3px solid var(--accent); background: #f0fffd; padding: 8px 14px; margin: 14px 0; border-radius: 0 8px 8px 0; color: var(--muted); }
.post-content code { background: #eef6f5; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.post-content pre { background: #1f2d3d; color: #d9eceb; padding: 14px; border-radius: 10px; overflow-x: auto; margin-bottom: 14px; }
.post-content pre code { background: none; padding: 0; color: inherit; }
.post-content img { max-width: 100%; border-radius: 8px; }
.post-source { margin-top: 18px; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 14px; }

/* 上一篇/下一篇/返回 */
.post-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; font-size: 13px; flex-wrap: wrap; }
.post-nav .back { color: var(--muted); }

/* 关于/404 页面 */
.page { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 24px 22px; }
.page h1 { font-size: 22px; margin-bottom: 14px; }
.page p { margin-bottom: 10px; }

/* 页脚 */
.site-footer {
  text-align: center;
  padding: 20px 16px 36px;
  color: var(--muted);
  font-size: 13px;
}
.footer-github {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}
.footer-github:hover {
  color: var(--accent);
  text-decoration: none;
}
.footer-github .octocat { transition: transform .2s ease; }
.footer-github:hover .octocat { transform: scale(1.15); }

/* 移动端适配 */
@media (max-width: 640px) {
  .hero-name { font-size: 28px; }
  .post { padding: 18px 16px; }

  /* 轮播：箭头缩小，不挤压内容 */
  .carousel { gap: 6px; }
  .carousel-arrow { width: 32px; height: 32px; font-size: 18px; }

  /* 卡片：缩小内边距；按钮均分占满 */
  .project-card { padding: 20px 18px; }
  .project-actions .project-cta {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
  }
}
