:root {
  --primary: #2563eb;
  --accent: #f59e0b;
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #273449;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --border: #334155;
  --radius: 14px;
  --maxw: 1100px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  font-synthesis: none;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,23,42,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: .5px; }
.brand span { color: var(--primary); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text-dim); font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  background: var(--primary); color: #fff; font-weight: 600; font-size: .92rem;
  transition: transform .15s, box-shadow .2s; border: none; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,99,235,.4); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); box-shadow: none; }

/* ---------- Hero ---------- */
.hero { padding: 92px 0 70px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 420px;
  background: radial-gradient(600px 300px at 30% 20%, rgba(37,99,235,.35), transparent 70%),
              radial-gradient(500px 280px at 80% 10%, rgba(245,158,11,.22), transparent 70%);
  filter: blur(20px); z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; font-weight: 800; }
.hero h1 .hl { color: var(--primary); }
.hero .tagline { margin-top: 14px; font-size: 1.15rem; color: var(--text-dim); }
.hero .lede { margin-top: 18px; max-width: 620px; color: var(--text-dim); }
.hero .cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Section ---------- */
.section { padding: 64px 0; border-top: 1px solid var(--border); }
.section-head { margin-bottom: 36px; }
.section-head h2 { font-size: 1.8rem; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.section-head h2::before { content: ""; width: 6px; height: 26px; border-radius: 4px; background: var(--primary); display: inline-block; }
.section-head p { color: var(--text-dim); margin-top: 8px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start; }
.avatar {
  width: 200px; height: 200px; border-radius: 20px; object-fit: cover;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  display: flex; align-items: center; justify-content: center; color: var(--text-dim);
  font-size: 3rem; border: 1px solid var(--border);
}
.about-text p { color: var(--text-dim); margin-bottom: 16px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 10px; }
.contact-row a, .contact-row span { color: var(--text); font-size: .95rem; }
.contact-row .k { color: var(--text-dim); margin-right: 6px; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim); cursor: pointer; font-size: .9rem;
  transition: all .18s;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Works grid ---------- */
.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, border-color .2s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow); }
.cover {
  aspect-ratio: 4/3; background: linear-gradient(135deg, var(--surface-2), #0b1220);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .ph { color: var(--text-dim); font-size: 2.4rem; font-weight: 800; opacity: .5; padding: 0 16px; text-align: center; }
.badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 11px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; backdrop-filter: blur(4px);
  background: rgba(15,23,42,.7); border: 1px solid var(--border);
}
.badge.海报 { color: #fca5a5; }
.badge.视频 { color: #93c5fd; }
.badge.文档 { color: #fcd34d; }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.08rem; font-weight: 700; }
.card-body p { color: var(--text-dim); font-size: .9rem; flex: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.card-meta .date { color: var(--text-dim); font-size: .8rem; }
.card-meta .open { color: var(--primary); font-size: .88rem; font-weight: 600; }

/* category color bar */
.card .cat-bar { height: 4px; }

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(2,6,23,.78); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 24px;
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  max-width: 640px; width: 100%; max-height: 86vh; overflow: auto; padding: 26px;
}
.modal h3 { font-size: 1.4rem; margin-bottom: 6px; }
.modal .m-meta { color: var(--text-dim); font-size: .85rem; margin-bottom: 14px; }
.modal p { color: var(--text-dim); margin-bottom: 18px; }
.modal .m-actions { display: flex; gap: 12px; }
.modal .close-x { position: absolute; top: 18px; right: 22px; font-size: 1.5rem; cursor: pointer; color: var(--text-dim); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--text-dim); text-align: center; font-size: .9rem; }
.footer .admin-link { color: var(--text-dim); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
  .avatar { width: 140px; height: 140px; }
  .nav-links { gap: 14px; }
  .nav-links a.hide-sm { display: none; }
}
