:root {
  color-scheme: light;
  --bg: #f1ece2;
  --paper: rgba(250, 247, 240, 0.92);
  --paper-strong: rgba(255, 253, 248, 0.98);
  --ink: #13110d;
  --ink-soft: #6b6458;
  --accent: #2f493f;
  --accent-soft: #d8e0d8;
  --sand: #c8b087;
  --line: rgba(19, 17, 13, 0.12);
  --line-strong: rgba(19, 17, 13, 0.22);
  --shadow: 0 18px 45px rgba(40, 31, 19, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-display: "Baskerville", "Palatino Linotype", "Songti SC", "Noto Serif SC", serif;
  --font-body: "Avenir Next", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 24%),
    linear-gradient(135deg, #ece5d8 0%, #e8e8df 48%, #f4eee5 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 40px,
      rgba(47, 73, 63, 0.03) 40px,
      rgba(47, 73, 63, 0.03) 41px
    ),
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18));
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  width: min(1360px, calc(100vw - 30px));
  margin: 0 auto;
  padding: 36px 0 88px;
}

.hero-copy,
.hero-stats,
.featured-panel,
.toolbar,
.status-message,
.gallery-section,
.empty-state {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.85fr);
  margin-bottom: 20px;
}

.hero-copy,
.hero-stats,
.featured-panel,
.gallery-section,
.empty-state {
  border-radius: var(--radius-xl);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  padding: 36px 36px 30px;
}

.hero-copy::before {
  content: "01";
  position: absolute;
  right: 28px;
  bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(6rem, 16vw, 12rem);
  line-height: 0.9;
  color: rgba(19, 17, 13, 0.06);
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: 24px auto 24px 24px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(19, 17, 13, 0.16), transparent);
}

.eyebrow,
.section-eyebrow,
.card-category {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 0.76rem;
}

.eyebrow::before,
.section-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.hero-kicker {
  margin: 18px 0 0;
  color: var(--ink-soft);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1,
.featured-copy h2,
.section-title,
.card-title {
  font-family: var(--font-display);
}

.hero h1 {
  margin: 18px 0 0;
  max-width: 4ch;
  font-size: clamp(4.8rem, 9vw, 8.8rem);
  line-height: 0.78;
  letter-spacing: -0.08em;
  text-wrap: balance;
}

.hero-text {
  margin: 18px 0 0;
  max-width: 32ch;
  color: var(--ink-soft);
  font-size: 1.06rem;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  margin-top: 26px;
}

.hero-link,
.feature-link,
.action-button,
.category-chip,
.gallery-card {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.hero-link,
.feature-link,
.action-button,
.category-chip {
  text-decoration: none;
}

.hero-link:hover,
.feature-link:hover,
.action-button:hover,
.category-chip:hover,
.gallery-card:hover {
  transform: translateY(-2px);
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
}

.hero-link-primary,
.action-button {
  border: 0;
  background: var(--ink);
  color: #f7f2e8;
}

.hero-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(19, 17, 13, 0.08);
}

.hero-notes div {
  display: grid;
  gap: 4px;
}

.hero-notes dt,
.hero-notes dd {
  margin: 0;
}

.hero-notes dt {
  color: var(--ink-soft);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-notes dd {
  font-size: 1rem;
}

.hero-stats {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.stat-card {
  position: relative;
  min-height: 112px;
  padding: 18px 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--paper-strong);
  border: 1px solid rgba(19, 17, 13, 0.08);
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 22px;
  height: 1px;
  background: var(--sand);
}

.stat-label {
  display: block;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  letter-spacing: -0.04em;
}

.content {
  display: grid;
  gap: 20px;
}

.featured-panel {
  overflow: hidden;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.16fr);
  padding: 20px;
}

.featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent), var(--paper-strong);
  border: 1px solid rgba(19, 17, 13, 0.08);
}

.featured-copy h2 {
  margin: 10px 0 0;
  font-size: clamp(2.5rem, 3.4vw, 4.6rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.featured-meta,
.featured-path,
.section-summary,
.card-path {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.68;
}

.featured-path {
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.82rem;
}

.featured-actions {
  display: flex;
  margin-top: 8px;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: fit-content;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
}

.feature-link:hover {
  border-color: var(--ink);
  background: rgba(19, 17, 13, 0.04);
}

.featured-preview {
  position: relative;
  display: block;
  min-height: 500px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(47, 73, 63, 0.12), rgba(216, 224, 216, 0.5));
}

.featured-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.16), transparent 36%);
}

.featured-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
  transition: transform 520ms ease;
}

.featured-preview:hover .featured-image {
  transform: scale(1.025);
}

.featured-panel[data-empty="true"] .featured-preview {
  pointer-events: none;
}

.featured-panel[data-empty="true"] .feature-link {
  opacity: 0.42;
  pointer-events: none;
}

.toolbar {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
}

.search-box {
  display: grid;
  gap: 8px;
  width: min(520px, 100%);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.search-box input {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid rgba(19, 17, 13, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.search-box input:focus {
  outline: 2px solid rgba(47, 73, 63, 0.14);
  border-color: rgba(47, 73, 63, 0.28);
}

.action-button {
  cursor: pointer;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 999px;
}

.action-button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
}

.status-message {
  padding: 14px 18px;
  border-radius: 18px;
  color: var(--ink-soft);
  border-left: 3px solid rgba(47, 73, 63, 0.24);
}

.status-message.success {
  color: #1d5f3f;
}

.status-message.error {
  color: #882d14;
}

.status-message.warning {
  color: #7b5a12;
}

.category-nav {
  position: sticky;
  top: 16px;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0 2px;
}

.category-chip {
  cursor: pointer;
  padding: 11px 16px;
  border: 1px solid rgba(19, 17, 13, 0.1);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.74);
  color: var(--ink);
}

.category-chip[data-active="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #f7f2e8;
}

.gallery-sections {
  display: grid;
  gap: 20px;
  counter-reset: section;
}

.gallery-section {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.gallery-section::before {
  counter-increment: section;
  content: counter(section, decimal-leading-zero);
  position: absolute;
  right: 24px;
  top: 24px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.88;
  color: rgba(19, 17, 13, 0.06);
}

.section-header {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(19, 17, 13, 0.08);
}

.section-heading {
  display: grid;
  gap: 12px;
}

.section-title {
  margin: 0;
  font-size: clamp(2rem, 2.8vw, 3.4rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.section-summary {
  max-width: 420px;
  text-align: right;
}

.masonry-grid {
  column-width: 290px;
  column-gap: 18px;
}

.gallery-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  break-inside: avoid;
  background: var(--paper-strong);
  border: 1px solid rgba(19, 17, 13, 0.08);
  box-shadow: 0 12px 28px rgba(40, 31, 19, 0.06);
}

.gallery-card:hover {
  border-color: rgba(19, 17, 13, 0.16);
  box-shadow: 0 18px 38px rgba(40, 31, 19, 0.09);
}

.gallery-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(47, 73, 63, 0.14), rgba(216, 224, 216, 0.56));
}

.gallery-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.12), transparent 34%);
}

.gallery-image {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 520ms ease;
}

.gallery-card:hover .gallery-image {
  transform: scale(1.03);
}

.card-category {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 1;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(250, 247, 240, 0.9);
  color: var(--accent);
  font-size: 0.7rem;
  backdrop-filter: blur(12px);
}

.card-body {
  display: grid;
  gap: 12px;
  padding: 18px 18px 16px;
}

.card-title {
  margin: 0;
  font-size: 1.48rem;
  line-height: 0.96;
  letter-spacing: -0.04em;
  word-break: break-word;
}

.card-path {
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.8rem;
  word-break: break-all;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.card-meta div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(19, 17, 13, 0.05);
}

.card-meta dt,
.card-meta dd {
  margin: 0;
  font-size: 0.84rem;
}

.card-meta dt {
  color: var(--ink-soft);
}

.empty-state {
  padding: 72px 24px;
  text-align: center;
  color: var(--ink-soft);
}

.hero-copy,
.hero-stats,
.featured-panel,
.toolbar,
.status-message,
.gallery-section {
  animation: poster-rise 520ms ease both;
}

.hero-stats {
  animation-delay: 60ms;
}

.featured-panel {
  animation-delay: 110ms;
}

.toolbar {
  animation-delay: 150ms;
}

.status-message {
  animation-delay: 180ms;
}

@keyframes poster-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero,
  .featured-panel {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }

  .featured-preview,
  .featured-image {
    min-height: 360px;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100vw - 20px, 1360px);
    padding-top: 22px;
  }

  .toolbar,
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-copy {
    min-height: auto;
  }

  .hero-notes {
    grid-template-columns: 1fr;
  }

  .section-summary {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .hero-copy,
  .hero-stats,
  .featured-panel,
  .gallery-section,
  .empty-state {
    border-radius: 22px;
  }

  .hero-copy,
  .featured-panel,
  .gallery-section {
    padding: 18px;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 17vw, 6rem);
  }

  .featured-copy {
    padding: 18px;
  }

  .featured-preview,
  .featured-image {
    min-height: 260px;
  }

  .hero-actions,
  .featured-actions {
    flex-direction: column;
  }

  .hero-link,
  .feature-link,
  .action-button {
    width: 100%;
  }

  .category-nav {
    top: 10px;
  }

  .masonry-grid {
    column-width: 220px;
    column-gap: 14px;
  }

  .gallery-card {
    margin-bottom: 14px;
  }
}
