:root {
  --c21-black: #11100d;
  --c21-ink: #201e19;
  --c21-cream: #f4efe2;
  --c21-paper: #fffaf0;
  --c21-gold: #c6a247;
  --c21-gold-soft: #e3cc86;
  --c21-burgundy: #692f2d;
  --c21-muted: #746a59;
  --focus: #1f63b5;
  color-scheme: light;
  font-family: "Avenir Next", "Segoe UI", "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: var(--c21-cream);
  color: var(--c21-ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(17, 16, 13, 0.95) 0, rgba(17, 16, 13, 0.95) 132px, rgba(244, 239, 226, 0) 132px),
    var(--c21-cream);
  color: var(--c21-ink);
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand__logo {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(227, 204, 134, 0.55);
  background: var(--c21-black);
}

.catalog-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.toolbar {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(32, 30, 25, 0.12);
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 18px 60px rgba(17, 16, 13, 0.08);
}

.search {
  display: grid;
  gap: 8px;
}

.search__label {
  color: var(--c21-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.search__control {
  position: relative;
  display: block;
}

.search__icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 21px;
  height: 21px;
  transform: translateY(-50%);
  fill: var(--c21-muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(32, 30, 25, 0.24);
  border-radius: 0;
  padding: 12px 16px 12px 48px;
  background: #ffffff;
  color: var(--c21-ink);
}

.search input:focus {
  border-color: var(--c21-gold);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 18px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.project-item {
  min-width: 0;
}

.project-card {
  display: grid;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(32, 30, 25, 0.14);
  border-radius: 8px;
  background: var(--c21-paper);
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(17, 16, 13, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(105, 47, 45, 0.32);
  box-shadow: 0 18px 36px rgba(17, 16, 13, 0.13);
}

.project-card__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--c21-black);
}

.project-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__title {
  padding: 18px;
  color: var(--c21-black);
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 800;
}

.empty-state {
  margin: 32px 0 0;
  padding: 28px;
  border: 1px solid rgba(32, 30, 25, 0.14);
  background: var(--c21-paper);
  color: var(--c21-muted);
  text-align: center;
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, rgba(17, 16, 13, 0.96) 0, rgba(17, 16, 13, 0.96) 116px, rgba(244, 239, 226, 0) 116px),
      var(--c21-cream);
  }

  .site-header {
    padding: 18px 18px 0;
  }

  .catalog-shell {
    padding: 24px 18px 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
