:root {
  color-scheme: light;
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-soft: #f1eee7;
  --text: #161817;
  --muted: #696f6b;
  --line: #dedbd2;
  --teal: #1f9f91;
  --coral: #c75c4d;
  --gold: #a88436;
  --shadow: 0 18px 50px rgba(30, 34, 32, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 62px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #fbfaf6;
  isolation: isolate;
}

.hero__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    /* linear-gradient(90deg, rgba(248, 247, 243, 0.96) 0%, rgba(248, 247, 243, 0.78) 34%, rgba(248, 247, 243, 0.18) 72%), */
    linear-gradient(180deg, rgba(248, 247, 243, 0.1) 0%, rgba(248, 247, 243, 1.0) 100%);
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 auto;
  padding: 8px max(20px, calc(10%));
  background: rgba(var(--bg-color), 0.9);
  box-shadow: 0 8px 24px rgba(30, 34, 32, 0.08);
  backdrop-filter: blur(.4rem);

}

.brand,
.topbar__link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: rgba(22, 24, 23, 0.8);
}

.brand {
  gap: 12px;
  /* padding: 0 20px;
  background: rgba(22, 24, 23, 0.8);
  color: #fff; */
  font-weight: 700;
}

.brand__mark {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  background:
    linear-gradient(currentColor 0 0) left bottom / 4px 8px no-repeat,
    linear-gradient(currentColor 0 0) center bottom / 4px 14px no-repeat,
    linear-gradient(currentColor 0 0) right bottom / 4px 11px no-repeat;
}

.topbar__link {
  border-bottom: 1px solid rgba(22, 24, 23, 0.24);
  font-size: 13px;
}

.hero__content {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 62px 0 42px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 640px;
  margin-bottom: 12px;
  font-size: clamp(58px, 10vw, 118px);
  line-height: 0.95;
}

.title-gradient {
  display: table;
  background:
    linear-gradient(
      100deg,
      #0f766e 0%,
      #1f9f91 20%,
      #c75c4d 42%,
      #a88436 62%,
      #3759b8 82%,
      #0f766e 100%
    );
  background-size: 280% 100%;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: titleGradientFlow 8s ease-in-out infinite alternate;
}

.subtitle {
  margin-bottom: 28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 4.4vw, 56px);
}

@keyframes titleGradientFlow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

.intro {
  max-width: 610px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 82px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 28px;
  align-items: end;
  margin-bottom: 22px;
  scroll-margin-top: 62px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
}

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

.search label,
.filter-label {
  color: var(--muted);
  font-size: 13px;
}

.search input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: none;
}

.search input:focus {
  border-color: rgba(31, 159, 145, 0.62);
  box-shadow: 0 0 0 4px rgba(31, 159, 145, 0.1);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(150px, 0.5fr) minmax(280px, 1.4fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.filter-group {
  display: grid;
  gap: 10px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: #fff;
  color: rgba(22, 24, 23, 0.74);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.tag-button:hover,
.tag-button.is-active {
  border-color: rgba(31, 159, 145, 0.42);
  background: #e9f6f3;
  color: #0d5f57;
}

.result-count {
  margin: 29px 0 0;
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.work-card {
  display: grid;
  overflow: hidden;
  min-height: 410px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.work-card:hover {
  transform: translateY(-3px);
  border-color: rgba(31, 159, 145, 0.34);
  box-shadow: 0 22px 60px rgba(30, 34, 32, 0.12);
}

.work-card__media {
  position: relative;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  background: var(--surface-soft);
}

.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.work-card:hover img {
  transform: scale(1.035);
}

.work-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

.work-card__category {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.work-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
}

.work-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-card__tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
}

.empty {
  padding: 42px 0;
  color: var(--muted);
  text-align: center;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .controls,
  .filter-panel,
  .gallery {
    grid-template-columns: 1fr;
  }

  .result-count {
    margin-top: 0;
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .hero__content,
  main,
  .footer {
    width: min(100% - 28px, 1180px);
  }

  .topbar {
    padding: 8px 14px;
  }

  .hero__content {
    padding-top: 58px;
  }

  .work-card {
    min-height: 350px;
  }

  .footer {
    flex-direction: column;
  }
}
