/* 這厘空间摄影 —— 极简空间摄影作品集 */

:root {
  --paper: #171b22;
  --ink: #eeece7;
  --soft: #b8b5af;
  --muted: #8b8983;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #c2a37c;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(1000px 520px at 50% -8%, rgba(60, 96, 158, 0.35) 0%, rgba(60, 96, 158, 0) 70%),
    linear-gradient(180deg, #1d2f4f 0%, #11141a 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- 顶栏 ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(18, 24, 34, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px clamp(20px, 5vw, 56px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.brand-cn {
  font-size: 15px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.brand-en {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: flex;
  gap: 30px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--soft);
}

.site-nav a:hover {
  color: var(--ink);
}

/* ---------- 首页顶部 ---------- */

.intro {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(120px, 17vh, 200px) clamp(20px, 5vw, 56px) clamp(60px, 9vh, 100px);
  animation: rise 0.9s var(--ease) both;
}

.intro-mark {
  margin: 0 0 30px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.intro-mark::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin-right: 14px;
  vertical-align: middle;
  background: var(--accent);
}

.intro h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.2;
  background-image: linear-gradient(180deg, #f7f6f2 0%, #a7aab1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: clamp(16px, 3vh, 28px) 0 0;
  font-size: clamp(16px, 2vw, 20px);
  letter-spacing: 0.14em;
  color: var(--soft);
}

.since {
  margin: 38px 0 0;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 分类按钮 ---------- */

.works {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px) clamp(70px, 10vh, 120px);
}

.works-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.works-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--soft);
}

.works-label span {
  margin-left: 12px;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.works-note {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 18px;
}

.filter-btn {
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--soft);
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.filter-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.filter-btn .count {
  margin-left: 7px;
  font-size: 10px;
  opacity: 0.55;
}

/* ---------- 合集 ---------- */

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px) clamp(20px, 3vw, 40px);
  margin-top: clamp(36px, 6vh, 64px);
  counter-reset: colcard;
}

.collection-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  animation: cardIn 0.7s var(--ease) forwards;
}

/* 合集序号 */
.collection-card::before {
  counter-increment: colcard;
  content: counter(colcard, decimal-leading-zero);
  position: absolute;
  top: 13px;
  left: 15px;
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(238, 236, 231, 0.62);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1e232b;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.4s var(--ease);
}

.collection-card:hover .card-media {
  border-color: rgba(194, 163, 124, 0.42);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.card-media:hover img {
  transform: scale(1.04);
}

.card-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(16, 21, 29, 0.72);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--soft);
  backdrop-filter: blur(6px);
}

.card-text {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.08em;
  font-weight: 400;
  transition: color 0.3s var(--ease);
}

.collection-card:hover .card-title {
  color: var(--accent);
}

.card-desc {
  margin: 4px 0 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.card-cat {
  flex: none;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.empty-state {
  padding: 70px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px clamp(20px, 5vw, 56px) 34px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.footer-name {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 0.14em;
  background-image: linear-gradient(180deg, #f2f1ed 0%, #9fa3aa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-line {
  margin: 8px 0 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--soft);
}

.footer-contact a:hover {
  color: var(--accent);
}

.footer-contact span {
  color: var(--muted);
  font-size: 11px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 44px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.admin-link {
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.admin-link:hover {
  color: var(--ink);
}

/* ---------- 灯箱 ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(8, 9, 11, 0.97);
  padding: clamp(48px, 8vh, 84px) clamp(16px, 6vw, 92px) 22px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.lightbox.is-open {
  opacity: 1;
}

.lightbox[hidden] {
  display: none;
}

.lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.lb-stage img.is-ready {
  opacity: 1;
}

.lb-caption {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  color: #f2f0ea;
}

.lb-title {
  margin: 0 0 3px;
  font-size: 15px;
  letter-spacing: 0.1em;
}

.lb-meta {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(250, 249, 246, 0.5);
}

.lb-count {
  margin: 0;
  flex: none;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(250, 249, 246, 0.5);
}

.lb-close,
.lb-nav {
  position: absolute;
  z-index: 2;
  color: #f2f0ea;
  opacity: 0.65;
  transition: opacity 0.25s var(--ease), border-color 0.25s var(--ease);
}

.lb-close:hover,
.lb-nav:hover {
  opacity: 1;
}

.lb-close {
  top: clamp(10px, 3vh, 26px);
  right: clamp(12px, 3vw, 30px);
  padding: 8px;
  font-size: 28px;
  line-height: 1;
}

.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(250, 249, 246, 0.25);
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.lb-nav:hover {
  border-color: rgba(250, 249, 246, 0.65);
}

.lb-prev {
  left: clamp(8px, 2vw, 28px);
}

.lb-next {
  right: clamp(8px, 2vw, 28px);
}

/* ---------- 响应式 ---------- */

@media (max-width: 720px) {
  .brand-en {
    display: none;
  }

  .site-nav {
    gap: 20px;
  }

  .intro {
    padding-top: 96px;
  }

  .intro h1 {
    font-size: clamp(30px, 9vw, 44px);
    letter-spacing: 0.08em;
  }

  .tagline {
    letter-spacing: 0.1em;
  }

  .works {
    padding-left: 16px;
    padding-right: 16px;
  }

  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 12px;
    margin-top: 26px;
  }

  .card-text {
    gap: 8px;
    padding-top: 10px;
  }

  .card-title {
    font-size: 13px;
    letter-spacing: 0.04em;
  }

  .card-desc {
    margin-top: 2px;
    font-size: 10px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-cat {
    padding: 2px 7px;
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .card-count {
    right: 8px;
    bottom: 8px;
    padding: 3px 8px;
    font-size: 9px;
  }

  .collection-card::before {
    top: 9px;
    left: 10px;
    font-size: 9px;
  }

  .footer-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-contact {
    align-items: flex-start;
  }

  .lb-nav {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .lb-count {
    display: none;
  }
}

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