:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #0d0d0f;
  --panel-hover: #151517;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --dim: #6e6e73;
  --line: rgba(245, 245, 247, 0.14);
  --line-strong: rgba(245, 245, 247, 0.28);
  --blue: #2997ff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; }
button, input { font: inherit; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(18px);
}

.site-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: min(1120px, 100%);
  height: 52px;
  align-items: center;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-identity, .nav-actions { display: flex; align-items: center; }
.nav-identity { min-width: 0; gap: 12px; }
.brand { display: inline-flex; width: 106px; align-items: center; }
.brand img { display: block; width: 106px; height: auto; }
.nav-divider { width: 1px; height: 18px; background: var(--line-strong); }
.page-name { overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.nav-actions { justify-content: flex-end; gap: 18px; }
.home-link { color: var(--muted); font-size: 12px; text-decoration: none; white-space: nowrap; }
.home-link:hover { color: var(--text); }
.nav-cta {
  padding: 7px 15px;
  border-radius: 999px;
  background: #0071e3;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
}

main, .site-footer { width: min(1120px, 100%); margin: 0 auto; padding-right: 24px; padding-left: 24px; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 70px;
  align-items: end;
  padding-top: 88px;
  padding-bottom: 72px;
  border-bottom: 1px solid var(--line);
}

.eyebrow { margin: 0 0 14px; color: var(--blue); font-size: 12px; font-weight: 600; }
.intro h1 { max-width: 720px; margin: 0; font-size: 48px; line-height: 1.08; font-weight: 650; }
.intro h1 span { display: block; }
.intro-copy > p:last-child { max-width: 700px; margin: 22px 0 0; color: var(--muted); font-size: 16px; line-height: 1.75; }

.portfolio-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.portfolio-stats div { min-height: 100px; padding: 20px 16px; background: var(--panel); }
.portfolio-stats dt { font-size: 30px; line-height: 1; font-weight: 650; }
.portfolio-stats dd { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }

.portfolio-section { padding: 82px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; gap: 30px; align-items: end; justify-content: space-between; margin-bottom: 30px; }
.section-heading h2 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 620; }
.result-count { margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }

.collection-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 340px;
  margin-bottom: 30px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}
.collection-tab {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.collection-tab:hover { color: var(--text); }
.collection-tab[aria-selected="true"] { background: var(--text); color: #000; }
.collection-tab span { margin-left: 5px; color: inherit; font-size: 11px; opacity: .68; }

.portfolio-tools { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: end; margin-bottom: 28px; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.category-tab {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.category-tab:hover { color: var(--text); border-color: var(--line-strong); }
.category-tab[aria-selected="true"] { border-color: var(--text); background: var(--text); color: #000; }

.search-field { display: grid; gap: 7px; }
.search-field span { color: var(--dim); font-size: 11px; }
.search-field input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 6px; outline: none; background: var(--panel); color: var(--text); padding: 0 12px; }
.search-field input:focus { border-color: var(--blue); }

.portfolio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.work-card { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.work-card:hover { border-color: var(--line-strong); background: var(--panel-hover); }
.work-poster { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.work-poster img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.work-card:hover .work-poster img { transform: scale(1.025); }
.work-card.is-portrait .work-poster img { object-position: center 30%; }
.work-meta { padding: 17px; }
.work-kicker { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 9px; color: var(--dim); font-size: 11px; }
.work-title { min-height: 48px; margin: 0; font-size: 17px; line-height: 1.42; font-weight: 570; }
.work-action { width: 100%; height: 36px; margin-top: 16px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--text); cursor: pointer; }
.work-action:hover { border-color: var(--blue); color: var(--blue); }
.portfolio-grid.is-artworks {
  display: block;
  column-count: 4;
  column-gap: 14px;
}
.portfolio-grid.is-artworks .work-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  break-inside: avoid;
}
.work-card.is-artwork .work-poster { aspect-ratio: auto; }
.work-card.is-artwork .work-poster img { object-fit: cover; }
.work-card.is-artwork .work-meta { padding: 14px; }
.work-card.is-artwork .work-title { min-height: 0; font-size: 15px; }
.work-card.is-artwork .work-action { margin-top: 13px; }
.empty-state { min-height: 180px; margin: 0; place-items: center; color: var(--muted); text-align: center; }
.empty-state:not([hidden]) { display: grid; }

.contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; margin: 68px 0; padding: 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.contact h2 { margin: 0; font-size: 28px; line-height: 1.2; }
.contact > div > p:last-child { max-width: 680px; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.contact-actions { display: flex; gap: 10px; }
.primary-action, .secondary-action { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 18px; border-radius: 999px; font-size: 13px; text-decoration: none; white-space: nowrap; }
.primary-action { background: #0071e3; color: #fff; }
.secondary-action { border: 1px solid var(--line); }

.site-footer { display: flex; gap: 20px; justify-content: space-between; padding-top: 26px; padding-bottom: 38px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer p { margin: 0; }

.media-dialog { width: min(1180px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: #070708; color: var(--text); }
.media-dialog::backdrop { background: rgba(0, 0, 0, .82); backdrop-filter: blur(10px); }
.dialog-bar { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.dialog-bar p { margin: 0 0 4px; color: var(--blue); font-size: 11px; }
.dialog-bar h2 { margin: 0; font-size: 18px; line-height: 1.25; }
.dialog-controls { display: flex; flex: 0 0 auto; gap: 8px; }
.dialog-nav, .dialog-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.dialog-nav:hover, .dialog-close:hover { border-color: var(--line-strong); background: var(--panel-hover); }
.dialog-close { font-size: 22px; line-height: 1; }
.dialog-media { display: grid; min-height: 160px; place-items: center; overflow: auto; background: #000; }
.media-dialog video { display: block; width: 100%; max-height: calc(100vh - 110px); background: #000; }
.media-dialog img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 110px); object-fit: contain; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: 34px; padding-top: 68px; }
  .intro h1 { font-size: 42px; }
  .portfolio-stats { max-width: 560px; }
  .portfolio-tools { grid-template-columns: 1fr; gap: 20px; }
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-grid.is-artworks { column-count: 3; }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-nav { padding: 0 16px; }
  .nav-identity { gap: 9px; }
  .brand, .brand img { width: 98px; }
  .page-name { display: none; }
  .nav-actions { gap: 12px; }
  .nav-cta { padding-right: 12px; padding-left: 12px; }
  main, .site-footer { padding-right: 16px; padding-left: 16px; }
  .intro { padding-top: 54px; padding-bottom: 50px; }
  .intro h1 { font-size: 34px; }
  .portfolio-stats { grid-template-columns: 1fr 1fr 1fr; }
  .portfolio-stats div { min-height: 88px; padding: 16px 10px; }
  .portfolio-stats dt { font-size: 25px; }
  .portfolio-section { padding: 58px 0; }
  .section-heading { align-items: start; }
  .section-heading h2 { font-size: 25px; }
  .collection-tabs { display: grid; min-width: 0; width: 100%; margin-bottom: 24px; }
  .portfolio-tools { grid-template-columns: 1fr; gap: 20px; }
  .category-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
  .category-tabs::-webkit-scrollbar { display: none; }
  .category-tab { flex: 0 0 auto; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-grid.is-artworks { column-count: 2; column-gap: 10px; }
  .portfolio-grid.is-artworks .work-card { margin-bottom: 10px; }
  .work-card.is-artwork .work-meta { padding: 12px; }
  .work-card.is-artwork .work-kicker { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .work-card.is-artwork .work-kicker span:last-child { display: none; }
  .work-card.is-artwork .work-title { font-size: 14px; }
  .work-title { min-height: 0; }
  .contact { margin: 50px 0; padding: 24px 20px; }
  .contact-actions { align-items: stretch; flex-direction: column; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .work-poster img { transition: none; }
}
