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

:root {
  --bg: #e6f1fb;
  --text: #243272;
  --text-light: #4a5688;
  --text-faint: #8a94b8;
  --text-ghost: #b0b8d0;
  --border: #c8d4e8;
  --white: #ffffff;
  --font-serif: 'Noto Serif SC', 'STSong', 'SimSun', Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --nav-height: 56px;
  --max-width: 1024px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

section {
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; }
.section-title {
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: 56px;
  position: relative;
}
.section-title::after {
  content: ''; display: block; width: 20px; height: 1.5px;
  background: var(--text); margin: 12px auto 0;
}

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

/* ─── Navigation ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(230, 241, 251, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 8px rgba(36,50,114,0.06);
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.nav.visible {
  transform: translateY(0);
}
.nav-inner {
  width: 100%; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { font-family: var(--font-serif); font-size: 1.05rem; letter-spacing: 0.04em; }
.nav-toggle {
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 4px;
  width: 36px; height: 36px; border: 0; padding: 0;
  background: transparent; color: var(--text); cursor: pointer;
}
.nav-toggle span {
  display: block; width: 18px; height: 1.5px;
  background: currentColor; border-radius: 999px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-links { display: flex; gap: 28px; }
.nav-link {
  font-size: 0.82rem; color: var(--text-light); position: relative; padding: 4px 0;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px;
  background: var(--text); transition: width 0.35s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--text); }

/* ─── Hero ─── */
.hero {
  position: relative; height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero-bg-wrapper {
  position: absolute; inset: -10px; overflow: hidden;
}
.hero-bg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(4px) contrast(1) brightness(1.05);
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(230, 241, 251, 0.55);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; text-align: center; padding: 0 24px; }
.hero-title {
  font-family: var(--font-serif); font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 400; letter-spacing: 0.08em; color: var(--text);
  margin-bottom: 12px; min-height: 1.3em;
}
.hero-sub { font-size: 0.95rem; letter-spacing: 0.1em; color: var(--text-light); min-height: 1.5em; }
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: scrollFloat 2.4s ease-in-out infinite;
  cursor: pointer;
}
.scroll-hint-text {
  font-size: 0.72rem; letter-spacing: 0.32em; color: rgba(36,50,114,0.55);
  font-family: var(--font-sans);
}
.scroll-hint-arrow {
  width: 20px; height: 20px;
  display: block;
}
@keyframes scrollFloat {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* ─── About ─── */
.about { padding: 100px 0 80px; }
.intro-row { display: flex; align-items: flex-start; margin-bottom: 80px; }
.intro-photo { flex: 0 0 26%; }
.intro-spacer { flex: 0 0 18%; }
.intro-text { flex: 1; max-width: 54%; }
.intro-photo-frame {
  width: 100%; background: var(--white); border-radius: 12px;
  overflow: hidden; box-shadow: 0 2px 16px rgba(36,50,114,0.06);
}
.intro-photo-img {
  width: 100%; height: auto; display: block;
}
.intro-text p { font-size: 0.92rem; color: var(--text-light); line-height: 2; margin-bottom: 16px;
  text-indent: 2em; }
.intro-text p:last-child { margin-bottom: 0; }

/* ─── AI Works Carousel ─── */
.ai-works { padding: 0 0 100px; overflow: hidden; }
.carousel-section { margin-bottom: 40px; }
.carousel-section:last-child { margin-bottom: 0; }
/* 让轮播破开 .container 限制，占满整个视口宽度 */
.ai-works .carousel-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.carousel-row-title {
  font-family: var(--font-serif); font-size: 0.9rem; letter-spacing: 0.05em;
  color: var(--text-light); margin-bottom: 16px; text-align: center;
}
.carousel-wrapper { overflow: hidden; position: relative; }
/* 左右两侧渐变遮罩，让卡片淡入淡出 */
.carousel-wrapper::before,
.carousel-wrapper::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 90px;
  z-index: 2;
  pointer-events: none;
}
.carousel-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), rgba(230, 241, 251, 0));
}
.carousel-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), rgba(230, 241, 251, 0));
}
.carousel-track {
  display: flex; gap: 18px; overflow-x: auto;
  padding: 12px 4px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-card {
  flex-shrink: 0; width: 280px; position: relative; cursor: pointer;
  overflow: hidden; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(36,50,114,0.05);
  transition: box-shadow 0.3s ease;
}
.carousel-card:hover { box-shadow: 0 6px 24px rgba(36,50,114,0.1); }
.carousel-card-img {
  width: 100%; height: 190px; display: flex; align-items: center; justify-content: center;
  transition: transform 0.5s ease;
}
.carousel-card:hover .carousel-card-img { transform: scale(1.04); }
.card-placeholder-text { font-size: 0.85rem; color: #6a7298; font-family: var(--font-serif); }

.carousel-card-cover {
  position: absolute; inset: 0; background: linear-gradient(to top, rgba(36,50,114,0.78) 0%, rgba(36,50,114,0.25) 60%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px 16px; opacity: 0; transition: opacity 0.4s ease;
}
.carousel-card:hover .carousel-card-cover { opacity: 1; }
.cover-label {
  font-family: var(--font-serif); font-size: 0.65rem; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7); margin-bottom: 4px; text-transform: uppercase;
}
.cover-text {
  font-family: var(--font-serif); font-size: 0.78rem; color: rgba(255,255,255,0.95);
  line-height: 1.6; margin-bottom: 8px; font-style: italic;
}
.cover-model {
  font-size: 0.68rem; color: rgba(255,255,255,0.65); letter-spacing: 0.04em;
}

/* ─── APP Works ─── */
.app-works { padding: 0 0 100px; }
.app-intro-card {
  max-width: 850px; margin: -10px auto 56px; padding: 24px 32px;
  background: var(--white); border-radius: 18px;
  box-shadow: 0 4px 18px rgba(36,50,114,0.06);
}
.app-intro-card p {
  font-size: 0.92rem; color: var(--text-light); line-height: 1.9;
  text-align: left;
  margin-bottom: 16px;
}
.app-intro-card p:last-child {
  margin-bottom: 0;
}
.app-row { display: flex; align-items: center; margin-bottom: 60px; }
.app-row:last-child { margin-bottom: 0; }
.app-row:nth-child(even) { flex-direction: row-reverse; }
.app-phone { flex: 0 0 28%; display: flex; justify-content: center; }
.app-spacer { flex: 0 0 18%; }
.app-info { flex: 1; max-width: 52%; }
.phone-frame {
  width: min(180px, 100%); background: #1a1a2e; border-radius: 15px;
  padding: 4px; position: relative;
  box-shadow: 0 4px 16px rgba(36,50,114,0.1);
}
.phone-screen {
  width: 100%; border-radius: 11px; overflow: hidden;
  position: relative;
}
.phone-screen-img {
  display: block; width: 100%; height: auto;
}
.phone-screen-inner {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  transition: transform 0.5s ease;
}
.phone-screen-label { font-size: 0.7rem; color: #6a7298; font-family: var(--font-serif); }
.app-title { font-size: 1.15rem; margin-bottom: 10px; }
.app-desc { font-size: 0.88rem; color: var(--text-light); line-height: 1.8; margin-bottom: 16px; }
.app-meta { display: flex; flex-direction: column; gap: 4px; }
.app-meta span { font-size: 0.78rem; color: var(--text-faint); }
.app-meta strong { color: var(--text-light); font-weight: 500; }

.dashboard { padding: 0 0 100px; }
.dashboard-showcase {
  display: flex; align-items: center; gap: 56px;
}
.dashboard-visual {
  flex: 0 0 50%;
  background: var(--white); border-radius: 14px; padding: 12px;
  box-shadow: 0 4px 18px rgba(36,50,114,0.06);
}
.dashboard-frame {
  position: relative; width: 100%; aspect-ratio: 832 / 1264;
  overflow: hidden; border-radius: 8px; background: #eef5fb;
}
.dashboard-iframe {
  position: absolute; top: 0; left: 0;
  width: 232.558%; height: 232.558%;
  border: none; background: #eef5fb;
  transform: scale(0.43); transform-origin: top left;
}
.dashboard-info { flex: 1; }
.dashboard-title { font-size: 1.15rem; margin-bottom: 12px; }
.dashboard-desc { font-size: 0.88rem; color: var(--text-light); line-height: 1.8; margin-bottom: 14px; }
.dashboard-link {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 4px; padding: 7px 18px;
  border: 1.5px solid var(--text); border-radius: 4px;
  font-size: 0.78rem; color: var(--text); letter-spacing: 0.04em;
  transition: background 0.3s ease, color 0.3s ease;
}
.dashboard-link:hover { background: var(--text); color: var(--white); }

.photo { padding: 0 0 100px; overflow: hidden; }
.photo-container {
  max-width: none;
  width: 100%;
  padding: 0;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.photo-extra-wrapper {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.7s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.5s ease;
}
.photo-grid.expanded .photo-extra-wrapper {
  max-height: 1200px;
  opacity: 1;
}
.masonry-item {
  position: relative;
  overflow: hidden; border-radius: 8px; cursor: pointer;
  box-shadow: 0 1px 8px rgba(36,50,114,0.04);
  transition: box-shadow 0.3s ease;
}
.masonry-item:hover { box-shadow: 0 4px 18px rgba(36,50,114,0.1); }
.masonry-img {
  width: 100%; aspect-ratio: 3/2; display: flex; align-items: center; justify-content: center;
  transition: transform 0.5s ease;
}
.masonry-item:hover .masonry-img { transform: scale(1.04); }
.masonry-placeholder { font-size: 1.8rem; color: #8a94b8; }
.masonry-cover {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(36,50,114,0.72) 0%, transparent 55%);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: 16px 12px; opacity: 0; transition: opacity 0.4s ease;
}
.masonry-item:hover .masonry-cover { opacity: 1; }
.masonry-focal {
  font-family: var(--font-serif); font-size: 0.68rem; color: rgba(255,255,255,0.8);
  letter-spacing: 0.04em; margin-bottom: 3px;
}
.masonry-location {
  font-family: var(--font-serif); font-size: 0.72rem; color: rgba(255,255,255,0.95);
  letter-spacing: 0.04em;
}
.photo-toggle {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 28px auto 0;
  border: none; background: transparent; color: var(--text);
  font-family: var(--font-serif); font-size: 0.9rem; letter-spacing: 0.05em;
  cursor: pointer; padding: 8px 12px;
}
.photo-toggle-icon {
  display: block;
  transition: transform 0.3s ease;
}
.photo-toggle[aria-expanded="true"] .photo-toggle-icon { transform: rotate(180deg); }

/* ─── Writing ─── */
.writing { padding: 0 0 100px; }
.writing-grid { display: flex; flex-direction: column; gap: 36px; align-items: center; }
.writing-qr { width: 200px; text-align: center; }
.qr-img-wrapper {
  background: var(--white); border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: 0 2px 10px rgba(36,50,114,0.05);
}
.qr-img { width: 100%; height: auto; border-radius: 4px; }
.qr-label { font-size: 0.72rem; color: var(--text-faint); }
.writing-mp-name { margin-top: 12px; font-size: 0.82rem; color: var(--text-light); }
.writing-list {
  width: 65%;
}
.writing-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.writing-item:first-child { padding-top: 0; }
.writing-item:last-child { padding-bottom: 0; border-bottom: none; }
.writing-link {
  display: inline-block; font-size: 0.92rem; color: var(--text);
  font-family: var(--font-serif); letter-spacing: 0.03em;
  position: relative; padding-bottom: 3px;
}
.writing-link-text {
  display: inline-block;
}
.writing-link-date {
  display: block; font-size: 0.7rem; color: var(--text-faint);
  font-family: var(--font-sans); letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.writing-link-line {
  position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px;
  background: var(--text); transition: width 0.4s ease;
}
.writing-item:hover .writing-link-line { width: 100%; }
.writing-link-arrow {
  position: absolute; left: 100%; bottom: 2px; margin-left: 8px;
  opacity: 0; transform: translateX(-4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.writing-item:hover .writing-link-arrow {
  opacity: 1; transform: translateX(0);
}
.writing-preview {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.45s ease, opacity 0.35s ease, margin-top 0.35s ease;
  margin-top: 0;
  pointer-events: none;
}
.writing-item:hover .writing-preview {
  max-height: 140px; opacity: 1; margin-top: 10px;
  pointer-events: auto;
}
.writing-preview p {
  padding: 12px 16px; background: var(--white); border-radius: 6px;
  font-size: 0.78rem; color: var(--text-light); line-height: 1.7;
  box-shadow: 0 1px 8px rgba(36,50,114,0.04);
}

/* ─── Contact & Footer ─── */
.contact { padding: 0 0 80px; }
.contact-content { text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 28px; }
.contact-text { font-size: 0.92rem; color: var(--text-light); max-width: 480px; }
.contact-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.contact-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.88rem; color: var(--text-light); position: relative;
  padding-bottom: 2px; transition: color 0.3s ease;
}
.contact-icon { flex: 0 0 auto; }
.wechat-contact { cursor: default; }
.wechat-qr-popover {
  position: absolute; left: 50%; bottom: calc(100% + 14px);
  transform: translateX(-50%) translateY(8px);
  width: 150px; padding: 12px;
  background: var(--white); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(36,50,114,0.16);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 20;
}
.wechat-qr-popover::after {
  content: ''; position: absolute; left: 50%; bottom: -7px;
  width: 14px; height: 14px; background: var(--white);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 4px 4px 10px rgba(36,50,114,0.04);
}
.wechat-contact:hover .wechat-qr-popover {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.wechat-qr-img { display: block; width: 100%; height: auto; border-radius: 6px; }
.wechat-qr-label {
  display: block; margin-top: 8px;
  font-size: 0.72rem; color: var(--text-faint); text-align: center;
}
.contact-link::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px;
  background: var(--text); transition: width 0.35s ease;
}
.contact-link:hover { color: var(--text); }
.contact-link:hover::after { width: 100%; }
.copyright {
  text-align: center; font-size: 0.7rem; color: var(--text-faint); margin-top: 40px;
}

/* ─── Lightbox ─── */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(36,50,114,0.9);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.35s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-close {
  position: absolute; top: 24px; right: 32px;
  font-size: 2rem; color: var(--white); background: none; border: none;
  cursor: pointer; z-index: 201; transition: opacity 0.2s ease;
}
.lightbox-close:hover { opacity: 0.7; }
.lightbox-content { max-width: 90vw; max-height: 88vh; overflow-y: auto; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav-inner { padding: 0 20px; position: relative; }
  .nav-toggle { display: flex; }
  .nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
  .nav-links {
    position: absolute; top: calc(100% + 10px); right: 20px;
    display: flex; flex-direction: column; gap: 0;
    min-width: 168px; padding: 10px 0;
    background: rgba(230, 241, 251, 0.96);
    border: 1px solid rgba(36,50,114,0.1); border-radius: 14px;
    box-shadow: 0 14px 34px rgba(36,50,114,0.12);
    backdrop-filter: blur(12px);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  }
  .nav.menu-open .nav-links { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-link { display: block; padding: 10px 18px; font-size: 0.8rem; white-space: nowrap; }
  .nav-link::after { display: none; }
  .nav-link.active { background: rgba(36,50,114,0.06); }

  .hero-title { font-size: 1.6rem; }
  .hero-sub { font-size: 0.82rem; }

  .intro-row { flex-direction: column; align-items: center; text-align: center; gap: 24px; }
  .intro-photo { flex: none; width: 160px; }
  .intro-spacer { display: none; }
  .intro-text { max-width: 100%; text-align: left; }
  .intro-text p { text-align: left; text-indent: 0; }

  .carousel-card { width: 220px; }
  .carousel-card-img { height: 150px; }

  .app-row,
  .app-row:nth-child(even) {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }
  .app-phone { flex: none; width: 100%; justify-content: center; }
  .app-spacer { display: none; }
  .app-info { max-width: 100%; text-align: left; }
  .app-title { text-align: center; }
  .app-desc,
  .app-meta { text-align: left; }

  .dashboard-showcase { flex-direction: column; gap: 28px; }
  .dashboard-visual { flex: none; width: 100%; box-sizing: border-box; }
  .dashboard-info,
  .dashboard-desc { text-align: left; }
  .dashboard-title { text-align: center; }
  .dashboard-link { display: flex; width: fit-content; margin-left: auto; margin-right: auto; }

  .photo-container { padding: 0 20px; }
  .photo-grid { grid-template-columns: 1fr; }
  .photo-extra-wrapper { grid-template-columns: 1fr; }
  .photo-grid.expanded .photo-extra-wrapper { max-height: none; }
  .masonry-img { aspect-ratio: 3 / 2; min-height: 0; }

  .writing-grid { align-items: center; }
  .writing-list { width: 100%; }
  .writing-qr { width: 200px; }
  .about { padding: 80px 0 60px; }
}