/* ===== CSS 变量 ===== */
:root {
  --bg: #0a0a0a;
  --bg-card: #1a1a1a;
  --bg-nav: rgba(10, 10, 10, 0.92);
  --gold: #C9A84C;
  --gold-light: #e8c96d;
  --red: #e74c3c;
  --text: #f0f0f0;
  --text-muted: #888;
  --border: #2a2a2a;
  --radius: 8px;
  --transition: 0.3s ease;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
}

/* ===== 重置 & 基础 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

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

img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.navbar__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar__logo img { width: 140px; height: auto; object-fit: contain; }

.navbar__search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.navbar__search input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0.5rem 1.25rem 0.5rem 2.75rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}

.navbar__search input:focus { border-color: var(--gold); }

.navbar__search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.navbar__actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

.btn-favorites {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.4rem 1rem;
  border-radius: 24px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn-favorites:hover,
.btn-favorites.active {
  background: var(--gold);
  color: #000;
}

.btn-favorites .count {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border-radius: 10px;
  font-size: 0.7rem;
  padding: 0 5px;
  margin-left: 4px;
  min-width: 18px;
  text-align: center;
  line-height: 18px;
}

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  margin-top: 0;
}

.hero__slides {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  cursor: pointer;
}

.hero__slide.active { opacity: 1; }

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1) 0%,
    rgba(0,0,0,0.0) 40%,
    rgba(0,0,0,0.7) 75%,
    rgba(0,0,0,0.92) 100%
  );
}

.hero__content {
  position: absolute;
  bottom: 8rem;
  left: 5%;
  max-width: 600px;
}

.hero__name {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--gold);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.hero__name-en {
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero__profession {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.hero__bio {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  max-width: 480px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero__nav {
  position: absolute;
  bottom: 3rem;
  left: 5%;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.hero__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.hero__dot.active {
  background: var(--gold);
  transform: scale(1.5);
}

.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
}

.hero__arrow:hover { background: rgba(201,168,76,0.3); border-color: var(--gold); }
.hero__arrow--prev { left: 2rem; }
.hero__arrow--next { right: 2rem; }

/* ===== 内容区 ===== */
.content { padding: 3rem 2rem; max-width: 1400px; margin: 0 auto; }

/* ===== 筛选 Tab ===== */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 1.2rem;
  border-radius: 24px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.filter-tab:hover { border-color: var(--gold); color: var(--gold); }

.filter-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
  font-weight: 600;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== 瀑布流 ===== */
.masonry {
  columns: 4 280px;
  column-gap: 1rem;
}

.card {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(201,168,76,0.2);
}

.card__img-wrap {
  position: relative;
  overflow: hidden;
}

/* 给不同卡片设置不同高度，制造错落感 */
.card:nth-child(3n+1) .card__img-wrap { height: 380px; }
.card:nth-child(3n+2) .card__img-wrap { height: 280px; }
.card:nth-child(3n)   .card__img-wrap { height: 340px; }

.card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}

.card:hover .card__img-wrap img { transform: scale(1.06); }

.card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover .card__overlay { opacity: 1; }

.card__info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  transform: translateY(8px);
  opacity: 0;
  transition: transform var(--transition), opacity var(--transition);
}

.card:hover .card__info { transform: translateY(0); opacity: 1; }

.card__name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.card__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
}

.card__tag {
  background: rgba(201,168,76,0.2);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.7rem;
}

.card__like {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition), transform var(--transition), background var(--transition);
  backdrop-filter: blur(4px);
}

.card__like:hover { transform: scale(1.15); background: rgba(0,0,0,0.7); }
.card__like.liked { color: var(--red); }

@keyframes heartBeat {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.4); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.card__like.beat { animation: heartBeat 0.4s ease; }

/* ===== 详情页 ===== */
.detail-hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.detail-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.2) 0%,
    rgba(0,0,0,0.0) 30%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.95) 100%
  );
}

.detail-hero__content {
  position: absolute;
  bottom: 5rem;
  left: 5%;
}

.detail-hero__name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 6rem);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.detail-hero__name-en {
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-back {
  position: absolute;
  top: 5rem;
  left: 2rem;
  z-index: 10;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 24px;
  font-size: 0.85rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color var(--transition);
}

.detail-back:hover { border-color: var(--gold); color: var(--gold); }

/* 详情内容区 */
.detail-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.detail-meta__item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.detail-meta__item strong { color: var(--text); }

.detail-meta__sep { color: var(--border); }

.detail-tag {
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.35);
  color: var(--gold);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

/* 杂志正文 */
.detail-article h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--gold);
  margin-bottom: 1.25rem;
  line-height: 1.25;
}

.detail-article p {
  font-size: 1rem;
  line-height: 1.9;
  color: rgba(240,240,240,0.85);
  margin-bottom: 1.5rem;
}

.detail-article .pull-quote {
  border-left: 3px solid var(--gold);
  padding-left: 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--gold-light);
  margin: 2rem 0;
}

/* 画廊 */
.gallery {
  margin-top: 3rem;
}

.gallery h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.gallery__strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--bg-card);
}

.gallery__strip::-webkit-scrollbar { height: 4px; }
.gallery__strip::-webkit-scrollbar-track { background: var(--bg-card); }
.gallery__strip::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

.gallery__item {
  flex-shrink: 0;
  width: 280px;
  height: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}

.gallery__item:hover { border-color: var(--gold); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }

/* 灯箱 */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open { display: flex; }

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox__close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color var(--transition);
}

.lightbox__close:hover { color: var(--gold); }

/* 详情点赞 */
.detail-like {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.detail-like__btn {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-muted);
  width: 64px; height: 64px;
  border-radius: 50%;
  font-size: 1.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.detail-like__btn:hover { border-color: var(--red); color: var(--red); }
.detail-like__btn.liked { border-color: var(--red); color: var(--red); background: rgba(231,76,60,0.1); }
.detail-like__btn.beat { animation: heartBeat 0.4s ease; }

.detail-like__count {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .navbar__search { max-width: 180px; }

  .hero__content { left: 1.5rem; bottom: 6rem; }
  .hero__arrow { display: none; }
  .hero__bio { display: none; }

  .content { padding: 2rem 1rem; }

  .masonry { columns: 2 160px; }

  .card:nth-child(3n+1) .card__img-wrap,
  .card:nth-child(3n+2) .card__img-wrap,
  .card:nth-child(3n)   .card__img-wrap { height: 240px; }

  .detail-content { padding: 2rem 1rem 4rem; }
  .gallery__item { width: 200px; height: 150px; }
}

@media (max-width: 480px) {
  .masonry { columns: 1; }
  .card:nth-child(n) .card__img-wrap { height: 280px; }
  .navbar__search { display: none; }
}
