/* ========================================
   个人作品集 — 整体化杂志排布
   ======================================== */

:root {
  --bg: #FAFAFA;
  --text: #1A1A1A;
  --text-secondary: #707070;
  --text-tertiary: #B0B0B0;
  --border: #E8E8E8;
  --accent: #9B8E8A;

  --transition: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  --max-width: 1280px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: "PingFang SC", "Heiti SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  font-weight: 400;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ========================================
   导航栏
   ======================================== */

.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  padding: 22px 0;
  transition: all 0.35s ease;
}

.navbar.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: 14px 0;
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #fff;
  transition: color 0.35s ease;
}

.navbar.scrolled .nav-logo {
  color: var(--text);
}

.nav-links { display: flex; gap: 48px; }

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s ease;
}

.navbar.scrolled .nav-links a {
  color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active { color: #fff; }

.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active { color: var(--text); }

/* ========================================
   Hero — 全屏背景 + 运镜 + 底部渐变过渡
   ======================================== */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
    #EAE5DF 0%, #DCD5CD 25%, #CFC6BC 50%, #C0B5AA 75%, #AA9C92 100%
  );
  transform: scale(1);
  will-change: transform;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.18) 0%,
    rgba(0,0,0,0.05) 45%,
    rgba(0,0,0,0.04) 70%,
    #FAFAFA 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 48px;
}

.hero-label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: rgba(255,255,255,0.85);
  margin-bottom: 28px;
}

.hero-name {
  font-size: 120px;
  font-weight: 700;
  color: #fff;
  line-height: 1.04;
  letter-spacing: 0.08em;
  margin-bottom: 32px;
  text-shadow: 0 2px 60px rgba(0,0,0,0.18);
}

.hero-sub {
  font-size: 22px;
  color: rgba(255,255,255,0.82);
  line-height: 1.9;
  letter-spacing: 0.06em;
  margin-bottom: 52px;
  text-shadow: 0 1px 30px rgba(0,0,0,0.12);
}

.btn-primary {
  display: inline-block;
  padding: 20px 60px;
  background: #fff;
  color: var(--text);
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: all var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.2);
}

.scroll-indicator {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 2;
}

.scroll-indicator span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.55);
}

.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 1.5px solid rgba(255,255,255,0.5);
  border-bottom: 1.5px solid rgba(255,255,255,0.5);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0,0); opacity: 0.4; }
  50% { transform: rotate(45deg) translate(5px,5px); opacity: 1; }
}

/* ========================================
   通用 section
   ======================================== */

.section-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 200px 56px;
}

.section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-heading {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.12;
  margin-bottom: 28px;
}

/* ========================================
   关于我
   ======================================== */

.about .section-wrap {
  max-width: 100%;
  padding: 200px 80px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.about-img-frame {
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  background: #EFEFEF;
}

.about-img-frame img {
  width: 100%; height: 100%; object-fit: cover;
}

.about-img-frame.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-img-frame.no-photo::after {
  content: '王小明';
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #CCC;
}

.about-desc {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 2;
  letter-spacing: 0.05em;
  margin-bottom: 40px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  padding: 10px 24px;
  background: #EFEFEF;
  color: var(--text);
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all var(--transition);
}

.skill-tag:hover { background: #E0E0E0; }

/* --- 服务能力 — 融合在关于我内部 --- */
.about-services {
  margin-top: 360px;
  text-align: center;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.about-services .section-heading {
  text-align: center;
}

.about-services .section-eyebrow {
  text-align: center;
}

/* ========================================
   作品集 — 大字 + 大图 + 无边栏
   ======================================== */

.works .section-wrap {
  max-width: 100%;
  padding: 200px 80px;
}

.works .section-heading {
  font-size: 72px;
  text-align: center;
}

.works .section-eyebrow {
  text-align: center;
}

.works-list {
  display: flex;
  flex-direction: column;
  gap: 200px;
  margin-top: 120px;
}

/* 三个作品不同比例 */
.work-item {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 80px;
  align-items: center;
  position: relative;
  padding: 0 40px;
}

.work-item:nth-child(2) {
  grid-template-columns: 2fr 3fr;
}

.work-item:nth-child(3) {
  grid-template-columns: 5fr 2fr;
}

.work-item.reverse .work-visual { order: 2; }
.work-item.reverse .work-info { order: 1; }
.work-item.reverse .photo-gallery { order: 3; }

/* 大号编号 */
.work-number {
  position: absolute;
  top: -60px;
  left: 0;
  font-size: 160px;
  font-weight: 700;
  color: #ECECEC;
  line-height: 1;
  z-index: 0;
  pointer-events: none;
}

.work-item.reverse .work-number {
  left: auto;
  right: 0;
}

/* 图片 */
.work-visual {
  position: relative;
  z-index: 1;
}

.work-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  background: #EFEFEF;
}

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

.work-img:hover {
  transform: scale(1.015);
}

.work-placeholder-text {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(0,0,0,0.08);
  text-align: center;
  line-height: 1.3;
}

/* 文字 */
.work-info {
  position: relative;
  z-index: 1;
}

.work-cat {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.work-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.work-desc {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.9;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}

.work-link {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--text);
  padding-bottom: 4px;
  transition: all var(--transition);
}

.work-link:hover { color: var(--accent); border-color: var(--accent); }

/* ========================================
   服务
   ======================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 240px;
  background: #EEEEEE;
  border-radius: 24px;
  overflow: hidden;
}

.service-card {
  text-align: center;
  padding: 48px 28px;
  background: transparent;
  transition: all var(--transition);
  border-right: 1px solid rgba(0,0,0,0.04);
}

.service-card:last-child {
  border-right: none;
}

.service-card:hover {
  background: rgba(0,0,0,0.03);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.06);
}

.service-icon { font-size: 44px; margin-bottom: 20px; }

.service-card h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  letter-spacing: 0.03em;
}

/* ========================================
   可展开相册 — 在作品项内部跨两列
   ======================================== */

.photo-gallery {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
              margin-top 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
  margin-top: 0;
}

.photo-gallery.open {
  max-height: 6000px;
  margin-top: 80px;
}

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

.gallery-item {
  overflow: hidden;
  border-radius: 16px;
  background: #EFEFEF;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
  .gallery-item.wide {
    grid-column: span 1;
  }
}

/* ========================================
   图片灯箱 Lightbox
   ======================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
}

.lightbox-img {
  position: relative;
  z-index: 1;
  max-width: 75vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  cursor: zoom-out;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 2;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
  font-family: inherit;
}

.lightbox-close:hover { opacity: 1; }

/* ========================================
   页脚 CTA
   ======================================== */

.footer-cta {
  padding: 200px 80px 140px;
  text-align: center;
}

.footer-cta .section-eyebrow {
  margin-bottom: 24px;
}

.footer-cta-heading {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.15;
  margin-bottom: 24px;
}

.footer-cta-sub {
  font-size: 20px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  line-height: 1.8;
  margin-bottom: 48px;
}

.footer-cta .btn-primary {
  background: var(--text);
  color: #fff;
}

.footer-cta .btn-primary:hover {
  background: #333;
  box-shadow: 0 12px 36px rgba(0,0,0,0.2);
}

.footer-email {
  margin-top: 28px;
  font-size: 15px;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

.footer-email a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.footer-email a:hover {
  border-color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding: 40px;
  color: var(--text-tertiary);
  font-size: 13px;
  letter-spacing: 0.08em;
  border-top: 0.5px solid var(--border);
}

/* --- 滚动淡入 --- */
.fade-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 1s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 平板 --- */
@media (max-width: 1024px) {
  .hero-name { font-size: 80px; }
  .section-heading { font-size: 52px; }
  .works .section-heading { font-size: 56px; }
  .section-wrap { padding: 160px 40px; }
  .about .section-wrap { padding: 160px 40px; }
  .works .section-wrap { padding: 160px 40px; }

  .about-grid { gap: 60px; }
  .work-item,
  .work-item:nth-child(2),
  .work-item:nth-child(3) { gap: 40px; }
  .work-title { font-size: 36px; }
  .work-number { font-size: 120px; top: -48px; }
}

/* --- 手机 --- */
@media (max-width: 480px) {
  .hero-name { font-size: 56px; }
  .hero-sub { font-size: 16px; }
  .hero-label { font-size: 11px; }
  .section-heading { font-size: 36px; }
  .works .section-heading { font-size: 40px; }
  .section-wrap { padding: 100px 20px; }
  .about .section-wrap { padding: 100px 20px; }
  .works .section-wrap { padding: 100px 20px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .work-item,
  .work-item.reverse,
  .work-item:nth-child(2),
  .work-item:nth-child(3) {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .work-item.reverse .work-visual { order: -1; }
  .work-number { font-size: 72px; top: -24px; }
  .work-title { font-size: 28px; }
  .work-desc { font-size: 15px; }

  .services-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .service-card { padding: 32px 16px; }
  .service-card h3 { font-size: 16px; }
  .service-card p { font-size: 12px; }
  .service-icon { font-size: 32px; }

  .works-list { gap: 100px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 12px; }
  .nav-container { padding: 0 20px; }
  .nav-logo { font-size: 14px; }

  .footer-cta-heading { font-size: 32px; }
  .footer-cta { padding: 100px 20px 80px; }
  .footer-cta-sub { font-size: 16px; }
  .btn-primary { font-size: 15px; padding: 16px 40px; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; gap: 8px; }
  .gallery-item.wide { grid-column: span 1; }
  .photo-gallery.open { margin-top: 48px; }
  .about-services { margin-top: 200px; }
}
