/* ========================================
   周荣豪 个人作品集 — 全局样式
   简约现代风格 · 数据驱动画廊 · 单页布局
   ======================================== */

/* ---- CSS 变量 ---- */
:root {
  /* 颜色 */
  --color-bg: #fafaf8;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-text-light: #6b6b6b;
  --color-text-lighter: #999999;
  --color-accent: #8b6f5e;       /* 和风暖棕 */
  --color-accent-light: #c4a88c;
  --color-accent-glow: #a08070;
  --color-border: #e8e4e0;
  --color-border-subtle: #e8e4e0;
  --color-overlay: rgba(0,0,0,0.92);

  /* 社交平台色 */
  --pixiv-color: #8b6f5e;
  --bilibili-color: #00aeec;
  --mihuashi-color: #f0833a;
  --qq-color: #12b7f5;
  --email-color: #4caf84;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;

  /* 间距 */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* 尺寸 */
  --max-width: 1200px;
  --nav-height: 64px;

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

  /* 过渡 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

/* ---- 导航栏 ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(250,250,248,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.3s var(--ease-out);
}

.navbar.scrolled {
  box-shadow: 0 1px 0 var(--color-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--color-text-light);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-accent);
  transition: width 0.25s var(--ease-out);
}

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

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

/* 社交图标 */
.social-icons {
  display: flex;
  gap: var(--space-sm);
  margin-left: var(--space-md);
}

.social-icons a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-border);
  transition: background 0.2s, transform 0.2s;
}

.social-icons a:hover {
  background: var(--color-accent-light);
  transform: translateY(-2px);
}

.social-icons svg,
.social-icons img {
  width: 18px;
  height: 18px;
}

/* 汉堡菜单按钮 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Hero 区域 ---- */
#hero {
  padding: calc(var(--nav-height) + var(--space-xl)) var(--space-md) var(--space-xl);
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

#heroContent {
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid var(--color-accent-light);
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: var(--space-md);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.hero h1 strong {
  font-weight: 600;
}

.hero p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.8;
}

.scroll-indicator {
  margin-top: clamp(40px, 8vh, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--color-text-lighter);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* ---- Section Header ---- */
.section-header {
  text-align: center;
  padding: 80px 24px 40px;
}

.section-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.title-cn {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--color-text);
  letter-spacing: 0.15em;
}

.title-en {
  font-size: 0.75rem;
  color: var(--color-text-lighter);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.section-desc {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--color-text-light);
  letter-spacing: 0.08em;
}

/* ---- 分类标签栏 ---- */
.category-bar {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 0 24px 16px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.cat-btn {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 10px 32px;
  background: transparent;
  color: var(--color-text-light);
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.35s var(--ease-out);
}

.cat-btn:hover {
  color: var(--color-accent);
}

.cat-btn.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.cat-btn .cat-count {
  font-size: 0.65rem;
  opacity: 0.5;
  margin-left: 4px;
}

/* ---- 画廊 (Masonry 列布局) ---- */
.gallery {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.gallery-grid {
  column-gap: 12px;
  padding: 0 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.gallery-grid.cols-3 { column-count: 3; }
.gallery-grid.cols-4 { column-count: 4; }
.gallery-grid.cols-5 { column-count: 5; }

/* 插画 — Masonry + 壁纸全宽 */
.gallery-grid.cols-grid {
  column-count: 4;
  column-gap: 12px;
}
.gallery-grid.cols-grid .gallery-item.landscape {
  column-span: all;
}

/* 视频分类 — 居中显示 */
.gallery-grid.cols-center {
  column-count: unset;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.gallery-grid.cols-center .gallery-item {
  max-width: 500px;
  width: 100%;
}

/* 制品子分类间隔 */
.product-spacer-full {
  column-span: all;
  height: 48px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  transform-style: preserve-3d;
  perspective: 800px;
  content-visibility: auto;
  contain-intrinsic-size: auto 200px;
}

.gallery-item:hover {
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease-out);
}

.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.04);
}

/* 作品叠加层 */
.gallery-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.78), transparent);
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.35s var(--ease-out);
  pointer-events: none;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item-title {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-item-cat {
  font-size: 0.7rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* 徽章 */
.gif-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.1em;
  z-index: 3;
}

.cat-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.6rem;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 0.08em;
  z-index: 3;
  background: rgba(255,255,255,0.85);
  color: var(--color-accent);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(4px);
}

/* 过滤 & 动画 */
.gallery-item.hidden {
  display: none;
}

.gallery-item.fade-in {
  opacity: 0;
  transform: translateY(24px);
}

.gallery-item.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* 空状态 */
.gallery-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--color-text-lighter);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

/* ---- 分类快捷导航 ---- */
.section-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 40px 24px 60px;
  max-width: 700px;
  margin: 0 auto;
}

.section-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.35s var(--ease-out);
}

.section-nav-card:hover,
.section-nav-card.active {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent-light);
}

.section-nav-card.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.section-nav-card.active .section-nav-icon,
.section-nav-card.active .section-nav-label,
.section-nav-card.active .section-nav-count {
  color: #fff;
}

.section-nav-icon {
  color: var(--color-accent);
  opacity: 0.7;
  transition: opacity 0.3s;
}

.section-nav-card:hover .section-nav-icon {
  opacity: 1;
}

.section-nav-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.06em;
}

.section-nav-count {
  font-size: 0.7rem;
  color: var(--color-text-lighter);
}

/* ---- 涟漪 ---- */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(139, 111, 94, 0.3);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out forwards;
  pointer-events: none;
  z-index: 5;
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ---- 灯箱 ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--color-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
}

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

/* 动图/徽章 — 透明模糊背景 */
.lightbox.blur-bg {
  background: rgba(250, 250, 248, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-info {
  margin-top: 16px;
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
  z-index: 10;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox-close {
  top: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
}

.lightbox-prev { left: var(--space-md); }
.lightbox-next { right: var(--space-md); }

/* ---- 浮动按钮 ---- */
.float-btns {
  position: fixed;
  bottom: 36px;
  right: 36px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease-out);
}

.float-btns.visible {
  opacity: 1;
  pointer-events: all;
}

.float-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.float-btn:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  width: auto;
  border-radius: 24px;
  padding: 0 18px;
  gap: 8px;
  transform: scale(1.05);
}

.float-btn::after {
  content: attr(data-label);
  font-size: 0.75rem;
  white-space: nowrap;
  letter-spacing: 0.06em;
  max-width: 0;
  overflow: hidden;
  transition: max-width 0.3s ease;
}

.float-btn:hover::after {
  max-width: 80px;
}

/* ---- 关于 Section ---- */
#about {
  padding-bottom: 80px;
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}

.about-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.about-avatar {
  position: relative;
  width: 160px;
  height: 160px;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.stamp {
  position: absolute;
  bottom: -8px;
  right: -8px;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  padding: 4px 8px;
  border-radius: 6px;
  transform: rotate(-8deg);
  background: var(--color-bg);
  letter-spacing: 0.2em;
  opacity: 0.85;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-name {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--color-text);
  letter-spacing: 0.15em;
}

.about-bio {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-bio p {
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 2;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.about-tools { margin-top: 20px; }
.about-tools h3 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text-lighter);
  margin-bottom: 6px;
}
.about-tools p {
  font-size: 0.88rem;
  color: var(--color-text-light);
}

.tag {
  font-size: 0.7rem;
  padding: 4px 12px;
  background: var(--color-surface);
  color: var(--color-accent);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  letter-spacing: 0.06em;
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: var(--space-md);
  margin-top: 16px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-md);
  padding-left: var(--space-md);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-accent-light);
}

.timeline-year {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 2px;
}

.timeline-text {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* 委托须知 */
.commission-info p {
  color: var(--color-text-light);
  line-height: 2;
  margin-bottom: var(--space-sm);
}

/* ---- 联系卡片 ---- */
.contact-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  transition: all 0.35s var(--ease-out);
}

.contact-card:hover {
  transform: translateY(-3px);
}

.contact-card.pixiv:hover { border-color: var(--color-accent); box-shadow: 0 6px 20px rgba(139,111,94,0.15); }
.contact-card.bilibili:hover { border-color: var(--bilibili-color); box-shadow: 0 6px 20px rgba(0,174,236,0.12); }
.contact-card.mihuashi:hover { border-color: var(--mihuashi-color); box-shadow: 0 6px 20px rgba(240,131,58,0.12); }
.contact-card.qq:hover { border-color: var(--qq-color); box-shadow: 0 6px 20px rgba(18,183,245,0.12); }
.contact-card.wechat:hover { border-color: #07c160; box-shadow: 0 6px 20px rgba(7,193,96,0.12); }
.contact-card.email:hover { border-color: var(--email-color); box-shadow: 0 6px 20px rgba(76,175,132,0.12); }

.contact-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
}

.contact-label {
  font-size: 0.85rem;
  color: var(--color-text);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.contact-id {
  font-size: 0.7rem;
  color: var(--color-text-lighter);
  white-space: nowrap;
}

/* ---- 页脚 ---- */
#contact {
  padding-bottom: 40px;
}

.footer-decoration {
  display: flex;
  justify-content: center;
  padding: 20px 0 0;
}

.footer-seal {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--color-accent-light);
  opacity: 0.2;
  letter-spacing: 0.5em;
  user-select: none;
}

.footer-bottom {
  text-align: center;
  padding: 32px 24px 16px;
  border-top: 1px solid var(--color-border);
  max-width: var(--max-width);
  margin: 0 auto;
  color: var(--color-text-lighter);
  font-size: 0.8rem;
}

.footer-bottom p {
  margin-bottom: 4px;
}

/* ---- 关于页淡入 ---- */
.about-section.fade-in {
  opacity: 0;
  transform: translateY(24px);
}

.about-section.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ---- 分区标题 (关于/联系 内部) ---- */
.about-section {
  margin-bottom: var(--space-lg);
}

.about-section h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.about-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

/* ========================================
   响应式
   ======================================== */

/* 平板 (≤1024px) */
@media (max-width: 1024px) {
  .gallery-grid.cols-3,
  .gallery-grid.cols-4,
  .gallery-grid.cols-5 {
    column-count: 3;
  }

  .gallery-grid.cols-grid { column-count: 3; }

  .gallery-grid { padding: 0 16px; }

  .about-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .about-visual { margin: 0 auto; }
  .about-tags { justify-content: center; }

  .contact-links { gap: 12px; }
  .contact-card { padding: 12px 18px; }
  .contact-id { display: none; }
}

/* 手机 (≤768px) */
@media (max-width: 768px) {
  :root {
    --space-xl: 4rem;
    --space-lg: 2.5rem;
  }

  /* 导航 */
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(250,250,248,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-sm);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease-out), opacity 0.35s;
    border-bottom: 1px solid var(--color-border);
  }

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

  .social-icons {
    margin-left: 0;
    margin-top: var(--space-xs);
  }

  .hamburger {
    display: flex;
  }

  /* 画廊 */
  .gallery-grid.cols-3,
  .gallery-grid.cols-4,
  .gallery-grid.cols-5 {
    column-count: 2;
    column-gap: 8px;
  }

  .gallery-grid.cols-grid { column-count: 2; }

  .gallery-grid { padding: 0 12px; }

  .gallery-grid.cols-center .gallery-item {
    max-width: 100%;
  }

  .gallery-item { margin-bottom: 8px; }

  /* 分类栏 */
  .cat-btn {
    font-size: 0.85rem;
    padding: 8px 20px;
  }

  /* 灯箱 */
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .lightbox-prev { left: var(--space-xs); }
  .lightbox-next { right: var(--space-xs); }

  /* 联系 */
  .contact-links { gap: 10px; }
  .contact-card { padding: 10px 14px; }
  .contact-label { font-size: 0.68rem; }
  .contact-id { display: none; }

  /* 浮动按钮 */
  .float-btns { bottom: 20px; right: 20px; gap: 8px; }
  .float-btn { width: 38px; height: 38px; }
  .float-btn:hover { width: auto; padding: 0 12px; border-radius: 20px; }

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

/* 小手机 (≤480px) */
@media (max-width: 480px) {
  .gallery-grid.cols-3,
  .gallery-grid.cols-4,
  .gallery-grid.cols-5 {
    column-count: 2;
    column-gap: 6px;
  }

  .gallery-grid.cols-grid { column-count: 2; column-gap: 6px; }

  .gallery-grid { padding: 0 4px; }

  .cat-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
  }
}
