/* ============================================================
 * 张小邪的炉石花园
 * 暖纸底 + 炉石琥珀金 + 一点粉，标题用宋体，正文用黑体
 * ============================================================ */

:root {
  --paper:      #fbf7f0;
  --paper-2:    #ffffff;
  --ink:        #35291d;
  --ink-2:      #6f6152;
  --ink-3:      #9c8d7c;
  --amber:      #c07a2b;
  --amber-2:    #e0a94f;
  --amber-soft: #f2e2c6;
  --pink:       #f0a6c0;
  --line:       #ebe0cf;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

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

html { scroll-behavior: smooth; }

/* 锚点跳转时给吸顶栏留出空间 */
#top, #projects, #about { scroll-margin-top: 78px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}

/* 背景：两团极淡的暖光，像窗边的花园 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(680px 420px at 8% -4%, rgba(240, 166, 192, .16), transparent 70%),
    radial-gradient(760px 460px at 100% 6%, rgba(224, 169, 79, .15), transparent 72%);
  pointer-events: none;
}

/* ---------------- 顶栏 ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 247, 240, .86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .04em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 21px;
  height: 21px;
  flex: none;
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav { display: flex; gap: 4px; }

.nav a {
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 13px;
  border-radius: 999px;
  transition: background .2s, color .2s;
}

.nav a:hover { background: rgba(192, 122, 43, .1); color: var(--amber); }

/* ---------------- 主体骨架 ---------------- */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 28px 0;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  align-items: start;
}

/* ---------------- 左栏 · 个人信息 ---------------- */

.sidebar {
  position: sticky;
  top: 84px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px 24px 24px;
  box-shadow: 0 1px 2px rgba(53, 41, 29, .05);
  text-align: center;
}

.avatar-ring {
  width: 128px;
  height: 128px;
  margin: 0 auto 18px;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-2), var(--pink) 85%);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--paper-2);
}

.name {
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.3;
}

.role {
  margin-top: 5px;
  font-size: 12px;
  letter-spacing: .32em;
  text-indent: .32em;
  color: var(--amber);
}

.signature {
  margin-top: 18px;
  display: inline-block;
  font-size: 13px;
  line-height: 1.6;
  color: #b3567f;
  background: #fdf1f5;
  border: 1px solid #f7dde7;
  border-radius: 999px;
  padding: 7px 17px;
}

.bio {
  margin-top: 22px;
  text-align: left;
  font-size: 13.5px;
  line-height: 2.05;
  color: var(--ink-2);
  border-left: 3px solid var(--amber-soft);
  padding: 2px 0 2px 15px;
}

.contacts {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 11px;
  background: #faf5ec;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  transition: background .2s, transform .2s;
}

.contact-link:hover { background: #f6ecdb; transform: translateX(3px); }

.icon { width: 18px; height: 18px; flex: none; fill: var(--amber); color: var(--amber); }

.contact-label { color: var(--ink-3); font-size: 12.5px; }

.contact-value {
  margin-left: auto;
  font-weight: 600;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

.contact-link .contact-value { color: var(--amber); }

/* ---------------- 右栏 · 项目卡片 ---------------- */

.section-head { margin-bottom: 20px; }

.section-head h2 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-head h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--amber-soft), transparent);
}

.section-head p { margin-top: 5px; font-size: 13px; color: var(--ink-3); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(53, 41, 29, .04);
  transition: transform .26s ease, box-shadow .26s ease, border-color .26s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #e5d4ba;
  box-shadow: 0 16px 32px -14px rgba(53, 41, 29, .28);
}

.thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f4ede1;
  border-bottom: 1px solid var(--line);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
  display: block;
  transition: transform .55s ease;
}

.card:hover .thumb img { transform: scale(1.045); }

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 17px 19px 18px;
  gap: 9px;
}

.card-body h3 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: .02em;
}

.desc {
  flex: 1;
  font-size: 13.3px;
  line-height: 1.92;
  color: var(--ink-2);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.tag {
  font-size: 11.5px;
  line-height: 1.5;
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: .02em;
}

.tag-archive { background: #fdf3e3; color: #a8712a; }
.tag-static  { background: #eef5ec; color: #4c7a46; }
.tag-tool    { background: #fdeef4; color: #b3567f; }
.tag-script  { background: #eef2fb; color: #5566a4; }
.tag-preview { background: #f2ecfb; color: #6b4a9e; }
.tag-hots    { background: #e9f2fb; color: #38699c; }
.tag-gone    { background: #f1efec; color: #8a8378; }

.more {
  font-size: 12.5px;
  color: var(--amber);
  white-space: nowrap;
  font-weight: 500;
}

.arrow { display: inline-block; transition: transform .26s ease; }

.card:hover .arrow { transform: translateX(4px); }

/* ---------------- 友情链接 ---------------- */

.friends { margin-bottom: 30px; }

.friends-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: .26em;
  text-indent: .26em;
  color: var(--ink-3);
}

.friends-title::before,
.friends-title::after {
  content: "";
  width: 42px;
  height: 1px;
  background: var(--line);
}

.friend-list {
  list-style: none;
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.friend-list a {
  display: inline-block;
  padding: 7px 17px;
  border-radius: 999px;
  background: #faf5ec;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}

.friend-list a:hover {
  background: #f6ecdb;
  border-color: #e5d4ba;
  color: var(--amber);
  transform: translateY(-2px);
}

.friend-list .by { margin-left: 6px; font-size: 12.5px; color: var(--ink-3); }

.friend-list a:hover .by { color: var(--amber); opacity: .8; }

/* ---------------- 页脚 ---------------- */

.footer {
  max-width: 1180px;
  margin: 64px auto 0;
  padding: 30px 28px 54px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-note {
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ink-2);
  max-width: 620px;
  margin: 0 auto;
}

.footer-copy {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 2;
  color: var(--ink-3);
}

.footer-copy span { font-size: 12px; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 20px 0;
  }
  .sidebar { position: static; }
  .cards { grid-template-columns: 1fr; }
  .topbar-inner { padding: 12px 20px; }
  .brand span { font-size: 15.5px; }
  .footer { padding: 26px 20px 44px; }
}

@media (max-width: 420px) {
  .nav a { padding: 6px 9px; font-size: 13px; }
  .brand-mark { display: none; }
}
