@charset "UTF-8";

/* ===== 基础设置：浅白底色 + 清新浅绿色主色调 ===== */
:root {
  --bg: #f7fbf5;
  --surface: #ffffff;
  --ink: #20372a;
  --muted: #65766b;
  --green: #67b98a;
  --green-dark: #2f7d54;
  --green-soft: #eaf6ee;
  --line: #dcebe2;
  --radius: 20px;
}

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

html {
  scroll-behavior: auto; /* 不使用滚动动画 */
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.container {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}

/* ===== 头部导航 ===== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid #cfe6d8;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 1.15rem;
  font-weight: 700;
}

.brand-text {
  min-width: 0;
}

.brand h1 {
  font-size: 1.2rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.brand p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.87rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
}

.nav a {
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.nav a:hover {
  border-bottom-color: var(--green);
  color: var(--green-dark);
}

/* ===== 页面主体与板块标题 ===== */
main {
  padding: 52px 0 10px;
}

.section {
  padding: 40px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.section h2 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.section-desc {
  max-width: 440px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ===== 关于我 ===== */
.about-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 30px;
}

.profile-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.avatar-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--green-soft);
}

/* 图片缺失时显示姓名首字母，图片存在时覆盖在首字母上方 */
.avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  font-size: 3.5rem;
  font-weight: 700;
}

.avatar-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.about-copy .lead {
  max-width: 680px;
  color: #40584a;
  font-size: 1.02rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.info-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.card-label {
  color: var(--green-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.info-card h3 {
  margin: 8px 0 6px;
  font-size: 1rem;
  line-height: 1.5;
}

.info-card p {
  color: var(--muted);
  font-size: 0.86rem;
}

/* ===== 我的作品 ===== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.work-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.work-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.work-number {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.work-type {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.work-card h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.5;
}

.work-card p {
  flex: 1;
  color: var(--muted);
  font-size: 0.87rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #eef5f0;
  list-style: none;
}

.tags li {
  color: #52705d;
  font-size: 0.74rem;
}

.tags li::before {
  content: "#";
  margin-right: 2px;
  color: var(--green);
}

/* ===== 联系我 ===== */
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 36px;
  padding: 34px;
  border: 1px solid #cfe7d8;
  border-radius: var(--radius);
  background: var(--green-soft);
}

.contact-card p {
  max-width: 520px;
  margin-top: 10px;
  color: #4d6556;
  font-size: 0.92rem;
}

.contact-action {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding-left: 32px;
  border-left: 1px solid #cfe7d8;
}

.contact-label {
  color: #5e7a68;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.email {
  border-bottom: 1px solid #9fceb1;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.email:hover {
  border-bottom-color: var(--green-dark);
  color: #1f5d3c;
}

.button {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--green-dark);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: #256743;
}

/* ===== 页脚 ===== */
.site-footer {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ===== 响应式：平板与手机 ===== */
@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr;
  }

  .profile-card {
    width: min(100%, 300px);
    margin: 0 auto;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .contact-action {
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid #cfe7d8;
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(1080px, calc(100% - 36px));
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 18px 0;
  }

  .nav {
    gap: 8px 18px;
  }

  main {
    padding-top: 30px;
  }

  .section {
    padding: 30px 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 24px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(1080px, calc(100% - 32px));
  }

  .brand-mark {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .brand h1 {
    font-size: 1.08rem;
  }

  .brand p {
    font-size: 0.8rem;
  }

  .profile-card {
    padding: 14px;
  }

  .contact-action {
    width: 100%;
  }
}
