:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-hover: #243044;
  --text: #f2f5f8;
  --muted: #9aabbc;
  --accent: #3d9cf0;
  --accent-soft: rgba(61, 156, 240, 0.15);
  --gold: #e8c27a;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --max: 1180px;
  --font: "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(ellipse at top, #1a2740 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(15, 20, 25, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  color: var(--text);
  text-decoration: none;
}
.brand strong {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.brand span {
  font-size: 0.8rem;
  color: var(--muted);
}
.nav-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
  border: 1px solid transparent;
}
.nav-links a:hover {
  background: var(--accent-soft);
  border-color: rgba(61, 156, 240, 0.35);
  text-decoration: none;
}
.nav-links a.primary {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.nav-links a.primary:hover {
  filter: brightness(1.08);
  background: var(--accent);
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.75rem 1.25rem 1.5rem;
}
.hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
}
.hero p {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}
.stat {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  min-width: 7.5rem;
}
.stat b {
  display: block;
  font-size: 1.35rem;
  color: var(--gold);
}
.stat span {
  font-size: 0.82rem;
  color: var(--muted);
}

.filters {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.5rem 1.25rem 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filter-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-soft);
  border-color: rgba(61, 156, 240, 0.45);
  color: #fff;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 0.5rem;
}
.section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}
.section .lead {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.1rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 156, 240, 0.4);
  background: var(--surface-hover);
  text-decoration: none;
}
.card-cover {
  aspect-ratio: 16 / 11;
  background: #0a0e14 center/cover no-repeat;
  position: relative;
}
.card-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}
.card-body {
  padding: 0.95rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.card-body h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
}
.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.badge {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--accent-soft);
  color: #b8d9f8;
  border: 1px solid rgba(61, 156, 240, 0.25);
}

.site-footer {
  max-width: var(--max);
  margin: 2.5rem auto 0;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Collection lightbox gallery */
.gallery-page .hero { padding-bottom: 0.5rem; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
}
.photo-grid a {
  display: block;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0e14 center/cover no-repeat;
}
.photo-grid a:hover { outline: 2px solid var(--accent); }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(96vw, 1200px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.lightbox .close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #fff;
  font-size: 1.6rem;
  background: transparent;
  border: 0;
  cursor: pointer;
}

[hidden] { display: none !important; }

@media (max-width: 640px) {
  .hero { padding-top: 1.75rem; }
  .card-body h3 { font-size: 0.98rem; }
}
