/* ============================================================
   个人作品集站点 · 纯黑极简主题（结构参考 Format 模板布局）
   所有颜色 / 字体 / 间距集中在 :root，想换风格改这里即可
   ============================================================ */
:root {
  --bg: #000000;              /* 全站背景 */
  --text: #ffffff;            /* 正文白色 */
  --text-dim: #9b9b9b;        /* 次要文字灰 */
  --accent: #fcc55d;          /* 金色链接（换主题色就改这） */
  --accent-hover: #f5efe0;    /* 链接悬停色 */
  --line: rgba(255, 255, 255, .5);
  --max-width: 1140px;        /* 内容区最大宽度 */
  --font-main: "Space Grotesk", "Helvetica Neue", Helvetica, -apple-system,
               "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.7;
}
body.noscroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: underline; transition: color .2s ease; }
a:hover { color: var(--accent-hover); }
::selection { background: var(--accent); color: #000; }

/* ---------------- Header ---------------- */
.header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg);
}
.header .wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 34px 30px 26px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}
.logo a {
  color: #fff;
  text-decoration: none;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* 桌面端内联菜单 */
.main-menu {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: baseline;
  padding-top: 6px;
}
.main-menu > li > a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .06em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.main-menu > li > a:hover { border-bottom-color: #fff; }
.main-menu > li.selected > a { color: var(--accent); }

/* Work 下拉 */
.category { position: relative; }
.secondary-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -18px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, .18);
  padding: 12px 0;
  min-width: 170px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all .22s ease;
}
.category:hover .secondary-menu,
.category:focus-within .secondary-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.secondary-menu li a {
  display: block;
  padding: 6px 20px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .05em;
}
.secondary-menu li a:hover { color: #fff; }

/* 汉堡按钮（默认隐藏，移动端启用） */
.toggle-menu {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 130;
}
.toggle-menu svg { display: block; }
.toggle-menu .close { display: none; }
body.menu-open .toggle-menu .close { display: block; }
body.menu-open .toggle-menu .open { display: none; }

/* ---------------- 首页作品网格 ---------------- */
.gallery {
  max-width: calc(var(--max-width) + 40px);
  margin: 0 auto;
  padding: 150px 30px 60px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.asset {
  width: calc(50% - 5px);
  cursor: pointer;
  position: relative;
}
.asset .thumb {
  position: relative;
  overflow: hidden;
  background: #0d0d0d;
}
.asset img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: opacity .3s ease, transform .6s ease;
}
.asset:hover img { opacity: .82; transform: scale(1.02); }
.play-indicator {
  position: absolute;
  top: 50%; left: 50%;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.asset:hover .play-indicator { opacity: 1; }
@media (max-width: 767px) {
  .asset { width: 100%; }
}

/* ---------------- 内容页（About / Contact） ---------------- */
.content-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 150px 30px 60px;
}
.row {
  display: flex;
  gap: 46px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.sixcol { flex: 1 1 440px; min-width: 0; }
.sixcol p { margin-bottom: 1em; }
.xl-headline {
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.5;
  font-weight: 700;
  margin-bottom: .6em;
}
.section-image img { width: 100%; }

/* 分节标题：标题 + 延伸横线 */
.divider-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 64px 0 40px;
}
.divider-row h2 {
  font-size: 23px;
  font-weight: 700;
  white-space: nowrap;
}
.divider-row .line { flex: 1; height: 1px; background: rgba(255, 255, 255, .25); }

/* 设备清单 */
.kit-list { list-style: none; }
.kit-list li {
  padding: 9px 0 9px 26px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.kit-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 18px;
  width: 8px; height: 1px;
  background: var(--accent);
}

/* 联系表单 */
.contact-form { max-width: 620px; }
.contact-form label {
  display: block;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 22px 0 8px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  color: #fff;
  padding: 12px 14px;
  font: inherit;
  border-radius: 2px;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: #fff; }
.contact-form textarea { min-height: 140px; resize: vertical; }
.btn {
  margin-top: 26px;
  background: #000;
  border: 1px solid var(--line);
  color: #fff;
  padding: 12px 38px;
  font: inherit;
  font-size: 16px;
  letter-spacing: .06em;
  cursor: pointer;
  border-radius: 2px;
  transition: background .25s ease, color .25s ease;
}
.btn:hover { background: #fff; color: #000; }
.form-hint { margin-top: 18px; color: var(--text-dim); font-size: 12px; }

/* 404 */
.error-page { text-align: center; padding: 220px 30px 120px; }
.error-page h1 { font-size: clamp(60px, 12vw, 140px); line-height: 1; margin-bottom: 20px; }

/* ---------------- Footer ---------------- */
.footer {
  padding: 80px 30px 44px;
  text-align: center;
}
.social {
  display: flex;
  justify-content: center;
  gap: 28px;
  list-style: none;
  margin-bottom: 26px;
}
.social a { color: #fff; opacity: .85; }
.social a:hover { color: var(--accent); opacity: 1; }
.social svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.copyright {
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: .12em;
}

/* ---------------- 视频弹层 Lightbox ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .94);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all .25s ease;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox .frame {
  width: min(1100px, 92vw);
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox iframe { width: 100%; height: 100%; border: 0; }
.lightbox .placeholder-note { color: var(--text-dim); text-align: center; padding: 30px; }
.lightbox .close-btn {
  position: absolute;
  top: 26px; right: 34px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 15px;
  letter-spacing: .12em;
  cursor: pointer;
  text-transform: uppercase;
}
.lightbox .close-btn:hover { color: var(--accent); }

/* ---------------- 移动端 ---------------- */
@media (max-width: 900px) {
  .toggle-menu { display: block; }
  .menu {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .25s ease;
  }
  body.menu-open .menu { opacity: 1; visibility: visible; }
  body.menu-open { overflow: hidden; }
  .main-menu {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 0;
  }
  .main-menu > li > a { font-size: 20px; }
  .secondary-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    padding: 4px 0 0;
    min-width: 0;
  }
  .secondary-menu li a { font-size: 14px; color: var(--text-dim); }
}
@media (max-width: 767px) {
  .header .wrapper { padding: 20px 18px 16px; }
  .logo a { font-size: 19px; }
  .gallery { padding: 110px 18px 40px; }
  .content-wrapper { padding: 110px 18px 40px; }
  .footer { padding: 60px 18px 36px; }
}

/* ---------------- Work 单页（主视频 + 项目组照片墙 + 灯箱） ---------------- */
.work-page {
  max-width: calc(var(--max-width) + 40px);
  margin: 0 auto;
  padding: 150px 30px 40px;
}
.hero-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d0d0d;
  border: 1px dashed #3a3a3a;
  overflow: hidden;
  margin-bottom: 10px;
}
.hero-video img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.hero-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- 项目组网格：一行四个 ---- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.photo-group { position: relative; margin: 0; }
.cover {
  position: relative;
  overflow: hidden;
  background: #0d0d0d;
  cursor: pointer;
}
.cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.215, .61, .355, 1), opacity .3s ease;
}
.photo-group:hover .cover img { transform: scale(1.04); }

/* hover：底部滑出组内缩略图（动效：上滑 + 淡入） */
.thumbs {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 6px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .88));
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .28s ease, transform .32s cubic-bezier(.215, .61, .355, 1);
  pointer-events: none;
}
.photo-group:hover .thumbs,
.photo-group:focus-within .thumbs {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.thumb {
  flex: 0 0 auto;
  width: 58px;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .25);
  background: none;
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover {
  opacity: 1;
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* ---- 大图模式灯箱：模糊透明加黑 ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: blur(0px) saturate(1);
  backdrop-filter: blur(0px) saturate(1);
  opacity: 0;
  visibility: hidden;
  transition: opacity .32s ease, visibility .32s,
              -webkit-backdrop-filter .45s ease, backdrop-filter .45s ease;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
  -webkit-backdrop-filter: blur(18px) saturate(.85);
  backdrop-filter: blur(18px) saturate(.85);
}
.lb-stage {
  position: relative;
  margin: 0;
  max-width: min(1100px, 92vw);
  text-align: center;
}
.lb-img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .65);
  opacity: 0;
  transform: scale(.94);
  transition: opacity .32s ease, transform .36s cubic-bezier(.215, .61, .355, 1);
}
.lb-img.ready { opacity: 1; transform: scale(1); }

/* 简介 + 计数：只在灯箱里显示，淡入上浮 */
.lb-caption {
  margin-top: 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s ease .12s, transform .3s ease .12s;
}
.lightbox.active .lb-caption { opacity: 1; transform: translateY(0); }
.lb-title { font-size: 13px; letter-spacing: .08em; color: #fff; }
.lb-count {
  margin-top: 5px;
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--text-dim);
}

/* 灯箱按钮 */
.lb-close {
  position: absolute;
  top: 26px; right: 34px;
  background: none;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 14px;
  letter-spacing: .12em;
  cursor: pointer;
  transition: color .2s ease;
}
.lb-close:hover { color: var(--accent); }
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(0, 0, 0, .45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .22s ease, color .22s ease, transform .22s ease;
}
.lb-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}
.lb-prev { left: 24px; }
.lb-next { right: 24px; }

@media (max-width: 900px) {
  .work-page { padding: 110px 18px 30px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }  /* 平板两列 */
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
  .lb-arrow { width: 40px; height: 40px; }
}
@media (max-width: 480px) {
  .photo-grid { grid-template-columns: 1fr; }             /* 手机一列 */
}
