/* ============================================================
   吴洪伟个人作品库 · 样式
   主题：绿色商务 × 新能源田野
   ============================================================ */

:root {
  --green-950: #0b2a1c;
  --green-900: #0f3524;
  --green-800: #14442e;
  --green-700: #1b5c3c;
  --green-600: #227445;
  --green-500: #2f8f52;
  --green-400: #4ca86a;
  --sage-300: #8fbf9e;
  --sage-200: #bcd6c4;
  --sage-100: #ddeadd;
  --cream: #f6f3ea;
  --cream-2: #efe9db;
  --gold: #c9a24b;
  --gold-light: #e0c27d;
  --ink: #18261d;
  --ink-soft: #46594e;
  --line: rgba(24, 38, 29, 0.1);

  --font-serif: "Songti SC", "STSong", "STZhongsong", "SimSun", "Noto Serif SC", "Source Han Serif SC", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(11, 42, 28, 0.12);
  --shadow-lg: 0 24px 70px rgba(11, 42, 28, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============ 导航 ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), padding 0.35s var(--ease);
  padding: 16px 0;
}
.nav.is-solid {
  background: rgba(246, 243, 234, 0.92);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 8px 30px rgba(11, 42, 28, 0.06);
  padding: 10px 0;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--green-400), var(--green-800));
  position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 13px; height: 19px; transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 50% 50% 50% 0;
  background: var(--gold-light);
}
.brand-name {
  font-family: var(--font-serif); font-size: 19px; font-weight: 700;
  letter-spacing: 1px; color: var(--green-900); line-height: 1.1;
}
.brand-sub { display: block; font-size: 11px; letter-spacing: 3px; color: var(--green-600); font-family: var(--font-sans); font-weight: 500; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  font-size: 14.5px; color: var(--ink-soft); position: relative; padding: 4px 0;
  transition: color 0.25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--gold); border-radius: 2px; transition: width 0.3s var(--ease);
}
.nav-links a:hover { color: var(--green-700); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  font-size: 14px; padding: 9px 20px; border-radius: 999px;
  background: var(--green-800); color: #fff; white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.nav-cta:hover { background: var(--green-600); transform: translateY(-1px); }
.nav-burger { display: none; background: none; border: none; width: 34px; height: 34px; position: relative; }
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--green-900); margin: 5px auto; border-radius: 2px; transition: 0.3s; }

/* ============ Hero ============ */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background:
    radial-gradient(1200px 600px at 78% -10%, rgba(47, 143, 82, 0.18), transparent 60%),
    linear-gradient(180deg, var(--green-950) 0%, var(--green-900) 42%, var(--green-800) 100%);
  color: #f2f6ef; overflow: hidden; padding: 120px 0 90px;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-sun { position: absolute; top: 60px; right: 8%; width: 200px; height: 200px; animation: float 9s ease-in-out infinite; }
.hero-hills { position: absolute; bottom: 0; left: 0; width: 100%; height: 46%; }
.hero-leaf { position: absolute; opacity: 0.8; animation: float 8s ease-in-out infinite; }
.leaf-a { left: 6%; top: 26%; width: 54px; }
.leaf-b { right: 14%; bottom: 24%; width: 42px; animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

.hero-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; letter-spacing: 1px; color: var(--sage-200);
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 16px; border-radius: 999px; margin-bottom: 26px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 0 4px rgba(224, 194, 125, 0.18); }
.hero-title { font-family: var(--font-serif); line-height: 1.12; }
.hero-hello { display: block; font-size: 20px; letter-spacing: 4px; color: var(--sage-200); font-family: var(--font-sans); font-weight: 400; margin-bottom: 14px; }
.hero-name {
  display: block; font-size: clamp(52px, 9vw, 92px); font-weight: 700; letter-spacing: 4px;
  background: linear-gradient(120deg, #ffffff 10%, var(--gold-light) 55%, var(--sage-200) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.3));
}
.hero-role {
  display: block; font-size: clamp(16px, 2.4vw, 22px); letter-spacing: 3px;
  color: var(--sage-100); margin-top: 18px; font-weight: 400;
}
.hero-slogan { max-width: 560px; margin: 26px 0 0; font-size: 16px; color: rgba(242, 246, 239, 0.82); }
.hero-actions { display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 46px; margin-top: 56px; flex-wrap: wrap; }
.meta-item { display: flex; flex-direction: column; }
.meta-item strong { font-family: var(--font-serif); font-size: 34px; font-weight: 700; color: var(--gold-light); line-height: 1.1; }
.meta-item span { font-size: 13px; letter-spacing: 1px; color: var(--sage-200); }
.hero-scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 26px; height: 44px; border: 2px solid rgba(255,255,255,0.4); border-radius: 20px; }
.hero-scroll span { display: block; width: 4px; height: 9px; background: var(--gold-light); border-radius: 2px; margin: 7px auto 0; animation: scrollDown 1.8s ease-in-out infinite; }
@keyframes scrollDown { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(12px); opacity: 0.2; } }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; padding: 13px 26px; border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, color 0.25s;
  font-weight: 500;
}
.btn svg { width: 18px; height: 18px; }
.btn-gold { background: linear-gradient(120deg, var(--gold), #b98e35); color: #fff; box-shadow: 0 10px 26px rgba(201, 162, 75, 0.32); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(201, 162, 75, 0.42); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.4); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.btn-dark { background: var(--green-800); color: #fff; }
.btn-dark:hover { background: var(--green-600); transform: translateY(-2px); }

/* ============ 通用 Section ============ */
.section { padding: 96px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-kicker {
  font-size: 12px; letter-spacing: 5px; text-transform: uppercase; color: var(--gold);
  font-weight: 600; margin-bottom: 10px;
}
.section-title { font-family: var(--font-serif); font-size: clamp(30px, 4.6vw, 44px); font-weight: 700; color: var(--green-900); letter-spacing: 1px; }
.section-sub { color: var(--ink-soft); margin-top: 12px; max-width: 640px; }

/* 进入视口动效 */
.section, .work-card { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.section.is-in, .work-card.is-in { opacity: 1; transform: none; }
.hero-inner { opacity: 0; transform: translateY(20px); animation: heroIn 1s var(--ease) forwards; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* ============ 关于我 ============ */
#about { background: var(--cream); }
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 44px; margin-top: 40px; align-items: start; }
.about-portrait {
  background: linear-gradient(180deg, #fff, var(--sage-100));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 24px; text-align: center; box-shadow: var(--shadow);
  position: sticky; top: 96px;
}
.portrait { width: 120px; height: 120px; margin: 0 auto 18px; position: relative; display: grid; place-items: center; }
.portrait-initial {
  width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, var(--green-400), var(--green-800));
  color: var(--gold-light); font-family: var(--font-serif); font-size: 40px; font-weight: 700;
  display: grid; place-items: center;
}
.portrait-ring { position: absolute; inset: 0; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.portrait-name { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--green-900); }
.portrait-role { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }
.about-text { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.about-text p { color: var(--ink-soft); margin-bottom: 18px; font-size: 16.5px; }
.about-text p:last-child { margin-bottom: 0; }
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tag {
  font-size: 13px; color: var(--green-700); background: var(--sage-100);
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--sage-200);
}

/* ============ 作品区 ============ */
.section-works { background: linear-gradient(180deg, #eef4ee 0%, var(--cream) 100%); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 34px; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; padding: 9px 18px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-soft);
  transition: all 0.25s var(--ease);
}
.filter-btn .count { font-size: 12px; background: var(--sage-100); color: var(--green-700); padding: 1px 8px; border-radius: 999px; }
.filter-btn:hover { border-color: var(--sage-300); color: var(--green-700); }
.filter-btn.is-active { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.filter-btn.is-active .count { background: rgba(255, 255, 255, 0.2); color: #fff; }

.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.work-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); box-shadow: 0 4px 18px rgba(11, 42, 28, 0.05);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.work-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.work-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.card-media { position: relative; height: 190px; overflow: hidden; }
.card-cover { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.work-card:hover .card-cover { transform: scale(1.06); }
.card-cover-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; }
.card-cover-fallback.c0 { background: linear-gradient(140deg, #1b5c3c, #0f3524); }
.card-cover-fallback.c1 { background: linear-gradient(140deg, #2f8f52, #14442e); }
.card-cover-fallback.c2 { background: linear-gradient(140deg, #4ca86a, #1b5c3c); }
.card-cover-fallback.c3 { background: linear-gradient(140deg, #227445, #0b2a1c); }
.card-cover-icon svg, .card-cover-fallback .card-cover-icon svg { width: 44px; height: 44px; opacity: 0.9; }
.card-cover-word { font-family: var(--font-serif); font-size: 20px; letter-spacing: 6px; opacity: 0.9; }
.card-badge {
  position: absolute; top: 14px; left: 14px; font-size: 12px; letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.92); color: var(--green-800);
  padding: 4px 12px; border-radius: 999px; font-weight: 600;
}
.card-body { padding: 20px 22px 22px; }
.card-title { font-size: 16.5px; font-weight: 700; color: var(--ink); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-summary { font-size: 14px; color: var(--ink-soft); margin-top: 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 10px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card-tag { font-size: 11.5px; color: var(--green-600); background: var(--sage-100); padding: 2px 9px; border-radius: 999px; }
.card-open { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--green-700); font-weight: 600; white-space: nowrap; }
.card-open svg { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.work-card:hover .card-open svg { transform: translate(3px, -3px); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); padding: 60px 0; }

/* ============ 技能与荣誉 ============ */
#skills { background: var(--green-900); color: #f2f6ef; }
#skills .section-title { color: #fff; }
#skills .section-kicker { color: var(--gold-light); }
.skills-honors { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 40px; }
.sh-title { font-family: var(--font-serif); font-size: 21px; font-weight: 700; color: var(--gold-light); margin-bottom: 22px; letter-spacing: 1px; }
.skill-row { margin-bottom: 20px; }
.skill-head { display: flex; justify-content: space-between; font-size: 14.5px; color: var(--sage-100); margin-bottom: 8px; }
.skill-pct { color: var(--gold-light); font-weight: 600; }
.skill-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.skill-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-400), var(--gold-light)); width: 0; transition: width 1.2s var(--ease); }
.skill-row.is-in .skill-bar i { width: var(--w, 0); }
.honor-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: var(--sage-100); font-size: 15px; }
.honor-item:last-child { border-bottom: none; }
.honor-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-light); margin-top: 9px; box-shadow: 0 0 0 4px rgba(224, 194, 125, 0.16); }

/* ============ 联系我 ============ */
.section-contact { background: var(--cream); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 40px; align-items: center; }
.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-item {
  display: flex; align-items: center; gap: 16px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.contact-item:hover { transform: translateX(6px); box-shadow: var(--shadow); }
.contact-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--sage-100); color: var(--green-700); display: grid; place-items: center; }
.contact-icon svg { width: 22px; height: 22px; }
.contact-text { display: flex; flex-direction: column; }
.contact-label { font-size: 12px; color: var(--ink-soft); letter-spacing: 1px; }
.contact-value { font-size: 16px; color: var(--ink); font-weight: 600; }
.contact-qr { text-align: center; }
.qr-box {
  width: 220px; height: 220px; margin: 0 auto; background: #fff;
  border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; place-items: center; padding: 14px;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.qr-caption { margin-top: 14px; font-size: 14px; color: var(--ink-soft); }

/* ============ 页脚 ============ */
.footer { background: var(--green-950); color: var(--sage-200); padding: 46px 24px; text-align: center; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.footer-brand { font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: #fff; letter-spacing: 1px; }
.footer-note { font-size: 13px; color: var(--sage-200); }
.footer-copy { font-size: 12px; color: rgba(188, 214, 196, 0.6); margin-top: 4px; }

/* ============ 弹窗 ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.is-open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11, 42, 28, 0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn 0.3s; }
.modal-panel {
  position: relative; max-width: 820px; margin: 6vh auto 0; background: #fff; border-radius: 22px;
  overflow: hidden; box-shadow: var(--shadow-lg); animation: popIn 0.4s var(--ease);
  max-height: 88vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5; width: 40px; height: 40px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.92); border: none; font-size: 26px;
  line-height: 1; color: var(--green-900); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s;
}
.modal-close:hover { transform: rotate(90deg); }
.modal-media { background: #0f3524; }
.modal-media video { width: 100%; max-height: 46vh; background: #000; display: block; }
.modal-media img { width: 100%; max-height: 60vh; object-fit: contain; background: #0f3524; }
.modal-media.modal-pdf-note { color: #fff; padding: 56px 32px; text-align: center; }
.modal-media .big-icon { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 20px; background: rgba(255,255,255,0.1); margin-bottom: 16px; }
.modal-media .big-icon svg { width: 38px; height: 38px; color: var(--gold-light); }
.modal-media.modal-pdf-note p { color: var(--sage-200); font-size: 15px; }
.modal-fallback { padding: 10px 16px; font-size: 13px; color: var(--sage-200); text-align: center; }
.modal-fallback a { color: var(--gold-light); text-decoration: underline; }
.modal-info { padding: 30px 34px 34px; }
.modal-kicker { font-size: 12px; letter-spacing: 3px; color: var(--gold); font-weight: 600; text-transform: uppercase; }
.modal-title { font-family: var(--font-serif); font-size: 24px; color: var(--green-900); margin-top: 8px; line-height: 1.4; }
.modal-summary { color: var(--ink-soft); margin-top: 12px; font-size: 15.5px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.modal-tag { font-size: 12.5px; color: var(--green-700); background: var(--sage-100); padding: 4px 13px; border-radius: 999px; }
.modal-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(30px) scale(0.98); } }

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { position: static; display: flex; align-items: center; gap: 20px; text-align: left; }
  .about-portrait .portrait { margin: 0; }
  .skills-honors { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; background: rgba(246, 243, 234, 0.98);
    flex-direction: column; padding: 18px 24px; gap: 16px; display: none;
    box-shadow: 0 20px 40px rgba(11, 42, 28, 0.12);
  }
  .nav-links.is-open { display: flex; }
  .nav-cta { display: none; }
  .nav-burger { display: block; margin-left: auto; }
  .nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger.is-open span:nth-child(2) { opacity: 0; }
  .nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .works-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 26px; }
  .about-portrait { flex-direction: column; text-align: center; }
  .section { padding: 64px 18px; }
  .modal-panel { margin: 4vh auto 0; border-radius: 16px; }
  .modal-info { padding: 22px 20px 26px; }
}
