:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --ink: #1f2a44;
  --muted: #6b7280;
  --line: #e3e7ee;
  --gold: #c8922f;
  --gold-soft: #f3e6c8;
  --teal: #2f7e8c;
  --teal-soft: #e3eef0;
  --shadow: 0 8px 30px rgba(31, 42, 68, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top:
0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.nav-links a:hover { color: var(--gold); }
.header-right { display: flex; align-items: center; gap: 18px; }
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand .logo { width: 42px; height: 42px; flex: none; }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand .brand-name { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.brand .brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 2px; }
.auth-box { display: flex; align-items: center; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(200,146,47,.35); }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-ghost:hover { background: #e2e6ee; }
.btn-block { width: 100%; padding: 12px; }

/* ---------- Layout ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.section-title { font-size: 26px; font-weight: 700; margin: 0; }
.section-sub { color: var(--muted); font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 380px at 85% -20%, rgba(200,146,47,0.30) 0, transparent 60%),
    linear-gradient(135deg, #1f2a44 0%, #2f7e8c 58%, #c8922f 120%);
  color: #fff;
  padding: 72px 0 64px;
}
.hero-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hero h1 { font-size: 40px; margin: 0 0 14px; font-weight: 800; letter-spacing: 1px; }
.hero p { font-size: 17px; opacity: .92; max-width: 620px; margin: 0 0 28px; }
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-tag {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
}

/* ---------- Work grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(31,42,68,.14); }
.card-img { aspect-ratio: 3/4; overflow: hidden; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px 16px 18px; }
.card-cat {
  display: inline-block;
  font-size: 12px;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.card-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.card-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.card-desc { font-size: 13px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Work detail ---------- */
.detail-hero { display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; }
.detail-cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.detail-cover img { width: 100%; }
.detail-info h1 { font-size: 30px; margin: 0 0 10px; }
.detail-meta { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.detail-info p { margin: 0 0 18px; }
.gallery {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  margin-top: 36px;
}
.gallery figure {
  width: 100%;
  max-width: 920px;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 14px 40px rgba(31, 42, 68, 0.12);
}
.gallery figure img {
  width: 100%;
  display: block;
  border-radius: 10px;
  cursor: zoom-in;
}
.gallery figure figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  letter-spacing: 1px;
}

/* 条漫长图连续阅读模式 */
.gallery.long-read { gap: 0; margin-top: 36px; }
.gallery.long-read figure {
  width: 100%;
  max-width: 1080px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.gallery.long-read figure img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(31, 42, 68, 0.12);
}
.gallery.long-read figure figcaption { display: none; }
@media (min-width: 1200px) {
  .gallery.long-read figure { max-width: 1100px; }
}

/* ---------- Forms ---------- */
.auth-wrap { max-width: 420px; margin: 60px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.auth-wrap h2 { margin: 0 0 6px; font-size: 24px; }
.auth-wrap .sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; font-weight: 600; }
.field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.agree-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); margin: 4px 0 18px; }
.agree-row input { margin-top: 3px; }
.agree-row a { color: var(--teal); }
.form-msg { font-size: 13px; min-height: 18px; margin-bottom: 12px; }
.form-msg.err { color: #c0392b; }
.form-msg.ok { color: #1f8a4c; }

/* ---------- Footer ---------- */
.site-footer {
  background: #1f2a44;
  color: #c7cede;
  padding: 40px 0 30px;
  margin-top: 60px;
  font-size: 13px;
}
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.footer-links a { color: #c7cede; }
.footer-links a:hover { color: #fff; }
.footer-line { line-height: 2; }
.footer-copy { color: #9aa6bd; margin-top: 12px; }
.footer-empty { color: #7d889e; }

/* ---------- Misc ---------- */
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.about-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.about-card h3 { margin: 0 0 12px; font-size: 18px; }
.about-card p, .about-card li { color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 14px; color: var(--muted); }
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 24, 38, 0.92);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 720px) {
  .detail-hero { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .gallery { gap: 18px; }
  .gallery figure { max-width: 100%; }
  .header-inner { flex-wrap: wrap; }
}
