:root {
  --orange: #f6821f;
  --orange-dark: #e06d0b;
  --orange-soft: #fff4ea;
  --ink: #1d1f20;
  --text: #36393a;
  --muted: #6b7075;
  --line: #e5e7eb;
  --bg-soft: #f7f7f8;
  --navy: #0e1a2b;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); font-size: 17px; }
.logo b { color: var(--orange); font-weight: 700; }
.nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--text); transition: color .15s; }
.nav-links a:hover { color: var(--orange); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { position: relative; z-index: 1; padding: 96px 24px 104px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--orange); margin-bottom: 18px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.12; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; max-width: 720px; }
.accent { color: var(--orange); }
.lead { margin-top: 22px; font-size: 18px; color: var(--muted); max-width: 580px; }
.hero-actions { margin-top: 36px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-meta { font-size: 14px; color: var(--muted); }
.hero-meta span { color: var(--ink); font-weight: 700; }
.hero-art {
  position: absolute; right: -120px; top: 50%; transform: translateY(-50%);
  width: 640px; height: 640px; border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 0 38%, rgba(246,130,31,.10) 38% 38.4%, transparent 38.4% 52%, rgba(246,130,31,.14) 52% 52.4%, transparent 52.4% 66%, rgba(246,130,31,.18) 66% 66.4%, transparent 66.4%),
    radial-gradient(circle at 50% 50%, rgba(246,130,31,.18), transparent 40%);
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%);
  mask-image: radial-gradient(circle, #000 55%, transparent 72%);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 26px; border-radius: 8px;
  font-size: 15px; font-weight: 600; transition: background .15s, transform .15s;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }

/* Library */
.library { padding: 80px 0 96px; }
.library-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.library-head h2 { font-size: 32px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.toolbar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 36px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--orange); color: var(--orange); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.search {
  height: 36px; width: 220px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); font: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(246,130,31,.15); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 24px; }
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--orange); border-radius: var(--radius) var(--radius) 0 0;
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.card:hover { border-color: #d6d9dd; box-shadow: 0 12px 32px rgba(16, 24, 40, .08); transform: translateY(-3px); }
.card:hover::before { transform: scaleX(1); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.card-icon {
  width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center;
  background: var(--orange-soft); color: var(--orange);
}
.card-icon svg { width: 26px; height: 26px; }
.card-cat { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.card h3 { font-size: 21px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.card p { font-size: 15px; color: var(--muted); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tags span { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 4px; background: var(--bg-soft); color: var(--text); border: 1px solid var(--line); }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.updated { color: var(--muted); font-size: 13px; }
.open { font-weight: 600; color: var(--orange); }
.arrow { display: inline-block; transition: transform .2s; }
.card:hover .arrow { transform: translateX(4px); }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* Footer */
.footer { background: var(--navy); color: #a9b3c1; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px 24px; }
.footer-note { color: #7d8896; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; background: var(--bg-soft); }
.notfound h1 { font-size: 48px; font-weight: 800; color: var(--ink); }
.notfound .lead { margin: 12px auto 32px; }

@media (max-width: 720px) {
  .nav-links a:last-child { display: none; }
  .hero-inner { padding: 64px 24px 72px; }
  .hero-art { opacity: .5; right: -320px; }
  .search { width: 100%; }
  .toolbar { width: 100%; }
  .grid { grid-template-columns: 1fr; }
}
