/* ========================================
   上海人像作品副站 - 全局样式
   主题：粉色系、软萌、清新
   ======================================== */

/* ---- CSS Variables ---- */
:root {
  /* 背景色 */
  --bg-primary: #FFFFFF;
  --bg-secondary: #FFF9FB;
  --bg-footer: #FFF0F3;

  /* 粉色系 */
  --pink-light: #FFE6EE;
  --pink-main: #FFD6E0;
  --pink-medium: #FFB6C1;
  --pink-dark: #E091A8;
  --pink-darker: #D4789A;

  /* 文字色 */
  --text-primary: #4A4A4A;
  --text-secondary: #9CA3AF;
  --text-heading: #D4789A;

  /* 阴影 */
  --shadow-card: 0 4px 16px rgba(255, 214, 224, 0.3);
  --shadow-card-hover: 0 8px 24px rgba(255, 214, 224, 0.5);
  --shadow-nav: 0 2px 12px rgba(255, 214, 224, 0.3);

  /* 尺寸 */
  --nav-height: 64px;
  --container-max: 1200px;
  --radius-card: 12px;
  --radius-img: 8px;

  /* 过渡 */
  --transition-fast: 200ms ease;
  --transition-medium: 300ms ease;
}

/* ---- Reset ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

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

/* ---- Utility Classes ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-weight: 500;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 48px;
  color: var(--text-heading);
}

/* 区域标题栏（带粉色竖线） */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.section-header::before {
  content: '';
  width: 4px;
  height: 28px;
  background: var(--pink-main);
  border-radius: 2px;
}

.section-header h2 {
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--text-heading);
}

.section-header p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-left: auto;
}

/* ---- Responsive Base ---- */
@media (max-width: 768px) {
  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 32px;
  }

  .section-header p {
    display: none;
  }
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  transition: box-shadow var(--transition-fast);
}

.navbar.scrolled {
  box-shadow: var(--shadow-nav);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--text-heading);
  letter-spacing: 0.05em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-menu a {
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--pink-darker);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--pink-main);
  border-radius: 1px;
}

/* ---- Mobile Toggle ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition-fast);
}

/* ---- Mobile Nav ---- */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 249, 251, 0.98);
    backdrop-filter: blur(8px);
    padding: 16px 24px;
    box-shadow: var(--shadow-nav);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-medium);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--pink-light);
  }

  .nav-menu a.active::after {
    display: none;
  }
}

/* ========================================
   Banner / Hero Section
   ======================================== */
.banner {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 400px;
  max-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: var(--nav-height);
}

.banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(255, 230, 238, 0.6) 0%, transparent 50%);
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.banner-title {
  font-weight: 500;
  font-size: 2.5rem;
  color: #FFFFFF;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}

.banner-subtitle {
  font-size: 1.125rem;
  color: #FFFFFF;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
  letter-spacing: 0.05em;
}

.banner-scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.banner-scroll span {
  display: block;
  width: 20px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  position: relative;
}

.banner-scroll span::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.3; transform: translateX(-50%) translateY(10px); }
}

@media (max-width: 768px) {
  .banner {
    height: 50vh;
    min-height: 300px;
  }

  .banner-title {
    font-size: 1.75rem;
  }

  .banner-subtitle {
    font-size: 1rem;
  }
}

/* ========================================
   Gallery Grid
   ======================================== */
.gallery-section {
  background: var(--bg-secondary);
}

.gallery-section:nth-child(even) {
  background: var(--bg-primary);
}

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

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

/* ---- Gallery Card ---- */
.gallery-card {
  position: relative;
  background: var(--bg-primary);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-medium),
              box-shadow var(--transition-medium);
  border: 2px solid transparent;
}

.gallery-card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--pink-main);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-img);
  transition: transform var(--transition-medium);
}

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

/* ========================================
   Lightbox
   ======================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(255, 230, 238, 0.95);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-img);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.lightbox-counter {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ---- Lightbox Controls ---- */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-size: 1.25rem;
  transition: background var(--transition-fast), color var(--transition-fast);
  z-index: 10;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--pink-main);
  color: #fff;
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    display: none;
  }

  .lightbox-content img {
    max-height: 80vh;
  }
}

/* ========================================
   About Page
   ======================================== */
.about-hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 48px;
  text-align: center;
}

.about-hero .section-title {
  margin-bottom: 16px;
}

.about-intro {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 64px;
}

.about-avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: var(--shadow-card);
}

.about-text p {
  margin-bottom: 16px;
  color: var(--text-primary);
}

.about-contact {
  background: var(--bg-secondary);
  border-radius: var(--radius-card);
  padding: 48px;
  text-align: center;
}

.about-contact h3 {
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--text-heading);
  margin-bottom: 24px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-img);
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.contact-item span:first-child {
  font-size: 1.25rem;
}

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

  .about-avatar {
    max-width: 200px;
    margin: 0 auto;
  }

  .about-contact {
    padding: 32px 24px;
  }
}

/* ========================================
   开场动画 — 镜头散景光斑
   ======================================== */

/* ---- 遮罩层 ---- */
.landing-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg, #2A1F23 0%, #3D2A30 15%, #5C3A45 30%, #7A4E5A 45%, #9B6478 60%, #C48A9E 75%, #E0AEBE 88%, #F5D0DB 95%, #FFE6EE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
.landing-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---- 遮罩内容居中 ---- */
.landing-content {
  text-align: center;
  position: relative;
  z-index: 2;
  transition: opacity 0.9s ease;
}
.landing-overlay.hidden .landing-content {
  opacity: 0;
}
.landing-title {
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--text-heading);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  opacity: 0;
  filter: blur(12px);
  transform: scale(0.9);
  transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.landing-title.reveal {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}
.landing-title .char {
  display: inline-block;
  opacity: 1;
  transform: none;
  transition: none;
}
.landing-subtitle {
  font-size: 1.125rem;
  color: var(--pink-darker);
  letter-spacing: 0.3em;
  opacity: 0;
  filter: blur(8px);
  transform: scale(0.9);
  transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.landing-subtitle.reveal {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

/* ---- 光斑容器 ---- */
.landing-bokeh {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.bokeh {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
  filter: blur(8px);
}

/* ---- 光斑漂移关键帧（25 组） ---- */
@keyframes drift-1  { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -20px); } }
@keyframes drift-2  { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40px, 25px); } }
@keyframes drift-3  { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(20px, 35px); } }
@keyframes drift-4  { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-25px, -30px); } }
@keyframes drift-5  { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(35px, 15px); } }
@keyframes drift-6  { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, -15px); } }
@keyframes drift-7  { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(15px, -35px); } }
@keyframes drift-8  { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-20px, 30px); } }
@keyframes drift-9  { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(25px, -25px); } }
@keyframes drift-10 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-35px, 20px); } }
@keyframes drift-11 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, -15px); } }
@keyframes drift-12 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-15px, 40px); } }
@keyframes drift-13 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, 30px); } }
@keyframes drift-14 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-20px, -20px); } }
@keyframes drift-15 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(25px, -30px); } }
@keyframes drift-16 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 25px); } }
@keyframes drift-17 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(20px, -20px); } }
@keyframes drift-18 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-25px, 35px); } }
@keyframes drift-19 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(35px, -25px); } }
@keyframes drift-20 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-20px, -35px); } }
@keyframes drift-21 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(15px, 25px); } }
@keyframes drift-22 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40px, -20px); } }
@keyframes drift-23 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(25px, 15px); } }
@keyframes drift-24 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-15px, -30px); } }
@keyframes drift-25 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -35px); } }

/* ---- 页面内容呼吸感入场 ---- */
.banner-content {
  opacity: 1;
  filter: none;
  transform: none;
  transition: none;
}
.banner-content.reveal {
  opacity: 1;
  filter: none;
  transform: none;
}
.section {
  opacity: 0;
  filter: blur(6px);
  transform: scale(0.97) translateY(20px);
  transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.section.reveal {
  opacity: 1;
  filter: blur(0);
  transform: scale(1) translateY(0);
}

/* ---- 减弱动画偏好 ---- */
@media (prefers-reduced-motion: reduce) {
  .landing-overlay,
  .landing-title,
  .landing-subtitle,
  .banner-content,
  .section,
  .bokeh {
    transition: none !important;
    animation: none !important;
  }
  .landing-overlay {
    opacity: 0;
    visibility: hidden;
  }
  .landing-title,
  .landing-subtitle,
  .banner-content,
  .section {
    opacity: 1;
    filter: none;
    transform: none;
  }
}
