/* ==========================================================
   个人作品集 · 天蓝白简约校园职场风
   样式结构：变量 → 基础 → 通用组件 → 导航 → Hero → 板块
            → 卡片/文件列表 → 证书 → 兴趣 → 页脚 → 动效 → 响应式
   ========================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --sky-50:  #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;

  --ink:     #0f2742;
  --ink-2:   #334155;
  --gray:    #64748b;
  --gray-2:  #94a3b8;
  --line:    #e2eef7;
  --bg:      #ffffff;
  --bg-soft: #f5fbff;
  --card:    #ffffff;

  --rose:    #e11d48;
  --blue:    #2563eb;
  --orange:  #ea580c;

  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 8px 30px rgba(14, 116, 144, .08);
  --shadow-hover: 0 16px 44px rgba(2, 132, 199, .16);
  --container: 1140px;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 78px; }

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { display: block; }

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

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }

.btn-primary {
  background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 165, 233, .32);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(14, 165, 233, .42); }

.btn-ghost {
  background: #fff;
  color: var(--sky-700);
  border: 1.5px solid var(--sky-200);
}
.btn-ghost:hover { background: var(--sky-50); transform: translateY(-3px); }

.btn-sm { padding: 10px 20px; font-size: 14px; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease;
}
.nav.scrolled {
  border-color: var(--line);
  box-shadow: 0 4px 20px rgba(2, 132, 199, .08);
}
.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 700;
  color: var(--sky-700);
}
.logo svg { width: 26px; height: 26px; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 14px;
  font-size: 14.5px;
  color: var(--ink-2);
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--sky-600); background: var(--sky-50); }
.nav-links a.active { color: var(--sky-700); background: var(--sky-100); font-weight: 600; }
.nav-links .nav-cta {
  background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
  color: #fff;
  margin-left: 6px;
}
.nav-links .nav-cta:hover { color: #fff; background: linear-gradient(135deg, var(--sky-500), var(--sky-700)); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--sky-700);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 168px 0 110px;
  background:
    radial-gradient(1100px 480px at 85% -10%, var(--sky-100) 0%, rgba(224, 242, 254, 0) 60%),
    radial-gradient(900px 420px at 0% 100%, var(--sky-50) 0%, rgba(240, 249, 255, 0) 55%),
    #fff;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: .55;
  z-index: 0;
}
.blob-a {
  width: 340px; height: 340px;
  right: -90px; top: 120px;
  background: radial-gradient(circle at 30% 30%, var(--sky-300), var(--sky-100) 70%);
}
.blob-b {
  width: 220px; height: 220px;
  left: -60px; bottom: 40px;
  background: radial-gradient(circle at 60% 40%, var(--sky-200), var(--sky-50) 70%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--sky-200);
  color: var(--sky-700);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.hero-badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sky-500);
  box-shadow: 0 0 0 4px var(--sky-100);
}

.hero h1 {
  margin: 26px auto 20px;
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 1px;
}
.hero h1 .hl {
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 640px;
  margin: 0 auto;
  color: var(--gray);
  font-size: 16.5px;
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  margin: 64px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 760px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-stats div {
  padding: 24px 12px;
  text-align: center;
  position: relative;
}
.hero-stats div + div::before {
  content: "";
  position: absolute;
  left: 0; top: 25%;
  height: 50%;
  width: 1px;
  background: var(--line);
}
.hero-stats dt {
  font-size: 30px;
  font-weight: 800;
  color: var(--sky-600);
  line-height: 1.2;
}
.hero-stats dd { color: var(--gray); font-size: 13.5px; margin-top: 4px; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--sky-200);
  color: var(--sky-600);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  animation: bob 2s ease-in-out infinite;
  z-index: 1;
}
.scroll-hint svg { width: 19px; height: 19px; }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- 板块通用 ---------- */
.section { padding: 92px 0; }
.section-tint {
  background:
    linear-gradient(180deg, var(--bg-soft), #fff 60%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.sec-head { margin-bottom: 48px; }
.sec-index {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--sky-500);
  letter-spacing: 3px;
  margin-bottom: 10px;
}
.sec-title {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 800;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.sec-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 46px; height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--sky-400), var(--sky-600));
}
.sec-sub { margin-top: 14px; color: var(--gray); font-size: 15.5px; }

/* ---------- 卡片通用 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
.card-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }

.work-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.work-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--sky-200);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.card-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--sky-600);
  background: linear-gradient(135deg, var(--sky-50), var(--sky-100));
  border: 1px solid var(--sky-200);
  flex-shrink: 0;
}
.card-icon svg { width: 24px; height: 24px; }

.card-tag {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sky-700);
  background: var(--sky-50);
  border: 1px solid var(--sky-200);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.card-tag.light { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .45); color: #fff; }

.work-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.card-desc { color: var(--gray); font-size: 14.5px; margin-bottom: 18px; }

/* ---------- 文件列表 ---------- */
.file-list {
  margin-top: auto;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--bg-soft);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.file-row:hover {
  background: var(--sky-50);
  border-color: var(--sky-200);
  transform: translateX(4px);
}
.file-badge {
  flex-shrink: 0;
  width: 42px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 4px 0;
  border-radius: 6px;
  color: #fff;
}
.file-badge.pdf  { background: var(--rose); }
.file-badge.docx { background: var(--blue); }
.file-badge.pptx { background: var(--orange); }
.file-badge.img  { background: #0d9488; }

/* 无附件的经历记录条 */
.record-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  font-size: 13px;
  color: var(--gray);
}
.record-note svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--sky-500); }

.file-name {
  flex: 1;
  font-size: 14px;
  color: var(--ink-2);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-act {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sky-600);
}
.file-act svg { width: 14px; height: 14px; }

/* ---------- 关于我 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 26px;
}
.about-main { display: flex; flex-direction: column; gap: 26px; }
.about-card,
.about-skills { padding: 28px 32px; }
.about-skills { flex: 1; }

/* 工作生活照卡片 */
.about-photo {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform .5s ease;
}
.about-photo:hover img { transform: scale(1.03); }
.about-photo figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 36px 20px 14px;
  font-size: 13px;
  letter-spacing: 3px;
  color: #fff;
  background: linear-gradient(180deg, rgba(3, 105, 161, 0), rgba(3, 105, 161, .72));
}

.info-line {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-2);
  margin-bottom: 9px;
}
.info-line b {
  flex-shrink: 0;
  width: 92px;
  color: var(--sky-700);
  font-weight: 600;
}
.about-desc { margin: 20px 0 0; color: var(--gray); font-size: 14.5px; }

.about-skills h3 { font-size: 17px; margin-bottom: 16px; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-list li {
  padding: 7px 16px;
  font-size: 13.5px;
  color: var(--sky-700);
  background: var(--sky-50);
  border: 1px solid var(--sky-200);
  border-radius: 999px;
  transition: background .2s ease, transform .2s ease;
}
.tag-list li:hover { background: var(--sky-100); transform: translateY(-2px); }

/* ---------- 证书卡片 ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.cert-card {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.cert-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--sky-200);
}
.cert-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
  box-shadow: 0 8px 18px rgba(14, 165, 233, .3);
  margin-bottom: 8px;
}
.cert-icon svg { width: 26px; height: 26px; }
.cert-name { font-size: 16px; font-weight: 700; }
.cert-meta { font-size: 13px; color: var(--gray); }
.cert-link {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sky-600);
}
.cert-link svg { width: 14px; height: 14px; transition: transform .2s ease; }
.cert-card:hover .cert-link svg { transform: translate(2px, -2px); }

/* ---------- 兴趣实践 ---------- */
.interest-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: linear-gradient(120deg, var(--sky-600), var(--sky-400));
  border: none;
  color: #fff;
}
.interest-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.interest-visual {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 55%),
    rgba(255, 255, 255, .08);
}
.interest-visual svg { width: 120px; height: 120px; color: rgba(255, 255, 255, .9); }
.interest-body { padding: 36px 36px 36px 8px; }
.interest-body h3 { font-size: 22px; margin: 14px 0 10px; }
.interest-body .card-desc { color: rgba(255, 255, 255, .88); }
.interest-body .btn-primary {
  background: #fff;
  color: var(--sky-700);
  box-shadow: 0 8px 20px rgba(3, 105, 161, .3);
}
.interest-body .btn-primary:hover { background: var(--sky-50); }

/* ---------- 页脚 ---------- */
.footer {
  background: linear-gradient(180deg, var(--sky-700), #06385c);
  color: #dbeafe;
  margin-top: 20px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 64px 0 48px;
}
.logo-light { color: #fff; font-size: 19px; margin-bottom: 14px; }
.footer-brand p { color: rgba(219, 234, 254, .75); font-size: 14px; }

.footer h4 {
  color: #fff;
  font-size: 15.5px;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  margin-bottom: 12px;
  color: rgba(219, 234, 254, .85);
}
.contact-item svg { width: 18px; height: 18px; color: var(--sky-300); flex-shrink: 0; }
a.contact-item { transition: color .2s ease, transform .2s ease; }
a.contact-item:hover { color: #fff; transform: translateX(4px); }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a {
  font-size: 14px;
  color: rgba(219, 234, 254, .85);
  width: fit-content;
  transition: color .2s ease, transform .2s ease;
}
.footer-nav a:hover { color: #fff; transform: translateX(4px); }

.footer-bottom {
  border-top: 1px solid rgba(186, 230, 253, .18);
  padding: 18px 0;
  font-size: 13px;
  color: rgba(219, 234, 254, .6);
  text-align: center;
}

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
  box-shadow: 0 10px 24px rgba(2, 132, 199, .35);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
  z-index: 90;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { transform: translateY(-3px); }
.back-top svg { width: 20px; height: 20px; }

/* ---------- 滚动入场动画（仅 JS 可用时隐藏初始态，无 JS 时内容直接可见） ---------- */
.reveal { transition: opacity .7s ease, transform .7s ease; }
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
}
.js .reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; }
}

/* ---------- 响应式：平板 ---------- */
@media (max-width: 960px) {
  .card-grid,
  .card-grid.grid-3 { grid-template-columns: 1fr 1fr; }
  .cert-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { aspect-ratio: 16 / 10; }
  .interest-card { grid-template-columns: 1fr; }
  .interest-visual { padding: 40px 0 10px; }
  .interest-visual svg { width: 90px; height: 90px; }
  .interest-body { padding: 20px 32px 34px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- 响应式：手机 ---------- */
@media (max-width: 720px) {
  .container { width: calc(100% - 32px); }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px 18px;
    box-shadow: 0 16px 30px rgba(2, 132, 199, .12);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform .28s ease, opacity .28s ease, visibility .28s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links a { padding: 12px 16px; border-radius: 10px; font-size: 15px; }
  .nav-links .nav-cta { margin-left: 0; text-align: center; justify-content: center; }

  .hero { padding: 130px 0 90px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats div:nth-child(3)::before { content: none; }
  .hero-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .section { padding: 68px 0; }
  .sec-head { margin-bottom: 34px; }

  .card-grid,
  .card-grid.grid-3,
  .cert-grid { grid-template-columns: 1fr; }

  .work-card,
  .about-card,
  .about-skills { padding: 22px; }

  .footer-inner { grid-template-columns: 1fr; gap: 30px; padding: 48px 0 36px; }
  .footer-brand { grid-column: auto; }
}
