/* ============ 宋江豪 · 作品集 ============ */
:root {
  --bg: #080c16;
  --bg-2: #0d1424;
  --card: #111a2c;
  --card-hi: #16213a;
  --line: rgba(255, 255, 255, .09);
  --text: #e8eefc;
  --muted: #93a3c0;
  --accent: #22d3ee;
  --accent-2: #6366f1;
  --radius: 16px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

/* 作者样式的 display 会盖掉 hidden 属性，这里统一兜底 */
[hidden] { display: none !important; }

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

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

body.locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(28px + env(safe-area-inset-top)) 0 24px;
  background: linear-gradient(180deg, #0b1220 0%, var(--bg) 100%);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -180px; left: 50%;
  width: 620px; height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(34, 211, 238, .22), transparent 70%),
              radial-gradient(closest-side, rgba(99, 102, 241, .18), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.avatar {
  flex: 0 0 auto;
  width: 58px; height: 58px;
  border-radius: 18px;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 700;
  color: #041018;
  background: linear-gradient(135deg, var(--accent), #4ade80);
  box-shadow: 0 8px 24px rgba(34, 211, 238, .28);
}

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

h1 {
  margin: 0 0 2px;
  font-size: 25px;
  letter-spacing: .5px;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.hero-intro {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 60ch;
}

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 16px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
  font-family: inherit;
}

.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: #04121a;
}

.btn-ghost {
  background: rgba(255, 255, 255, .06);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover { background: rgba(255, 255, 255, .1); }

/* ---------- 简历抽屉 ---------- */
.resume-drawer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.resume-drawer-inner {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}

.drawer-label { font-size: 13px; color: var(--muted); }

.drawer-links { display: flex; flex-wrap: wrap; gap: 8px; }

.drawer-links a {
  display: inline-block;
  padding: 6px 13px;
  font-size: 13px;
  border-radius: 999px;
  background: rgba(34, 211, 238, .12);
  border: 1px solid rgba(34, 211, 238, .35);
  color: var(--accent);
}

.drawer-close {
  margin-left: auto;
  background: none; border: 0; color: var(--muted);
  font-size: 15px; cursor: pointer; padding: 4px 6px;
}

/* ---------- 分类筛选 ---------- */
.filters {
  position: sticky; top: 0; z-index: 30;
  background: rgba(8, 12, 22, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.filters-inner {
  display: flex; gap: 8px;
  padding-top: 10px; padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters-inner::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
  font-family: inherit;
}

.chip:hover { color: var(--text); }

.chip.active {
  color: #04121a;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  border-color: transparent;
  font-weight: 700;
}

/* ---------- 卡片网格 ---------- */
main { padding-top: 18px; padding-bottom: 40px; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, .4);
  background: var(--card-hi);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #05080f;
  cursor: pointer;
  overflow: hidden;
}

.card-media.tall { aspect-ratio: 4 / 5; }

.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.card:hover .card-media img { transform: scale(1.04); }

.play-badge {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
}

.play-badge i {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(8, 12, 22, .62);
  border: 2px solid rgba(255, 255, 255, .85);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  font-style: normal;
  transition: transform .18s ease;
}

.play-badge i::after {
  content: '';
  border-left: 15px solid #fff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 4px;
}

.card:hover .play-badge i { transform: scale(1.08); }

.count-badge {
  position: absolute; right: 10px; bottom: 10px;
  padding: 3px 9px;
  font-size: 12px; font-weight: 600;
  border-radius: 999px;
  background: rgba(8, 12, 22, .78);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #dbe7ff;
}

.kind-badge {
  position: absolute; left: 10px; top: 10px;
  padding: 3px 9px;
  font-size: 11.5px; font-weight: 700;
  border-radius: 6px;
  letter-spacing: .4px;
  background: rgba(34, 211, 238, .9);
  color: #04121a;
}

.kind-badge.img {
  background: rgba(167, 139, 250, .92);
  color: #12061f;
}

.card-body { padding: 13px 14px 15px; }

.card-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.card-desc {
  margin: 0 0 11px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.62;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 6px;
  color: #9fb4d8;
  background: rgba(148, 163, 184, .12);
  border: 1px solid rgba(148, 163, 184, .18);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
  font-size: 14px;
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 calc(28px + env(safe-area-inset-bottom));
  background: var(--bg-2);
}

.footer-contact { margin: 0 0 6px; font-size: 14px; }

.footer-contact a { color: var(--accent); }

.dot { margin: 0 8px; color: var(--muted); }

.footer-note { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(2, 5, 12, .95);
  backdrop-filter: blur(6px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 16px;
}

.lb-stage {
  max-width: 100%;
  max-height: 78vh;
  display: flex; align-items: center; justify-content: center;
}

.lb-stage img,
.lb-stage video {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 12px;
  display: block;
  background: #000;
}

.lb-caption {
  margin-top: 14px;
  font-size: 13.5px;
  color: #cfdcf5;
  text-align: center;
  max-width: 46ch;
}

.lb-counter {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

.lb-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top)); right: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .08);
  color: #fff; font-size: 16px; cursor: pointer;
}

.lb-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .08);
  color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  padding-bottom: 4px;
}

.lb-prev { left: 10px; }
.lb-next { right: 10px; }

.lb-nav[hidden] { display: none; }

@media (max-width: 520px) {
  .lb-nav { width: 38px; height: 38px; font-size: 22px; }
  .hero-inner { gap: 13px; }
  h1 { font-size: 22px; }
}
