/* =====================================
   极简摄影师作品集 - 样式文件
   ===================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  background-color: #ffffff;
  color: #333333;
  line-height: 1.6;
  letter-spacing: 0.3px;
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-link {
  text-decoration: none;
  color: #333333;
  font-size: 0.95rem;
  position: relative;
  transition: opacity 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #333333;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  animation: zoomInSlow 8s ease-in-out;
}

@keyframes zoomInSlow {
  from {
    transform: scale(1.05);
    opacity: 0.9;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-size: 0.8rem;
  opacity: 0.7;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

.arrow-icon {
  width: 20px;
  height: 20px;
  animation: slideDown 1.5s infinite;
}

@keyframes slideDown {
  0% { opacity: 0; transform: translateY(-10px); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

/* ===== 容器和通用样式 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin-bottom: 3rem;
  text-align: center;
}

/* ===== 作品集 Section ===== */
.portfolio {
  padding: 6rem 2rem;
  background-color: #f9f9f9;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* 确保3列布局 */
@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

.portfolio-card {
  overflow: hidden;
  cursor: pointer;
  border-radius: 12px;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.portfolio-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-card-image {
  transform: scale(1.02);
}

.portfolio-card-info {
  padding: 1.5rem;
  background: white;
}

.portfolio-card-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #333333;
}

.portfolio-card-year {
  font-size: 0.85rem;
  color: #999999;
  letter-spacing: 0.05em;
}

/* ===== 关于 Section ===== */
.about {
  padding: 6rem 2rem;
  background-color: #ffffff;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.about-image {
  display: flex;
  justify-content: center;
}

.about-image img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .about-image img {
    width: 200px;
    height: 200px;
  }
}

.about-text h2 {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.8;
  color: #555555;
  margin-bottom: 1rem;
}

/* ===== 联系 Section ===== */
.contact {
  padding: 6rem 2rem;
  background-color: #f9f9f9;
  text-align: center;
}

.contact-title {
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.contact-email {
  display: inline-block;
  font-size: 1.5rem;
  color: #333333;
  text-decoration: none;
  border-bottom: 1px solid #333333;
  padding-bottom: 0.5rem;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.contact-email:hover {
  opacity: 0.7;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #333333;
  transition: all 0.3s ease;
}

.social-icon svg {
  width: 100%;
  height: 100%;
}

.social-icon:hover {
  opacity: 0.6;
  transform: translateY(-3px);
}

/* 文字型社交图标（小红书等无内置SVG的平台） */
.social-icon-text {
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333333;
  font-size: 0.9rem;
}

.social-icon-text:hover {
  border-color: #333333;
  opacity: 1;
}

.social-label {
  display: block;
}

/* ===== 页脚 ===== */
.footer {
  padding: 2rem;
  text-align: center;
  background-color: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
  color: #999999;
}

/* ============================================================
   详情页样式
   ============================================================ */
.detail-container {
  padding-top: 120px;
  padding-bottom: 6rem;
  background-color: #ffffff;
  min-height: 100vh;
}

.detail-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

.back-button {
  background: none;
  border: 1px solid #ddd;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
  color: #333333;
}

.back-button:hover {
  border-color: #333333;
  background-color: #f9f9f9;
}

/* ===== 轮播组件 ===== */
.carousel {
  position: relative;
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  background: #fafafa;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  cursor: grab;
}

.carousel-viewport:active {
  cursor: grabbing;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.5s ease;
}

/* 左右箭头 */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: #333333;
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-50%) scale(1.05);
}

.carousel-arrow-left {
  left: 16px;
}

.carousel-arrow-right {
  right: 16px;
}

/* 序号计数器 */
.carousel-counter {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-weight: 400;
}

/* 圆点指示器 */
.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  backdrop-filter: blur(4px);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.carousel-dot.active {
  background: #ffffff;
  transform: scale(1.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* 轮播下方文字说明 */
.carousel-caption {
  margin-bottom: 3rem;
}

.carousel-caption .detail-title {
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.carousel-caption .detail-year {
  font-size: 0.95rem;
  color: #999999;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.carousel-caption .detail-description {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #555555;
  white-space: pre-wrap;
}

/* ===== 作品间导航 ===== */
.detail-nav {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.detail-nav-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  background: none;
  border: 1px solid #ddd;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  color: #333333;
}

.detail-nav-btn:hover:not(:disabled) {
  border-color: #333333;
  background-color: #f9f9f9;
}

.detail-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 1.5rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .about-text h2 {
    font-size: 1.5rem;
  }

  .contact-title {
    font-size: 1.8rem;
  }

  .contact-email {
    font-size: 1.1rem;
  }

  .carousel-caption .detail-title {
    font-size: 1.5rem;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
  }

  .carousel-arrow svg {
    width: 16px;
    height: 16px;
  }

  .carousel-arrow-left {
    left: 8px;
  }

  .carousel-arrow-right {
    right: 8px;
  }

  .carousel-counter {
    top: 10px;
    right: 10px;
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
  }

  .carousel-caption .detail-description {
    font-size: 0.95rem;
  }

  .detail-nav {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}