/* 扣子个人作品展示平台 - 主样式
   遵循 DESIGN.md：白纸底色 + 近黑文字 + 克制的品牌青绿点缀 */

:root {
  --bg: #ffffff;
  --title: #111827;
  --body: #4b5563;
  --border: #e5e7eb;
  --brand: #18bdd8;
  --brand-soft: rgba(24, 189, 216, 0.1);
  --bg-soft: #f9fafb;
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.06), 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-hover: 0 12px 28px rgba(17, 24, 39, 0.12), 0 4px 10px rgba(17, 24, 39, 0.06);
  --radius: 12px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--body);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue",
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--title);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--brand);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--body);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--brand);
}

/* ---------- Hero 个人简介 ---------- */
.hero {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
}

.avatar {
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand);
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--body);
  margin-bottom: 20px;
  max-width: 640px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--body);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

/* ---------- 区块 ---------- */
.section {
  padding: 64px 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--title);
  margin-bottom: 28px;
  position: relative;
  padding-left: 14px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: var(--brand);
}

/* ---------- 作品网格 ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.work-cover {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.work-body {
  padding: 18px 20px 22px;
}

.work-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--title);
  margin-bottom: 8px;
}

.work-desc {
  font-size: 0.9rem;
  color: var(--body);
  margin-bottom: 14px;
}

.work-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
}

/* ---------- 技能与联系 ---------- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.info-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  background: var(--bg-soft);
}

.info-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--title);
  margin-bottom: 14px;
}

.skill-list,
.contact-list {
  list-style: none;
}

.skill-list li {
  position: relative;
  padding: 6px 0 6px 20px;
}

.skill-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.contact-list li {
  padding: 6px 0;
}

.contact-list a {
  color: var(--brand);
  font-weight: 600;
}

.contact-list a:hover {
  text-decoration: underline;
}

.contact-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

/* ---------- 页脚（备案） ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.copyright,
.beian {
  font-size: 0.9rem;
  color: var(--body);
}

.beian a {
  color: var(--body);
  transition: color var(--transition);
}

.beian a:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  .works-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 48px 0;
  }
  .hero-tags {
    justify-content: center;
  }
  .works-grid {
    grid-template-columns: 1fr;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    gap: 16px;
  }
  .nav-links a:nth-child(n + 3) {
    display: none;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}