/* ============================================================
   清新风格 · 个人作品集
   ============================================================ */
:root {
  --ink: #23272f;
  --muted: #667085;
  --navy: #2f3e5f;
  --navy-dark: #26344f;
  --accent: #3f8f7a;
  --accent-soft: #e7f4ef;
  --sky-soft: #e8f1fb;
  --bg: #fdfdfc;
  --card: #ffffff;
  --line: #e8e8e4;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(35, 39, 47, .08);
  --shadow-lg: 0 18px 45px rgba(35, 39, 47, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.section { padding: 72px 0; }
.section-alt { background: #f7faf8; }

.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 {
  font-size: 34px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 10px;
}
.section-head .bar {
  width: 54px; height: 5px; border-radius: 3px; margin: 0 auto 14px;
  background: linear-gradient(90deg, var(--accent), #7fc4ae);
}
.section-head p { color: var(--muted); margin: 0; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 64px; gap: 16px;
}
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted);
  padding: 4px 0; border-bottom: 2px solid transparent; transition: .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); border-bottom-color: var(--ink); }
.nav-title {
  font-weight: 800; font-size: 17px; text-decoration: none; text-align: center;
  letter-spacing: -.3px; white-space: nowrap;
}
.nav-social { display: flex; gap: 10px; justify-content: flex-end; }
.nav-social a { text-decoration: none; }
.soc {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-size: 13px; font-weight: 700;
  transition: .2s;
}
.nav-social a:hover .soc { background: var(--accent); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; padding: 80px 24px 40px; }
.hero-photo img {
  width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover;
  border-radius: 32px; box-shadow: var(--shadow-lg);
}
.hero-text h1 { font-size: 44px; font-weight: 800; letter-spacing: -1px; margin-bottom: 18px; }
.hero-text p { color: var(--muted); font-size: 16.5px; max-width: 46ch; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  background: var(--navy); color: #fff; border: none;
  font-weight: 700; font-size: 14px; letter-spacing: .8px;
  padding: 12px 34px; border-radius: 12px; transition: .2s;
}
.btn:hover { background: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- Who am I 卡片 ---------- */
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.iam-card {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  text-align: center; cursor: pointer; border: 1px solid var(--line);
  text-decoration: none; color: inherit; display: block;
  transition: .22s; box-shadow: var(--shadow);
}
.iam-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.iam-card img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 16px; margin-bottom: 14px;
}
.iam-card h3 { font-size: 17px; margin: 0; }
.iam-card .tap { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- 时间线 Who I want to be ---------- */
.timeline { position: relative; max-width: 860px; margin: 0 auto; }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 3px; transform: translateX(-50%);
  background: linear-gradient(var(--accent), #9fd8c6); border-radius: 2px;
}
.t-item { position: relative; width: 50%; padding: 0 40px 44px 0; }
.t-item:nth-child(even) { left: 50%; padding: 0 0 44px 40px; }
.t-dot {
  position: absolute; top: 26px; right: -8px; width: 16px; height: 16px;
  background: #fff; border: 4px solid var(--accent); border-radius: 50%; z-index: 1;
}
.t-item:nth-child(even) .t-dot { right: auto; left: -8px; }
.t-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  text-decoration: none; display: block; transition: .22s;
}
.t-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.t-card img { width: 100%; height: 170px; object-fit: cover; }
.t-card-body { padding: 20px 22px; }
.t-card-body h3 { font-size: 19px; margin-bottom: 8px; }
.t-card-body p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Who I want to be（图文左右交错列表） ---------- */
.wib-list { display: flex; flex-direction: column; gap: 30px; max-width: 900px; margin: 0 auto; }
.wib-row {
  display: grid; grid-template-columns: 320px 1fr; gap: 30px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.wib-row:nth-child(even) { grid-template-columns: 1fr 320px; }
.wib-row:nth-child(even) .wib-img { order: 2; }
.wib-img img { width: 100%; height: 200px; object-fit: cover; border-radius: 16px; }
.wib-txt h3 { font-size: 20px; margin-bottom: 8px; }
.wib-txt p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- Who I want to be / Hobby 可点击卡片 ---------- */
a.wib-row { text-decoration: none; color: inherit; transition: .22s; }
a.wib-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
a.hobby-card { text-decoration: none; color: inherit; display: block; }
.wib-row .tap, .hobby-card .tap {
  font-size: 12.5px; color: var(--accent); font-weight: 700; display: inline-block; margin-top: 10px;
}
.hobby-card .tap { margin-top: 8px; }

/* ---------- 梦想身份详情页（wish.html） ---------- */
.wish-img { margin: 24px 0; }
.wish-img img {
  width: 100%; max-width: 640px; display: block; margin: 0 auto;
  border-radius: 16px; box-shadow: var(--shadow);
}
.link-tile {
  display: grid; grid-template-columns: 210px 1fr; gap: 18px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 24px 0; box-shadow: var(--shadow);
  text-decoration: none; color: inherit; transition: .2s;
}
.link-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.link-tile img { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; }
.link-tile-body h4 { margin: 6px 0; font-size: 17px; }
.link-tile-body .more { color: var(--accent); font-weight: 700; font-size: 13.5px; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.wcard, .hcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: .22s; display: block;
}
.wcard:hover, .hcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.wcard-img img, .hcard-img img { width: 100%; height: 160px; object-fit: cover; }
.wcard-body, .hcard-body { padding: 16px 18px; }
.wcard-body h3, .hcard-body h3 { font-size: 16.5px; margin-bottom: 6px; }
.wcard-body p, .hcard-body p { margin: 0 0 8px; color: var(--muted); font-size: 13.5px; }
.wcard .more, .hcard .more { color: var(--accent); font-weight: 700; font-size: 13px; }

/* ---------- 兴趣详情页（hobby.html） ---------- */
.video-item { margin: 28px 0; }
.video-caption { color: var(--muted); font-size: 14px; margin: 8px 0 0; text-align: center; }

/* ---------- Activities Gallery（gallery.html） ---------- */
.banner-sub {
  position: relative; z-index: 1; color: #fff; opacity: .92; font-size: 16px;
  margin: 12px 0 0; text-align: center; text-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}
.g-wrap { padding: 50px 24px 30px; display: flex; flex-direction: column; gap: 52px; }
.g-head { margin-bottom: 16px; }
.g-name { font-size: 22px; font-weight: 800; color: var(--ink); text-decoration: none; }
.g-name:hover { color: var(--accent); }
.g-date { font-size: 13.5px; color: var(--muted); font-weight: 600; margin-left: 8px; }
.g-arrow { color: var(--accent); font-weight: 800; }

/* ---------- Hobby ---------- */
.hobby-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.hobby-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); transition: .22s;
}
.hobby-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.hobby-card img { width: 100%; height: 180px; object-fit: cover; }
.hobby-card-body { padding: 18px 20px; }
.hobby-card-body h3 { font-size: 17px; margin-bottom: 6px; }
.hobby-card-body p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- 项目卡片 ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px; }
.pcard {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: .22s; display: flex; flex-direction: column;
}
.pcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pcard-img img { width: 100%; height: 195px; object-fit: cover; }
.pcard-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.pcard-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.chip {
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.date { font-size: 12.5px; color: var(--muted); }
.pcard h3 { font-size: 19px; margin-bottom: 8px; }
.pcard p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; flex: 1; }
.more { color: var(--accent); font-weight: 700; font-size: 14px; }
.pcard:hover .more { text-decoration: underline; }

/* 筛选 pills */
.pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 40px; }
.pill {
  border: none; cursor: pointer; font-family: inherit;
  background: #e9ecea; color: var(--ink); font-weight: 700; font-size: 13px;
  padding: 8px 18px; border-radius: 999px; transition: .2s;
}
.pill:hover { background: #d8e2dd; }
.pill.active { background: var(--navy); color: #fff; }

/* ---------- Projects banner ---------- */
.banner {
  position: relative; height: 340px; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
}
.banner::after { content: ""; position: absolute; inset: 0; background: rgba(20, 28, 42, .45); }
.banner h1 {
  position: relative; z-index: 1; color: #fff; font-size: 56px; font-weight: 800;
  letter-spacing: -1px; text-shadow: 0 4px 18px rgba(0, 0, 0, .35); margin: 0;
}

/* ---------- 项目详情页 ---------- */
.pd-banner {
  position: relative; height: 360px; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
}
.pd-banner::after { content: ""; position: absolute; inset: 0; background: rgba(20, 28, 42, .45); }
.pd-banner .pd-head { position: relative; z-index: 1; text-align: center; color: #fff; }
.pd-banner h1 { font-size: 46px; font-weight: 800; margin-bottom: 8px; text-shadow: 0 4px 18px rgba(0,0,0,.35); }
.pd-banner .pd-date { font-size: 15px; opacity: .9; }
.pd-content { max-width: 860px; margin: 0 auto; padding: 56px 24px 20px; }
.pd-content h2 { font-size: 26px; margin: 40px 0 18px; }
.pd-content h2::after {
  content: ""; display: block; width: 44px; height: 4px; margin-top: 8px;
  border-radius: 2px; background: var(--accent);
}
.pd-summary { color: var(--muted); font-size: 16.5px; white-space: pre-line; }

.pd-split {
  display: grid; grid-template-columns: 1fr 1.9fr; gap: 30px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.pd-split img {
  width: 100%; border-radius: 16px; object-fit: cover;
  aspect-ratio: 4 / 3; box-shadow: var(--shadow);
}

.video-box { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16/9; }
.video-box iframe, .video-box video { width: 100%; height: 100%; border: 0; display: block; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; align-items: start; }
.gallery img {
  width: 100%; height: auto; object-fit: contain; border-radius: 16px;
  box-shadow: var(--shadow); transition: .2s; display: block;
}
.gallery img:hover { transform: scale(1.02); }

.skills { display: flex; flex-wrap: wrap; gap: 10px; }
.skill {
  background: var(--sky-soft); color: var(--navy); font-weight: 700; font-size: 13.5px;
  padding: 8px 18px; border-radius: 999px;
}
.pd-back { display: inline-block; margin: 34px 0 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
.pd-back:hover { color: var(--accent); }

/* ---------- Resume 页 ---------- */
.resume-title { text-align: center; padding: 72px 0 8px; }
.resume-title h1 { font-size: 56px; font-weight: 800; letter-spacing: -1.5px; }
.resume-intro { max-width: 760px; margin: 0 auto; text-align: center; color: var(--muted); padding: 0 24px 40px; }
.resume-layout {
  display: grid; grid-template-columns: 1.7fr 1fr; gap: 36px; align-items: start;
  max-width: 1080px; margin: 0 auto; padding: 0 24px 80px;
}
.resume-doc {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 44px 46px;
  font-family: Georgia, "Times New Roman", serif; color: #1a1a1a;
}
.resume-doc .r-name { font-size: 30px; margin: 0 0 4px; }
.resume-doc .r-contact { font-size: 12px; color: #333; margin-bottom: 18px; word-break: break-all; }
.resume-doc .r-contact a { color: #1a4fb0; }
.resume-doc h3 {
  font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 2px solid #1a1a1a; padding-bottom: 4px; margin: 26px 0 14px;
}
.r-entry { margin-bottom: 16px; }
.r-entry-top { display: flex; justify-content: space-between; gap: 12px; }
.r-entry-top .r-left { font-weight: 700; font-size: 14.5px; }
.r-entry-top .r-date { font-size: 13px; white-space: nowrap; }
.r-entry .r-sub { font-style: italic; font-size: 13.5px; margin: 2px 0 6px; }
.r-entry ul { margin: 4px 0 0; padding-left: 20px; font-size: 13.5px; }
.r-entry li { margin-bottom: 4px; }
.r-entry .r-line {
  position: relative; margin: 0 0 4px; padding-left: 20px; font-size: 13.5px;
}
.r-entry .r-line::before { content: "•"; position: absolute; left: 6px; }
.r-skills { font-size: 13.5px; }
.resume-photos { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 88px; }
.resume-photos img {
  width: 100%; border-radius: 18px; object-fit: cover; box-shadow: var(--shadow-lg);
}
.resume-photos img:first-child { height: 320px; }
.resume-photos img:nth-child(2) { height: 240px; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(20, 24, 32, .55); align-items: center; justify-content: center; padding: 24px;
}
.modal.open { display: flex; }
.modal-card {
  position: relative; background: #fff; border-radius: 24px; max-width: 560px; width: 100%;
  padding: 28px; box-shadow: var(--shadow-lg); max-height: 86vh; overflow: auto;
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-card img { width: 100%; height: 260px; object-fit: cover; border-radius: 16px; margin-bottom: 16px; }
.modal-card h3 { font-size: 22px; }
.modal-card p { color: var(--muted); }
.modal-close {
  position: absolute; top: 14px; right: 14px; border: none; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%; background: #f0f2f0; font-size: 15px;
}
.modal-close:hover { background: var(--accent); color: #fff; }

/* ---------- 页脚 ---------- */
.footer { background: var(--navy-dark); color: #cfd8e6; margin-top: 60px; }
.footer-inner { padding: 40px 24px; text-align: center; }
.footer-name { font-weight: 800; font-size: 18px; color: #fff; margin-bottom: 8px; }
.footer-contacts { font-size: 14px; }
.footer-contacts a { color: #9fd8c6; text-decoration: none; }
.footer-config { margin-top: 14px; font-size: 13px; }
.footer-config a { color: #7d8ba5; text-decoration: none; }
.footer-config a:hover { color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-text h1 { font-size: 34px; }
  .timeline::before { left: 10px; }
  .t-item, .t-item:nth-child(even) { width: 100%; left: 0; padding: 0 0 36px 36px; }
  .t-dot, .t-item:nth-child(even) .t-dot { left: 2px; right: auto; }
  .wib-row, .wib-row:nth-child(even) { grid-template-columns: 1fr; }
  .wib-row:nth-child(even) .wib-img { order: 0; }
  .pd-split { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
  .gallery img { height: auto; }
  .resume-layout { grid-template-columns: 1fr; }
  .resume-photos { position: static; flex-direction: row; }
  .resume-photos img { height: 160px !important; }
  .banner h1, .pd-banner h1 { font-size: 36px; }
  .nav-inner { grid-template-columns: auto 1fr; }
  .nav-social { display: none; }
}
