/* ============================================================
   FANG XING PORTFOLIO · 美术馆画册风 + 深色 3C 影棚区
   Clear Typographic Scale · Pure Visual Cards · Mobile Optimized
   ============================================================ */

:root {
  --bg-light: #F5F4F0;
  --bg-light-alt: #ECEAE4;
  --surface-light: #FFFFFF;
  --ink-dark: #141414;
  --ink-muted: #4D4B46;
  --line-light: rgba(20, 20, 20, 0.14);

  --bg-dark: #0E0E10;
  --card-dark: #18181B;
  --ink-light: #F2F2F2;
  --ink-dark-muted: #A1A1AA;
  --line-dark: rgba(255, 255, 255, 0.12);

  --accent: #1C4B6E;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;

  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1320px;
}

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

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

body {
  margin: 0;
  background-color: var(--bg-light);
  color: var(--ink-dark);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
}

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

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

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

.mono {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

#works,
#dark-studio,
#video-compare,
#about,
#contact {
  scroll-margin-top: 80px;
}

/* ============================================================
   HEADER & MOBILE NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 244, 240, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-light);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 15px;
  color: var(--ink-muted);
}

.nav-links a {
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--ink-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.lang-toggle .active {
  color: var(--ink-dark);
  font-weight: 700;
}

.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--ink-dark);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-outline-sm:hover {
  background-color: var(--ink-dark);
  color: var(--bg-light);
}

.mobile-menu-btn {
  display: none;
  padding: 7px 11px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-light);
  background: var(--bg-light);
}

.mobile-nav a {
  padding: 12px 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  border-right: 1px solid var(--line-light);
}

.mobile-nav a:last-child {
  border-right: none;
}

/* ============================================================
   HERO: 姓名与定位 → 代表作品 → 一句说明 → 两个按钮
   ============================================================ */
.hero {
  padding: clamp(32px, 5vw, 68px) 0 clamp(40px, 5.5vw, 72px);
  border-bottom: 1px solid var(--line-light);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.28fr 0.72fr;
  grid-template-areas:
    "head visual"
    "foot visual";
  gap: 24px clamp(24px, 3.5vw, 52px);
  align-items: center;
}

.hero-head {
  grid-area: head;
  align-self: end;
}

.hero-visual {
  grid-area: visual;
  margin: 0;
  cursor: pointer;
}

.hero-foot {
  grid-area: foot;
  align-self: start;
}

.hero-name {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.hero-title {
  margin: 0;
  font-size: clamp(44px, 4.0vw, 58px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 0 0 26px;
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--ink-muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 13px 26px;
  background: var(--ink-dark);
  color: var(--bg-light);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 13px 26px;
  border: 1px solid var(--ink-dark);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
  background: var(--ink-dark);
  color: var(--bg-light);
}

.hero-figcap {
  padding-top: 10px;
  font-size: 14px;
  color: var(--ink-muted);
}

/* ============================================================
   IMAGE FRAMES & SECTION HEADINGS
   ============================================================ */
.section-title {
  margin: 0;
  font-size: clamp(30px, 2.5vw, 40px);
  line-height: 1.2;
  font-weight: 700;
}

.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line-light);
  background: var(--surface-light);
}

.section-dark .img-frame {
  border-color: var(--line-dark);
  background: var(--card-dark);
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.img-frame.fit-contain {
  background: #FFFFFF;
}

.section-dark .img-frame.fit-contain {
  background: #0B0B0D;
}

.img-frame.fit-contain img {
  object-fit: contain;
  padding: 10px;
}

.project-card:hover .img-frame img,
.hero-visual:hover .img-frame img,
.wf-thumb-btn:hover img,
.sbs-item:hover img {
  transform: scale(1.02);
}

.ratio-square { aspect-ratio: 1 / 1; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-16-10 { aspect-ratio: 16 / 10; }
.ratio-5-4 { aspect-ratio: 5 / 4; }

/* ============================================================
   FILTER BAR (精选作品 + 统一分类筛选 → 直接出图)
   ============================================================ */
.filter-bar-wrap {
  position: sticky;
  top: 68px;
  z-index: 30;
  background: rgba(245, 244, 240, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-light);
}

.filter-bar-inner {
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--ink-dark);
  color: var(--ink-dark);
}

.filter-btn.active {
  background: var(--ink-dark);
  color: var(--bg-light);
  border-color: var(--ink-dark);
}

/* ============================================================
   MAGAZINE GALLERY (12-COL ASYMMETRIC)
   ============================================================ */
.gallery-section {
  padding: clamp(32px, 4.5vw, 56px) 0 clamp(44px, 5.5vw, 72px);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--ink-light);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.dark-title {
  color: var(--ink-light);
  margin-bottom: clamp(24px, 3vw, 36px);
}

.magazine-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(28px, 3.2vw, 48px) clamp(18px, 2vw, 28px);
}

.project-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.project-card.is-dark-card {
  background: var(--bg-dark);
  color: var(--ink-light);
  padding: 18px;
  border-radius: var(--radius);
}

.project-card.is-dark-card .img-frame {
  border-color: var(--line-dark);
  background: var(--card-dark);
}

.project-card.is-dark-card .card-sub {
  color: var(--ink-dark-muted);
}

.project-card.is-dark-card .card-link {
  color: #82B8E0;
}

.span-12 { grid-column: span 12; }
.span-7  { grid-column: span 7; }
.span-6  { grid-column: span 6; }
.span-5  { grid-column: span 5; }

.project-card.horizontal-card {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(20px, 2.8vw, 40px);
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line-light);
}

.section-dark .project-card.horizontal-card {
  border-top-color: var(--line-dark);
}

.card-body {
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-card.horizontal-card .card-body {
  padding-top: 0;
}

.card-title {
  margin: 0;
  font-size: clamp(22px, 1.7vw, 26px);
  line-height: 1.3;
  font-weight: 700;
}

.card-sub {
  margin: 0;
  font-size: 16px;
  color: var(--ink-muted);
}

.section-dark .card-sub {
  color: var(--ink-dark-muted);
}

.card-link {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.section-dark .card-link {
  color: #82B8E0;
}

/* ============================================================
   VIDEO & COMPARISON LAB
   ============================================================ */
.lab-section {
  padding: clamp(48px, 6vw, 84px) 0;
  border-bottom: 1px solid var(--line-light);
}

.lab-section .section-title {
  margin-bottom: clamp(24px, 3vw, 36px);
}

.video-block {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
  margin-bottom: clamp(44px, 5vw, 68px);
}

.video-frame-wrap {
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0E0E10;
}

.video-frame-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 1.8vw, 26px);
  font-weight: 700;
}

.video-meta {
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--ink-muted);
}

.process-fold {
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.process-toggle {
  padding: 13px 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.process-toggle::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
}

.process-fold[open] .process-toggle::after {
  content: "−";
}

.process-body {
  padding-bottom: 16px;
}

.process-note {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-muted);
}

.workflow-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wf-thumb-btn {
  text-align: left;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  overflow: hidden;
  background: #FFFFFF;
}

.wf-thumb-btn img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.wf-thumb-btn span {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  border-top: 1px solid var(--line-light);
}

/* Comparisons */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 40px);
}

.compare-head {
  margin-bottom: 14px;
}

.compare-head h3 {
  margin: 0 0 4px;
  font-size: clamp(20px, 1.6vw, 24px);
  font-weight: 700;
}

.compare-head p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.ba-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line-light);
  background: #FFFFFF;
  aspect-ratio: 10 / 7;
  user-select: none;
  touch-action: pan-y;
  --pos: 50%;
}

.ba-slider .ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-before-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.ba-label {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius);
  background: rgba(14, 14, 16, 0.78);
  color: #FFFFFF;
  pointer-events: none;
}

.ba-label-left { left: 12px; }
.ba-label-right { right: 12px; }

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(20, 20, 20, 0.30);
  transform: translateX(-50%);
  cursor: ew-resize;
}

.ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink-dark);
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sbs-item {
  margin: 0;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  overflow: hidden;
  background: #FFFFFF;
  cursor: pointer;
}

.sbs-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.sbs-item figcaption {
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  border-top: 1px solid var(--line-light);
}

/* ============================================================
   ABOUT (RESUME) & CONTACT (COLLABORATION) - TWO SEPARATE BLOCKS
   ============================================================ */
.about-section,
.contact-section {
  padding: clamp(48px, 6vw, 84px) 0;
  border-bottom: 1px solid var(--line-light);
}

.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.timeline {
  border-top: 1px solid var(--line-light);
}

.timeline-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-light);
}

.tl-time {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  padding-top: 3px;
}

.tl-body h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.tl-body p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-muted);
}

.skills-bar {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.skills-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-dark);
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-tags span {
  padding: 5px 11px;
  font-size: 13px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.70);
}

/* Contact & Services */
.contact-section .section-title {
  margin-bottom: 28px;
}

.collab-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-light);
}

.service-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-light);
}

.service-list h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.service-list p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-muted);
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr 144px;
  gap: 20px;
  padding: 24px;
  background: #FFFFFF;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  align-items: center;
}

.contact-city {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-muted);
}

.contact-row {
  padding: 14px 0;
  border-top: 1px solid var(--line-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-k {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.contact-v {
  font-size: 15px;
  font-weight: 600;
  word-break: break-all;
}

.contact-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copy-btn {
  padding: 7px 14px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.2s ease;
}

.copy-btn:hover {
  border-color: var(--ink-dark);
}

.qr-trigger {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  text-align: center;
  background: var(--bg-light);
}

.qr-trigger img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-bottom: 6px;
}

.qr-trigger span {
  display: block;
  font-size: 12px;
  color: var(--ink-muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 22px 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   LIGHTBOX (3-ROW BRIEF + SUB-PROJECTS + ZOOM / LONG-READ + SWIPE)
   ============================================================ */
.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(8px);
}

.lightbox-shell {
  position: relative;
  z-index: 1;
  width: min(96vw, 1340px);
  max-width: 100%;
  height: 94vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  color: #F2F2F2;
  overflow: hidden;
}

.lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.lb-head-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.lb-title {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-counter {
  font-size: 13px;
  color: #82B8E0;
  white-space: nowrap;
  flex-shrink: 0;
}

.lb-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lb-action-btn,
.lb-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  font-size: 13px;
  color: #F2F2F2;
  white-space: nowrap;
}

.lb-action-btn[aria-pressed="true"] {
  background: #FFFFFF;
  color: #0E0E10;
  border-color: #FFFFFF;
}

.lb-close:hover,
.lb-action-btn:hover {
  background: #FFFFFF;
  color: #0E0E10;
}

.esc-hint {
  font-size: 11px;
  opacity: 0.75;
}

.lb-info-bar[hidden],
.lb-info-drawer[hidden],
.lb-subgroups[hidden] {
  display: none;
}

.lb-info-bar {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 13px;
}

.lb-one-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lb-summary-text {
  color: #E4E4E7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-info-toggle {
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  font-size: 12px;
  color: #82B8E0;
  white-space: nowrap;
  flex-shrink: 0;
}

.lb-info-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.lb-info-drawer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}

.lb-brief-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.lb-brief-row strong {
  color: #82B8E0;
  white-space: nowrap;
  flex-shrink: 0;
}

.lb-brief-row span {
  color: #E4E4E7;
}

.lb-subgroups {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
}

.lb-sub-btn {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  font-size: 12px;
  color: #D4D4D8;
}

.lb-sub-btn.active {
  background: #FFFFFF;
  color: #0E0E10;
  border-color: #FFFFFF;
  font-weight: 600;
}

.lightbox-stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 56px;
  overflow: hidden;
}

.lb-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}

/* 模式 1：展开长图（按容器/屏幕宽度显示，向下连续纵向阅读，无横向裁剪） */
.lb-img-wrap.mode-scroll {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 56px;
  text-align: center;
  touch-action: pan-y;
}

.lb-img-wrap.mode-scroll img {
  max-width: min(100%, 880px);
  width: 100%;
  max-height: none;
  height: auto;
  margin: 0 auto;
}

/* 模式 2：放大细节（支持横向、纵向双方向拖动与滚轮浏览） */
.lb-img-wrap.mode-zoom {
  display: block;
  overflow: auto;
  padding: 8px;
  cursor: grab;
  touch-action: pan-x pan-y;
}

.lb-img-wrap.mode-zoom:active {
  cursor: grabbing;
}

.lb-img-wrap.mode-zoom img {
  max-width: none;
  max-height: none;
  width: max(180%, 1000px);
  height: auto;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(24, 24, 27, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  font-size: 18px;
  display: grid;
  place-items: center;
}

.lb-nav:hover {
  background: #FFFFFF;
  color: #0E0E10;
}

.lb-prev { left: 6px; }
.lb-next { right: 6px; }

.lightbox-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-caption {
  margin: 0;
  font-size: 14px;
  color: #D4D4D8;
  text-align: center;
}

.lb-thumbs {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  justify-content: flex-start;
  padding-bottom: 4px;
}

@media (min-width: 769px) {
  .lb-thumbs {
    justify-content: center;
  }
}

.lb-thumb {
  flex: 0 0 58px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0.45;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.lb-thumb.active,
.lb-thumb:hover {
  opacity: 1;
  border-color: #FFFFFF;
}

.lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  padding: 10px 18px;
  background: var(--ink-dark);
  color: #FFFFFF;
  font-size: 13px;
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 120;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ============================================================
   MOBILE & TABLET RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .video-block,
  .compare-grid,
  .collab-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 60px;
    gap: 8px;
  }

  .brand {
    font-size: 14px;
  }

  .header-actions .btn-outline-sm {
    display: none;
  }

  /* 手机首屏：姓名与定位 → 代表作品 → 一句说明 → 两个按钮 */
  .hero {
    padding: 24px 0 32px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "visual"
      "foot";
    gap: 18px;
  }

  .hero-title {
    font-size: clamp(25px, 7.0vw, 29px);
    letter-spacing: -0.02em;
  }

  .section-title {
    font-size: clamp(26px, 6.5vw, 30px);
  }

  .card-title {
    font-size: clamp(20px, 5.2vw, 23px);
  }

  .filter-bar-wrap {
    position: static;
  }

  .magazine-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .span-12,
  .span-7,
  .span-6,
  .span-5 {
    grid-column: span 1;
  }

  .project-card.horizontal-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 0;
    border-top: none;
  }

  .timeline-item,
  .contact-card,
  .side-by-side {
    grid-template-columns: 1fr;
  }

  .esc-hint {
    display: none;
  }

  .lb-info-bar {
    padding: 7px 10px;
    font-size: 12px;
  }

  .lb-info-drawer {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .lb-img-wrap,
  .lb-img-wrap.mode-scroll {
    padding: 0 8px;
  }

  .lb-img-wrap.mode-zoom img {
    width: max(220%, 760px);
  }

  .lb-action-btn,
  .lb-close {
    padding: 5px 8px;
    font-size: 12px;
  }

  .lb-nav {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
}
