:root {
  --bg: #f7f6f1;
  --text: #121212;
  --muted: #6c6b66;
  --line: rgba(18,18,18,.17);
  --pad: clamp(18px, 2.5vw, 42px);
  --header-h: 78px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, video { display: block; width: 100%; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 var(--pad);
  background: rgba(247,246,241,.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.scrolled { border-color: var(--line); }
.brand { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.brand-tagline { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-nav { display: flex; gap: clamp(16px, 2.4vw, 34px); align-items: center; }
.main-nav a { position: relative; }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -4px;
  height: 1px; background: currentColor;
  transition: right .25s ease;
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { right: 0; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 8px 0; cursor: pointer; }
.page-shell { padding: 0 var(--pad) var(--pad); }
.hero {
  min-height: 34vh;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, .7fr);
  align-items: end;
  gap: 36px;
  padding: clamp(42px, 9vw, 128px) 0 clamp(38px, 5vw, 74px);
}
.hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(38px, 7.4vw, 124px);
  line-height: .93;
  letter-spacing: -.065em;
  font-weight: 500;
}
.hero-copy { max-width: 440px; color: var(--muted); font-size: clamp(14px, 1.2vw, 18px); }
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
}
.filter-button {
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease;
}
.filter-button:hover, .filter-button.active { color: var(--text); }
.filter-button.active::before { content: "● "; font-size: 8px; vertical-align: 1px; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(18px, 2vw, 34px) clamp(14px, 1.8vw, 28px);
}
.project-card { grid-column: span 4; opacity: 0; transform: translateY(18px); }
.project-card.revealed { opacity: 1; transform: none; transition: opacity .6s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.project-card.hidden { display: none; }
.project-card.layout-wide { grid-column: span 8; }
.project-card.layout-full { grid-column: 1 / -1; }
.project-card.layout-tall { grid-column: span 4; }
.project-media {
  position: relative;
  overflow: hidden;
  background: #deddd7;
  aspect-ratio: 4 / 3;
}
.layout-wide .project-media { aspect-ratio: 16 / 9; }
.layout-full .project-media { aspect-ratio: 2 / 1; }
.layout-tall .project-media { aspect-ratio: 4 / 5; }
.project-media img, .project-media video { height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .45s ease; }
.project-card:hover .project-media img, .project-card:hover .project-media video { transform: scale(1.018); filter: brightness(.93); }
.project-meta { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding-top: 10px; }
.project-title { font-size: 14px; font-weight: 600; }
.project-subtitle, .project-year { color: var(--muted); }
.project-subtitle { margin-top: 1px; }
.empty-state { grid-column: 1 / -1; padding: 80px 0; color: var(--muted); border-top: 1px solid var(--line); }
.footer {
  margin-top: clamp(90px, 14vw, 210px);
  padding: 22px 0 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.content-page { min-height: calc(100vh - var(--header-h)); padding: clamp(64px, 10vw, 150px) var(--pad) var(--pad); }
.content-heading { max-width: 1100px; margin: 0 0 clamp(50px, 8vw, 110px); font-size: clamp(46px, 9vw, 140px); line-height: .92; letter-spacing: -.065em; font-weight: 500; }
.about-grid, .contact-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.about-copy { grid-column: 5 / span 6; font-size: clamp(18px, 2.1vw, 32px); line-height: 1.38; letter-spacing: -.02em; white-space: pre-line; }
.about-label { grid-column: 1 / span 3; color: var(--muted); }
.contact-list { grid-column: 5 / span 6; font-size: clamp(24px, 4vw, 66px); line-height: 1.15; letter-spacing: -.04em; }
.contact-list a { display: table; border-bottom: 1px solid var(--line); }
.project-page { padding: 0 var(--pad) var(--pad); }
.project-head {
  min-height: 45vh;
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  align-items: end;
  gap: 38px;
  padding: clamp(70px, 11vw, 170px) 0 clamp(42px, 6vw, 88px);
}
.project-head h1 { margin: 0; font-size: clamp(52px, 9vw, 150px); line-height: .9; letter-spacing: -.07em; font-weight: 500; }
.project-info { display: grid; gap: 14px; align-self: end; }
.project-info-row { display: grid; grid-template-columns: 84px 1fr; gap: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.project-info-label { color: var(--muted); }
.project-description { margin-top: 24px; font-size: clamp(17px, 1.6vw, 24px); }
.project-gallery { display: grid; gap: clamp(18px, 3vw, 48px); }
.gallery-item { margin: 0; }
.gallery-item img, .gallery-item video { max-height: 92vh; object-fit: contain; background: #e5e3dc; }
.gallery-caption { padding-top: 8px; color: var(--muted); }
.project-pagination { display: grid; grid-template-columns: 1fr 1fr; margin-top: clamp(80px, 12vw, 180px); border-top: 1px solid var(--line); }
.project-pagination a { padding: 18px 0 34px; }
.project-pagination a:last-child { text-align: right; }
.error-message { padding: 100px var(--pad); font-size: 18px; }
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .brand-tagline { display: none; }
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    padding: 24px var(--pad) 34px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    font-size: 22px;
  }
  .main-nav.open { display: flex; }
  .hero, .project-head { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 62px; }
  .project-head { min-height: auto; }
  .project-card, .project-card.layout-wide, .project-card.layout-tall { grid-column: span 6; }
  .project-card.layout-full { grid-column: 1 / -1; }
  .about-copy, .contact-list { grid-column: 4 / span 9; }
}
@media (max-width: 620px) {
  .site-header { grid-template-columns: 1fr auto; }
  .hero h1 { font-size: clamp(48px, 18vw, 92px); }
  .hero-copy { max-width: 90%; }
  .work-grid { gap: 28px 0; }
  .project-card, .project-card.layout-wide, .project-card.layout-tall, .project-card.layout-full { grid-column: 1 / -1; }
  .project-media, .layout-wide .project-media, .layout-full .project-media { aspect-ratio: 4 / 3; }
  .layout-tall .project-media { aspect-ratio: 4 / 5; }
  .about-label, .about-copy, .contact-list { grid-column: 1 / -1; }
  .about-copy, .contact-list { margin-top: 42px; }
  .project-info-row { grid-template-columns: 72px 1fr; }
  .project-pagination { grid-template-columns: 1fr; }
  .project-pagination a:last-child { text-align: left; border-top: 1px solid var(--line); }
  .footer { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}



/* Unlimited-level category filters */
.filter-stack { border-top: 1px solid var(--line); padding: 14px 0 22px; }
.filter-levels { display: grid; gap: 0; }
.filter-level-row { border-top: 0; padding: 5px 0; }
.filter-level-row + .filter-level-row { margin-top: 5px; padding-top: 10px; border-top: 1px dashed var(--line); }
.filter-level-row::before { content: attr(data-level) "级"; min-width: 30px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.project-category-path { margin-top: 4px; color: var(--muted); font-size: 11px; }
@media (max-width: 620px) {
  .filter-level-row::before { width: 100%; min-width: 100%; margin-bottom: 1px; }
}
