/* ════════════════════════════════════════════════════════════
   WORKS LIST PAGE STYLES
   ════════════════════════════════════════════════════════════ */

/* Hero Section */
.works-hero {
  padding: clamp(60px, 10vw, 100px) 0;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.works-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
}

.works-hero-title {
  font-family: var(--sans-cn);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 72px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.works-hero-sub {
  font-family: var(--sans-cn);
  font-size: clamp(16px, 2vw, 20px);
  color: var(--ink-3);
  letter-spacing: 0.06em;
  margin-top: 12px;
}

/* Filter Bar */
.filter-bar {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 70px;
  background: var(--paper);
  z-index: 90;
}

.filter-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.filter-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 8px 18px;
  font-family: var(--sans-cn);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  background: var(--paper-3);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .3s;
}

.filter-tag:hover {
  background: var(--paper);
  color: var(--ink);
}

.filter-tag.active {
  background: var(--blue-6);
  color: var(--paper);
  border-color: var(--blue-6);
}

/* Works Grid */
.works-container {
  padding: clamp(40px, 6vw, 60px) 0;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.work-card {
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transition: transform .4s, box-shadow .4s;
  display: flex;
  flex-direction: column;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26,26,26,0.08);
}

.work-card.featured {
  grid-column: span 2;
  flex-direction: row;
}

.work-cover {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.work-cover img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform .6s ease;
}

.work-card:hover .work-cover img {
  transform: scale(1.05);
}

.work-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.6));
  opacity: 0;
  transition: opacity .3s;
}

.work-card:hover .work-cover-overlay {
  opacity: 1;
}

.work-info {
  padding: 20px 22px;
  border-top: 1px solid var(--line);
}

.work-card.featured .work-info {
  padding: 24px;
  border-top: none;
  border-left: 1px solid var(--line);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.work-category {
  font-family: var(--sans-cn);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--ink-4);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.work-title {
  font-family: var(--sans-cn);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 6px;
}

.work-card.featured .work-title {
  font-size: 26px;
}

.work-title-en {
  font-family: var(--sans-cn);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.work-desc {
  font-family: var(--sans-cn);
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
  font-weight: 300;
  margin-bottom: 14px;
}

.work-card.featured .work-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.work-year {
  font-family: var(--sans-cn);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-4);
}

.work-tags {
  display: flex;
  gap: 8px;
}

.work-tag {
  padding: 4px 10px;
  font-family: var(--sans-cn);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--paper);
  border-radius: 2px;
}

/* ════════════════════════════════════════════════════════════
   WORK DETAIL PAGE STYLES
   ════════════════════════════════════════════════════════════ */

/* Detail Hero */
.detail-hero {
  padding: clamp(40px, 6vw, 60px) 0;
  background: var(--paper-2);
}

.detail-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.detail-back-link {
  font-family: var(--sans-cn);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .3s;
}

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

.detail-category {
  font-family: var(--sans-cn);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.detail-title-block {
  flex: 1;
}

.detail-title {
  font-family: var(--sans-cn);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.detail-title-en {
  font-family: var(--sans-cn);
  font-size: clamp(16px, 2vw, 20px);
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.detail-tags {
  display: flex;
  gap: 12px;
}

.detail-meta .detail-tags {
  margin-top: 0;
}

.detail-tag {
  padding: 6px 16px;
  font-family: var(--sans-cn);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--paper);
  border-radius: 2px;
}

.detail-meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  font-family: var(--sans-cn);
  font-size: 13px;
  color: var(--ink-3);
}

.detail-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-meta span::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-4);
}

/* Featured Media */
.detail-featured {
  margin: 40px 0;
}

.featured-media {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--paper-3);
  overflow: hidden;
}

.featured-media img,
.featured-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-caption {
  margin-top: 16px;
  font-family: var(--sans-cn);
  font-size: 14px;
  color: var(--ink-3);
  text-align: center;
}

/* Content Sections */
.detail-content {
  padding: var(--section) 0;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  box-sizing: border-box;
}

.detail-content .wrap {
  width: 100%;
  padding: 0 var(--gutter);
  max-width: 1320px;
  margin: 0 auto;
}

.insight-detail-page .detail-content {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

.insight-detail-page .detail-content .wrap {
  width: 100%;
  max-width: 1320px;
  padding: 0 var(--gutter);
  margin: 0 auto;
}

.insight-detail-page .content-text {
  max-width: 800px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.insight-detail-page .content-image {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.content-block {
  margin-bottom: 48px;
}

.content-block:last-child {
  margin-bottom: 0;
}

/* Heading */
.content-heading {
  font-family: var(--sans-cn);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

/* Text */
.content-text {
  max-width: 799px;
  margin: 32px auto;
  font-family: var(--sans-cn);
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-2);
  font-weight: 300;
}

.content-text p {
  margin-bottom: 1.0em;
}

.content-text p:last-child {
  margin-bottom: 0;
}

.content-text strong {
  font-weight: 600;
  color: var(--ink);
}

/* Image */
.content-image {
  width: 100%;
  margin: 32px 0;
  padding: 0;
  overflow: hidden;
}

.content-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.content-image-caption {
  margin-top: 16px;
  font-family: var(--sans-cn);
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
}

/* Video */
.content-video {
  width: 100%;
  max-height: 80vh;
  margin: 32px auto;
  background: var(--paper-3);
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/9;
}

.content-video video {
  width: 100%;
  max-height: 80vh;
  height: auto;
  object-fit: contain;
  display: block;
}

.video-caption {
  padding: 16px;
  font-family: var(--sans-cn);
  font-size: 14px;
  color: var(--ink-3);
  text-align: center;
  background: var(--paper);
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity .3s;
}

.video-overlay:hover {
  opacity: 0.8;
}

.video-play-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s;
}

.video-overlay:hover .video-play-btn {
  transform: scale(1.1);
}

.video-play-btn::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 18px solid var(--ink);
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 4px;
}

/* Gallery */
.content-gallery {
  width: 100%;
  margin: 32px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Gallery Video */
.gallery-video {
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/9;
  background: var(--paper-3);
}

.gallery-video video {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

/* 单张图片布局样式 */
.gallery-single {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.gallery-single .gallery-item {
  width: 100%;
  max-width: 100%;
}

.gallery-item {
  width: 100%;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  max-width: 100%;
  /* 确保图片在任何尺寸下都能正确缩放 */
  object-fit: contain;
}

/* 瀑布型布局 - 单列垂直排列，无间距 */
.gallery-waterfall {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gallery-waterfall .gallery-item {
  width: 100%;
}

.gallery-waterfall .gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

.gallery-slider {
  position: relative;
}

.gallery-image-wrapper {
  aspect-ratio: 4/3;
  overflow: hidden;
}

.gallery-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-caption {
  margin-top: 8px;
  font-family: var(--sans-cn);
  font-size: 12px;
  color: var(--ink-4);
  text-align: center;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}

.slider-nav button {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: all .3s;
}

.slider-nav button:hover {
  background: var(--paper);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Quote */
.content-quote {
  padding: 40px 48px;
  background: var(--paper-2);
  border-left: 3px solid var(--blue);
  margin: 32px 0;
}

.content-quote.large {
  padding: 56px 64px;
}

.quote-text {
  font-family: var(--sans-cn);
  font-size: clamp(18px, 2.5vw, 26px);
  line-height: 1.8;
  color: var(--ink-2);
  font-weight: 300;
  font-style: italic;
}

.quote-author {
  margin-top: 20px;
  font-family: var(--sans-cn);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  text-transform: uppercase;
}

/* Divider */
.content-divider {
  margin: 40px 0;
}

.divider-line {
  height: 1px;
  background: var(--line);
}

.divider-line.dashed {
  background: none;
  border-bottom: 1px dashed var(--line-2);
}

.divider-line.dotted {
  background: none;
  border-bottom: 1px dotted var(--line-2);
}

/* GIF Display */
.content-gif {
  width: 100%;
  display: flex;
  justify-content: center;
  background: var(--paper-3);
  padding: 24px;
}

.content-gif img {
  max-width: 100%;
  height: auto;
}

/* Related Works */
.related-works {
  padding: var(--section) 0;
  border-top: 1px solid var(--line);
}

.related-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.related-title {
  font-family: var(--sans-cn);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.06em;
}

.related-link {
  font-family: var(--sans-cn);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .3s;
}

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

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.related-card {
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s;
}

.related-card:hover {
  transform: translateY(-4px);
}

.related-cover {
  aspect-ratio: 4/3;
  overflow: hidden;
}

.related-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.related-card:hover .related-cover img {
  transform: scale(1.05);
}

.related-info {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.related-title-cn {
  font-family: var(--sans-cn);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.related-title-en {
  font-family: var(--sans-cn);
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 2px;
}

/* ════════════════════════════════════════════════════════════
   LARGE SCREEN ADJUSTMENTS (WORK DETAIL ONLY)
   ════════════════════════════════════════════════════════════ */

@media (min-width: 1650px) {
  .work-detail .content-image {
    width: 80vw;
    margin-left: calc((100% - 80vw) / 2);
    margin-right: calc((100% - 80vw) / 2);
  }

  .work-detail .content-image img {
    width: 100%;
    max-width: none;
  }

  .work-detail .content-image .image-caption {
    width: 100%;
    max-width: 80vw;
    margin-left: auto;
    margin-right: auto;
  }

  .work-detail .content-gallery {
    width: 80vw;
    margin-left: calc((100% - 80vw) / 2);
    margin-right: calc((100% - 80vw) / 2);
  }

  .work-detail .content-gallery .gallery-item img {
    width: 100%;
    max-width: none;
  }

  .work-detail .content-gallery .gallery-caption {
    width: 100%;
    max-width: 80vw;
    margin-left: auto;
    margin-right: auto;
  }

  .insight-detail-page .content-image {
    width: auto;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }

  .insight-detail-page .content-image img {
    max-width: 100%;
    width: 100%;
  }

  .insight-detail-page .content-image .image-caption {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ════════════════════════════════════════════════════════════ */

@media (max-width: 800px) {
  .filter-bar {
    position: fixed;
    width: 100%;
    top: 70px;
    z-index: 90;
  }

  .works-container {
    margin-top: 70px;
  }
}

@media (max-width: 900px) {
  .work-card.featured {
    grid-column: span 1;
    flex-direction: column;
  }
  
  .work-card.featured .work-info {
    border-left: none;
    border-top: 1px solid var(--line);
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .content-image.full-width {
    width: 100%;
    margin: 24px 0;
  }
  
  .content-quote {
    padding: 24px;
  }
  
  .content-quote.large {
    padding: 32px;
  }
  
  .content-image,
  .content-gallery,
  .content-video {
    width: 100%;
    margin: 24px 0;
  }

  .content-video,
  .content-video video,
  .gallery-video video {
    width: 100%;
    max-height: 70vh;
    height: auto;
  }
}

@media (max-width: 900px) {
  .detail-content {
    width: 100%;
    padding: 0;
  }

  .detail-content .wrap {
    padding: 0 var(--gutter);
  }
}

@media (max-width: 600px) {
  .detail-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-meta {
    gap: 16px;
  }

  .filter-bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .content-image,
  .content-gallery,
  .content-video {
    width: 100%;
    margin: 20px 0;
  }

  .content-video,
  .content-video video,
  .gallery-video video {
    width: 100%;
    max-height: 60vh;
    height: auto;
  }

  .gallery-video video {
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .detail-content {
    width: 100%;
    box-sizing: border-box;
  }

  .detail-content .wrap {
    padding: 0 var(--gutter);
  }

  .insight-detail-page .detail-content {
    padding: 0;
  }

  .insight-detail-page .detail-content .wrap {
    padding: 0 var(--gutter);
  }

  .insight-detail-page .content-text,
  .insight-detail-page .content-image {
    max-width: 100%;
  }

  .content-image,
  .content-gallery,
  .content-video {
    width: 100%;
    margin: 16px 0;
    border-radius: 0;
  }

  .content-video,
  .content-video video,
  .gallery-video video {
    width: 100%;
    max-height: 55vh;
    height: auto;
  }
}

/* Work Item Styles - 重写后的样式 */
.work-item {
  position: relative;
  background: var(--paper);
  overflow: hidden;
  cursor: pointer;
  transition: transform .4s, box-shadow .4s;
  display: flex;
  flex-direction: column;
}

.work-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(26,26,26,0.1);
}

.work-item-cover {
  position: relative;
  overflow: hidden;
}

.work-item-cover img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .6s ease;
}

.work-item:hover .work-item-cover img {
  transform: scale(1.05);
}

.work-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.6));
  opacity: 0;
  transition: opacity .3s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
}

.work-item:hover .work-item-overlay {
  opacity: 1;
}

.work-item-overlay span {
  font-family: var(--sans-cn);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--paper);
  opacity: 0;
  transform: translateY(10px);
  transition: all .3s;
}

.work-item:hover .work-item-overlay span {
  opacity: 1;
  transform: translateY(0);
}

.work-item-arrow {
  font-family: var(--sans-cn);
  font-size: 14px;
  color: var(--paper);
  opacity: 0;
  transform: translateY(10px);
  transition: all .3s;
}

.work-item:hover .work-item-arrow {
  opacity: 1;
  transform: translateY(0);
}

.work-item-info {
  background: var(--paper);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.work-item-category {
  font-family: var(--sans-cn);
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.12em;
}

.work-item-title {
  font-family: var(--sans-cn);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.06em;
  margin: 0;
  line-height: 1.3;
}

.work-item-title-en {
  font-family: var(--sans-cn);
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.work-item-meta {
  display: flex;
  align-items: baseline;
  font-family: var(--sans-cn);
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.04em;
  margin-top: 4px;
  gap: 4px;
}

.work-item-meta .dot {
  display: inline;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  vertical-align: baseline;
  margin: 0;
}

/* ════════════════════════════════════════════════════════════
   INSIGHTS PAGE STYLES
   ════════════════════════════════════════════════════════════ */

/* Insight Tags */
.work-item-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.insight-tag {
  font-family: var(--sans-cn);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--sans-cn);
  border-radius: 2px;
}

/* Insight Date */
.insight-date {
  font-family: var(--sans-cn);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

/* Insight Summary */
.insight-summary {
  font-family: var(--sans-cn);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
  font-weight: 300;
  margin-top: 8px;
}

/* Insight Detail Styles */
.detail-date {
  font-family: var(--sans-cn);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.detail-author {
  font-family: var(--sans-cn);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* Image Caption */
.image-caption {
  margin-top: 12px;
  font-family: var(--sans-cn);
  font-size: 13px;
  color: var(--ink-4);
  text-align: center;
}
