:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --panel: #121922;
  --panel-strong: #17212d;
  --line: rgba(255, 255, 255, 0.12);
  --text: #edf2f7;
  --muted: #9aa6b2;
  --green: #76b900;
  --cyan: #55c7ff;
  --gold: #f2bd2b;
  --rose: #ff7aa8;
  --violet: #a78bfa;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Inter, "Noto Sans TC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 6%, rgba(118, 185, 0, 0.15), transparent 28rem),
    radial-gradient(circle at 82% 12%, rgba(85, 199, 255, 0.12), transparent 30rem),
    linear-gradient(180deg, #0b0f14 0%, #080b10 100%);
  color: var(--text);
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 15, 20, 0.88);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand,
.nav a,
.button,
.project-link {
  text-decoration: none;
}

.brand {
  font-weight: 850;
}

.brand span {
  color: var(--green);
}

.nav {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a,
.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.nav a:hover,
.button.secondary:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.hero {
  padding: 74px 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: end;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 16px;
  border: 1px solid rgba(118, 185, 0, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--green);
  background: rgba(118, 185, 0, 0.12);
  font-size: 12px;
  font-weight: 850;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(38px, 7vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 780px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

.button.primary {
  color: #071006;
  background: var(--green);
}

.button.secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.button.secondary.hf-button {
  color: #c7efa0;
  border-color: rgba(118, 185, 0, 0.46);
  background: rgba(118, 185, 0, 0.1);
}

.button.secondary.hf-button:hover {
  color: #efffdc;
  border-color: var(--green);
  background: rgba(118, 185, 0, 0.18);
}

.summary-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(23, 33, 45, 0.92), rgba(18, 25, 34, 0.92));
}

.summary-panel h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.summary-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.summary-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.summary-stat strong {
  display: block;
  color: var(--green);
  font-size: 24px;
}

.summary-stat span {
  color: var(--muted);
  font-size: 12px;
}

main {
  padding-bottom: 64px;
}

.category-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 8px auto 34px;
}

.category-link {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: rgba(18, 25, 34, 0.76);
  text-decoration: none;
}

.category-link:hover,
.category-link.active {
  border-color: rgba(118, 185, 0, 0.52);
  background: rgba(118, 185, 0, 0.12);
}

.category-link strong {
  font-size: 14px;
}

.category-link span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.search {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  font: inherit;
}

.search:focus {
  outline: none;
  border-color: rgba(118, 185, 0, 0.64);
}

.count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.section-head p {
  color: var(--muted);
  line-height: 1.7;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.project-card {
  min-height: 238px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(18, 25, 34, 0.82);
}

.project-card:hover {
  border-color: rgba(118, 185, 0, 0.5);
  background: rgba(21, 31, 42, 0.92);
}

.project-type {
  width: fit-content;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #071006;
  background: var(--green);
  font-size: 11px;
  font-weight: 850;
}

.project-card h3 {
  margin-bottom: 9px;
  font-size: 20px;
  line-height: 1.25;
}

.project-card p {
  color: var(--muted);
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 14px;
}

.tag {
  border: 1px solid rgba(85, 199, 255, 0.26);
  border-radius: 999px;
  padding: 3px 8px;
  color: #b8e7ff;
  background: rgba(85, 199, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 800;
}

.project-link:hover {
  border-color: rgba(118, 185, 0, 0.55);
  color: var(--green);
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  color: var(--muted);
  font-size: 13px;
}

footer a {
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 820px) {
  .hero-grid,
  .section-head,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .summary-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .hero {
    padding-top: 48px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}
