/* ============================================================
   李桂宇 · 作品集 —— 暗色霓虹风（星空 + 极光 + 发光特效）
   ============================================================ */

:root {
  --bg: #060913;
  --ink: #e9edff;
  --ink-soft: #b7bfdd;
  --muted: #8b93ad;
  --faint: #5b6480;
  --line: rgba(148, 163, 255, 0.14);
  --card-bg: rgba(17, 22, 46, 0.6);
  --card-border: rgba(148, 163, 255, 0.18);
  --accent: #8b5cf6;
  --accent-2: #d946ef;
  --accent-3: #22d3ee;
  --grad: linear-gradient(120deg, #8b5cf6, #d946ef 45%, #22d3ee);
  --shadow-sm: 0 4px 16px rgba(4, 6, 18, 0.5);
  --shadow-md: 0 16px 44px -14px rgba(4, 6, 18, 0.7);
  --shadow-lg: 0 30px 90px -20px rgba(124, 108, 255, 0.5);
  --radius: 22px;
}

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

html { scroll-behavior: smooth; }

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

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

::selection { background: rgba(217, 70, 239, 0.4); color: #fff; }

/* ---------- 背景：星空 + 极光 + 网格 + 暗角 ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(34, 211, 238, 0.13), transparent 60%),
    radial-gradient(1000px 700px at -10% 20%, rgba(139, 92, 246, 0.2), transparent 60%),
    radial-gradient(900px 700px at 60% 110%, rgba(236, 72, 153, 0.15), transparent 60%),
    radial-gradient(ellipse at center, transparent 55%, rgba(2, 4, 12, 0.55) 100%),
    var(--bg);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation: float 20s ease-in-out infinite;
}
.blob-1 { width: 460px; height: 460px; left: -130px; top: -90px; background: #4c1d95; }
.blob-2 { width: 420px; height: 420px; right: -110px; top: 28%; background: #164e63; animation-delay: -7s; }
.blob-3 { width: 400px; height: 400px; left: 32%; bottom: -150px; background: #831843; animation-delay: -13s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(44px, -34px) scale(1.07); }
  66% { transform: translate(-34px, 28px) scale(0.95); }
}
.bg::after { /* 星光 */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 8% 18%, rgba(255, 255, 255, 0.7), transparent 100%),
    radial-gradient(1px 1px at 22% 66%, rgba(255, 255, 255, 0.55), transparent 100%),
    radial-gradient(1.4px 1.4px at 35% 32%, rgba(165, 180, 252, 0.8), transparent 100%),
    radial-gradient(1px 1px at 48% 12%, rgba(255, 255, 255, 0.5), transparent 100%),
    radial-gradient(1.2px 1.2px at 60% 78%, rgba(255, 255, 255, 0.6), transparent 100%),
    radial-gradient(1px 1px at 74% 26%, rgba(165, 180, 252, 0.75), transparent 100%),
    radial-gradient(1.3px 1.3px at 86% 55%, rgba(255, 255, 255, 0.55), transparent 100%),
    radial-gradient(1px 1px at 93% 84%, rgba(255, 255, 255, 0.45), transparent 100%),
    radial-gradient(1.1px 1.1px at 15% 88%, rgba(255, 255, 255, 0.5), transparent 100%),
    radial-gradient(1px 1px at 70% 6%, rgba(255, 255, 255, 0.45), transparent 100%),
    radial-gradient(1.2px 1.2px at 44% 92%, rgba(255, 255, 255, 0.45), transparent 100%),
    radial-gradient(1px 1px at 90% 40%, rgba(255, 255, 255, 0.5), transparent 100%);
  opacity: 0.9;
}
.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(8, 11, 26, 0.6);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { font-weight: 800; font-size: 1.02rem; letter-spacing: 0.02em; color: #f0f2ff; }
.brand-dot { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 0.92rem; }
.nav-links a { color: var(--ink-soft); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: #fff; text-shadow: 0 0 14px rgba(139, 92, 246, 0.8); }
.nav-cta {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff !important;
  box-shadow: 0 6px 22px -4px rgba(217, 70, 239, 0.6);
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -4px rgba(217, 70, 239, 0.8); }

/* ---------- Hero ---------- */
.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 90px 24px 70px;
  text-align: center;
  position: relative;
}
.hero-name {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  background: linear-gradient(115deg, #a78bfa 0%, #f472b6 35%, #22d3ee 70%, #a78bfa 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: grad-shift 7s linear infinite;
  filter: drop-shadow(0 0 26px rgba(167, 139, 250, 0.5));
  margin-bottom: 10px;
}
@keyframes grad-shift {
  0% { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}
.hero-tagline {
  font-size: 1.05rem;
  color: #d8defa;
  font-weight: 600;
  margin-bottom: 12px;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.35);
}
.hero-intro { max-width: 560px; margin: 0 auto 24px; color: var(--muted); font-size: 0.95rem; }
.hero-skills { margin: 18px 0 0; display: flex; justify-content: center; }
.skill-line {
  display: inline-block;
  max-width: 100%;
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #cbc4ff;
  letter-spacing: 0.05em;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 26px -6px rgba(139, 92, 246, 0.55), inset 0 0 18px -8px rgba(139, 92, 246, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 作品区 ---------- */
.works { max-width: 1120px; margin: 0 auto; padding: 24px 24px 90px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f0f2ff;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 5px;
  margin-top: 10px;
  border-radius: 99px;
  background: var(--grad);
  box-shadow: 0 0 16px rgba(217, 70, 239, 0.7);
}
.section-head p { color: var(--muted); font-size: 0.92rem; }

/* 筛选 */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter-chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: var(--shadow-sm);
}
.filter-chip:hover {
  border-color: rgba(139, 92, 246, 0.6);
  color: #fff;
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.9);
  transform: translateY(-1px);
}
.filter-chip.active {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 10px 30px -6px rgba(217, 70, 239, 0.7);
}

/* Bento 拼盘网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  grid-auto-flow: dense;
  gap: 22px;
}

/* ---------- 卡片 ---------- */
.float-wrap {
  position: relative;
  transition: opacity 0.45s, filter 0.45s;
}
.float-wrap.is-hidden { opacity: 0; filter: blur(5px); pointer-events: none; }
.float-wrap.is-hidden.removed { display: none; }

.card {
  position: relative;
  height: 100%;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.18s ease-out;
  will-change: transform;
  outline: none;
}
.card:hover, .card:focus-visible {
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow:
    0 28px 90px -18px rgba(124, 108, 255, 0.55),
    0 0 30px -4px rgba(217, 70, 239, 0.35);
}
.card::after { /* 眩光 */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.18), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.card:hover::after { opacity: 1; }

.card-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #2e1065, #164e63);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.card:hover .card-cover img { transform: scale(1.07); }
.card-cover.cover-gradient {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background:
    radial-gradient(240px 160px at 20% 20%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(135deg, #4c1d95, #7c3aed 50%, #0e7490);
}
.grad-emoji { font-size: 4rem; filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.5)); }

/* 海报底部标题条（与简介完全分离） */
.card-titlebar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 18px 12px;
  background: linear-gradient(to top, rgba(3, 5, 15, 0.92) 32%, rgba(3, 5, 15, 0));
  pointer-events: none;
}
.card-titlebar h3 {
  color: #fff;
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  background: rgba(8, 11, 26, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(139, 92, 246, 0.5);
}

/* 悬停简介浮层（覆盖卡片下半部） */
.card-intro {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 20px 18px;
  background: linear-gradient(to top, rgba(6, 9, 24, 0.96) 30%, rgba(6, 9, 24, 0.86) 68%, rgba(6, 9, 24, 0) 100%);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
  pointer-events: none;
}
.card:hover .card-intro,
.card:focus-visible .card-intro { transform: translateY(0); }
.card-intro .intro-title { color: #fff; font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; }
.card-desc {
  color: var(--ink-soft);
  font-size: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.card-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.card-chips .chip {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.35);
}
.card-more {
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.25s;
  filter: drop-shadow(0 0 10px rgba(217, 70, 239, 0.45));
}
.card:hover .card-more { gap: 9px; }

/* 滚动入场 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 详情弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 14, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.modal-panel {
  position: relative;
  width: min(880px, 100%);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  border-radius: 26px;
  background: rgba(13, 17, 40, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 40px 120px -20px rgba(124, 108, 255, 0.45);
  transform: translateY(26px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1.1);
}
.modal.open .modal-panel { transform: none; }
.modal-panel::-webkit-scrollbar { width: 8px; }
.modal-panel::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.45); border-radius: 99px; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  color: #fff;
  background: rgba(3, 5, 15, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.modal-close:hover { background: rgba(217, 70, 239, 0.6); transform: rotate(90deg); }

.modal-banner { position: relative; }
.modal-banner img { width: 100%; height: clamp(220px, 34vw, 340px); object-fit: cover; }
.modal-banner.banner-gradient {
  height: clamp(200px, 30vw, 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background:
    radial-gradient(300px 200px at 25% 20%, rgba(255, 255, 255, 0.2), transparent 60%),
    linear-gradient(135deg, #4c1d95, #7c3aed 50%, #0e7490);
}
.modal-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(13, 17, 40, 0.96));
  pointer-events: none;
}
.modal-body { padding: 6px 34px 38px; margin-top: -46px; position: relative; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.modal-meta .chip {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 6px 20px -4px rgba(217, 70, 239, 0.6);
}
.modal-title { font-size: 1.7rem; font-weight: 900; margin-bottom: 4px; color: #f0f2ff; }
.modal-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.modal-section { margin-bottom: 22px; }
.modal-section h3 {
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #e6e9ff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-section h3::before {
  content: "";
  width: 5px;
  height: 18px;
  border-radius: 99px;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.8);
}
.modal-section p { color: var(--ink-soft); font-size: 0.94rem; }
.hl-list { list-style: none; display: grid; gap: 10px; }
.hl-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.hl-list li b { color: #fff; }
.tech-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-list .chip {
  padding: 6px 13px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.35);
}

/* 截图画廊 */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gallery figure {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #131936;
  cursor: zoom-in;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.gallery figure:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 14px 40px -12px rgba(124, 108, 255, 0.45);
}
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery figcaption {
  padding: 8px 10px;
  font-size: 0.74rem;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.modal-links .btn { padding: 10px 22px; font-size: 0.88rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 12px 34px -8px rgba(217, 70, 239, 0.65);
}
.btn-primary:hover { box-shadow: 0 16px 44px -8px rgba(217, 70, 239, 0.85); }
.btn-ghost {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { color: #fff; border-color: rgba(139, 92, 246, 0.5); box-shadow: var(--shadow-md); }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 5, 15, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-figure { max-width: min(92vw, 1200px); max-height: 86vh; text-align: center; }
.lb-figure img {
  max-width: 100%;
  max-height: 76vh;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}
.lb-figure figcaption { color: rgba(255, 255, 255, 0.85); margin-top: 14px; font-size: 0.9rem; }
.lb-close, .lb-nav {
  position: absolute;
  border: none;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background 0.2s, transform 0.2s;
}
.lb-close { top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%; font-size: 1.1rem; }
.lb-close:hover { background: rgba(217, 70, 239, 0.7); transform: rotate(90deg); }
.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.9rem;
  line-height: 1;
}
.lb-prev { left: 22px; }
.lb-next { right: 22px; }
.lb-nav:hover { background: rgba(139, 92, 246, 0.7); transform: translateY(-50%) scale(1.08); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(8, 11, 26, 0.5);
  padding: 26px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- CTA 卡片（补满拼盘的空位） ---------- */
.cta-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
  border-radius: var(--radius);
  border: 1.5px dashed rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.cta-tile:hover {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.7);
  transform: translateY(-3px);
}
.cta-emoji { font-size: 2.4rem; }
.cta-text { font-weight: 800; font-size: 1.02rem; color: #e6e9ff; }
.cta-sub { font-size: 0.82rem; color: var(--muted); }

/* 标题条悬停淡出，让位给简介浮层 */
.card-titlebar { transition: opacity 0.25s; }
.card:hover .card-titlebar,
.card:focus-visible .card-titlebar { opacity: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; gap: 18px; }
  .cell-feature, .cell-wide { grid-column: span 2; }
  .cell-feature { grid-row: span 1; }
  .card { height: auto; }
  .card-cover { position: relative; inset: auto; aspect-ratio: 16 / 10; }
  .card-intro { position: static; transform: none; background: none; padding: 14px 16px 16px; }
  .card-intro .intro-title { display: none; }
  .card-titlebar { opacity: 1; }
  .cta-tile { min-height: 160px; }
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 20px 52px; }
  .modal-body { padding: 6px 20px 30px; }
  .modal-title { font-size: 1.35rem; }
  .nav-links { gap: 14px; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* 跳过动画按钮（仅入场动画期间显示） */
.skip-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(13, 17, 40, 0.78);
  color: #c4b5fd;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.skip-btn:hover {
  background: rgba(139, 92, 246, 0.4);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- 导航「联系我」：悬停显示二维码 ---------- */
.nav-contact { position: relative; }
.nav-contact-btn {
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  padding: 7px 4px;
  transition: color 0.2s, text-shadow 0.2s;
}
.nav-contact-btn:hover { color: #fff; text-shadow: 0 0 14px rgba(139, 92, 246, 0.8); }
.nav-qr-tip {
  position: absolute;
  top: calc(100% + 12px);
  right: -10px;
  width: 150px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(13, 17, 40, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  z-index: 60;
  pointer-events: none;
}
.nav-qr-tip::before { /* 小箭头 */
  content: "";
  position: absolute;
  top: -6px;
  right: 22px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: rgba(13, 17, 40, 0.96);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.nav-contact:hover .nav-qr-tip { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-qr-tip img { width: 100%; border-radius: 8px; display: block; }
.nav-qr-tip span { display: block; margin-top: 6px; font-size: 0.72rem; color: var(--muted); }

/* ---------- 联系我弹窗 ---------- */
.contact-panel {
  width: min(480px, 100%);
  padding: 34px 34px 36px;
  text-align: center;
}
.contact-title {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 22px;
  color: #f0f2ff;
}
.contact-qrs {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
  margin: 0 auto 22px;
}
.contact-qr { text-align: center; margin: 0; }
.contact-qr img {
  width: 150px;
  height: 150px;
  object-fit: cover; /* 统一为正方形，只轻微裁切边缘 */
  border-radius: 14px;
  box-shadow: 0 16px 44px -12px rgba(124, 108, 255, 0.55);
}
.contact-qr figcaption { margin-top: 10px; color: var(--muted); font-size: 0.82rem; }
.contact-info { list-style: none; display: grid; gap: 10px; margin: 0 0 24px; }
.contact-info li {
  color: var(--ink-soft);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.contact-info a { color: #c4b5fd; font-weight: 600; transition: color 0.2s; }
.contact-info a:hover { color: #fff; text-shadow: 0 0 12px rgba(139, 92, 246, 0.8); }
.contact-dl { justify-content: center; width: 100%; }
