:root {
  --ivory: #f5f0e7;
  --paper: #fbf9f4;
  --ink: #1c2924;
  --muted: #6d756d;
  --line: #cbd0c5;
  --green: #174635;
  --green-soft: #dfe8db;
  --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", STSong, serif;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 3;
  top: 1rem;
  left: 1rem;
  padding: .6rem .8rem;
  color: var(--paper);
  background: var(--green);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-header, main, .site-footer {
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 6.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: .02em;
}

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

.brand__mark {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  color: var(--paper);
  background: var(--green);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
}

.site-header__note, .eyebrow, .section-kicker, .project-card__meta, .result-count {
  margin: 0;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 24rem;
  padding: 3.5rem 0 3rem;
  overflow: hidden;
}

.hero::after {
  position: absolute;
  right: 3%;
  bottom: 4.7rem;
  width: min(29vw, 21rem);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.1rem var(--ivory), inset 0 0 0 1.2rem var(--line);
  content: "";
  opacity: .75;
}

.eyebrow span { color: var(--green); padding-inline: .35rem; }

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

h1 {
  position: relative;
  z-index: 1;
  max-width: 10em;
  margin: 1.25rem 0 1.8rem;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5.2vw, 4.8rem);
  font-weight: 500;
  letter-spacing: -.07em;
  line-height: 1.12;
}

.hero__intro {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  margin-bottom: 0;
  color: #46524b;
  font-size: 1.03rem;
  line-height: 1.9;
}

.catalog { padding: 2.1rem 0 6.5rem; }

.catalog__topline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.6rem;
  border-bottom: 2px solid var(--ink);
}

.section-kicker { margin-bottom: .65rem; color: var(--green); }

h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -.04em;
}

.result-count { padding-bottom: .35rem; white-space: nowrap; }

.filters {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.search-field {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 2.75rem;
  padding: 0 .8rem;
  background: var(--paper);
  border: 1px solid var(--line);
}

.search-field:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent); }

.search-field__icon { color: var(--green); font-family: var(--serif); font-size: 1.7rem; line-height: 1; transform: rotate(-18deg); }

.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }

.search-field input::placeholder { color: var(--muted); }

.category-list { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }

.category-button, .text-button {
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.category-button {
  padding: .55rem .7rem;
  border: 1px solid transparent;
  font-size: .8rem;
}

.category-button:hover, .category-button:focus-visible, .category-button.is-active { color: var(--paper); background: var(--green); outline: 0; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.project-card {
  display: flex;
  min-height: 22rem;
  flex-direction: column;
  padding: 1.35rem;
  background: var(--ivory);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  animation: card-enter .45s both;
  animation-delay: calc(var(--card-order) * 55ms);
}

.project-card[hidden] { display: none; }

.project-card:hover { background: var(--paper); }

.project-card__meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .64rem; letter-spacing: .08em; }

.project-card__meta span:last-child { color: var(--green); }

.project-card h2 { margin: 3.5rem 0 .4rem; font-size: 1.65rem; line-height: 1.12; }

.project-card__english { margin-bottom: 1.6rem; color: var(--green); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.project-card__description { max-width: 16em; margin-bottom: 1.3rem; color: #47524b; font-size: .92rem; line-height: 1.75; }

.project-card__tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: auto 0 1.5rem; padding: 0; list-style: none; }

.project-card__tags li { padding: .24rem .42rem; color: var(--muted); border: 1px solid var(--line); font-size: .68rem; }

.project-card__link { align-self: flex-start; color: var(--green); font-size: .84rem; font-weight: 700; text-decoration-color: color-mix(in srgb, var(--green) 35%, transparent); text-underline-offset: .35em; }

.project-card__link span { display: inline-block; margin-left: .15rem; transition: transform .2s ease; }

.project-card__link:hover span, .project-card__link:focus-visible span { transform: translate(.2rem, -.15rem); }

.empty-state { padding: 4rem 1.5rem; border-bottom: 1px solid var(--line); border-inline: 1px solid var(--line); text-align: center; }

.empty-state p:not(.section-kicker) { margin-bottom: 1rem; font-family: var(--serif); font-size: 1.35rem; }

.text-button { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: .3em; }

.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.6rem 0 2.4rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }

.site-footer p { margin-bottom: 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes card-enter { from { opacity: 0; transform: translateY(.7rem); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 830px) {
  .filters { grid-template-columns: 1fr; }
  .category-list { justify-content: flex-start; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .site-header, main, .site-footer { width: min(100% - 2rem, 1180px); }
  .site-header { min-height: 5.2rem; }
  .site-header__note { display: none; }
  .hero { min-height: 21rem; padding: 3rem 0 2rem; }
  .hero::after { right: -3.5rem; bottom: 1.5rem; width: 14rem; }
  .catalog { padding-bottom: 4.5rem; }
  .catalog__topline { align-items: flex-start; flex-direction: column; }
  .result-count { padding-bottom: 0; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 19rem; }
  .project-card h2 { margin-top: 2.6rem; }
  .site-footer { flex-direction: column; }
}

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