/* 翎骜 Lynxir 作品集 — 色板提炼自翎骜皮肤：深空蓝黑底/翎青/孔雀蓝/米金 */
:root {
  --bg: #0D1219;
  --bg2: #131B26;
  --teal: #3EC4B4;
  --peacock: #2581AA;
  --gold: #C9B98A;
  --ink: #E8EEF2;
  --dim: #8A99A8;
  --card: #16202D;
  --line: rgba(62, 196, 180, .25);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

/* ── 导航 ── */
#nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .35s, box-shadow .35s, backdrop-filter .35s;
}
#nav.scrolled {
  background: rgba(13, 18, 25, .82);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-word {   /* 全站唯一 lynxir 标识：早期 Hero 同款流光渐变，放大置最左上 */
  font-size: 27px; font-weight: 700; letter-spacing: 3px;
  background: linear-gradient(120deg, var(--ink) 30%, var(--teal) 50%, var(--ink) 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: titleSheen 7s linear infinite;
}
@keyframes titleSheen { to { background-position: -220% 0; } }
.nav-links a {
  color: var(--dim); text-decoration: none; margin-left: 26px; font-size: 15px;
  position: relative; transition: color .25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--teal); transition: width .3s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

/* ── Hero · 圆环拉扯切换 ── */
.hero {
  position: relative; min-height: 100vh;
  overflow: hidden;
}
.ring-bg {   /* 场景底图双层交叉淡入；拖动时随圆环同步微旋转(放大裁边)；0.84 整体缩小由 JS transform 合成 */
  position: absolute; inset: -20%;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .5s ease;
  filter: saturate(1.05) brightness(.95);
  will-change: transform;
}
.ring-bg.on { opacity: 1; }
.hero-veil {   /* 切换黑场 */
  position: absolute; inset: 0; z-index: 2;
  background: #000; opacity: 0; pointer-events: none;
  transition: opacity .45s ease;
}
.hero-veil.on { opacity: 1; }
.fx-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.ring-stage {   /* 圆环拖拽区 */
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  cursor: grab; user-select: none; touch-action: pan-y;
}
.ring-stage.grabbing { cursor: grabbing; }
/* 26100501 用户拍板：ring-halo 柔光晕下线（底图已是纯场景无需遮对位差，用户嫌它像划定范围的淡灰圈） */
#ringLogo {
  position: relative;
  height: min(50vh, 50vw);
  will-change: transform;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, .5));   /* 柔和暗投影，取代刺眼青色发光 */
  transition: filter .3s;
  pointer-events: none;   /* 事件全由 stage 收 */
}
.ring-stage.grabbing #ringLogo { filter: drop-shadow(0 14px 34px rgba(0, 0, 0, .62)); }
#ringLogo.spin { animation: ringSpin 1.6s linear infinite; }   /* 黑场期圆环=加载图标，慢速防晕 */
#ringLogo.spin.rev { animation-direction: reverse; }           /* 左转方向 */
@keyframes ringSpin { to { transform: rotate(360deg); } }
.ring-caption {
  position: absolute; left: 50%; bottom: 13vh; transform: translateX(-50%); z-index: 4;
  color: var(--ink); letter-spacing: 4px; font-size: 15px; white-space: nowrap;
  opacity: 0; transition: opacity .45s; text-shadow: 0 2px 14px rgba(0, 0, 0, .8);
  pointer-events: none;
}
.ring-caption.on { opacity: .92; }
.ring-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(13, 18, 25, .35);
  color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .3s, background .3s; backdrop-filter: blur(4px);
}
.hero:hover .ring-arrow { opacity: .7; }
.ring-arrow:hover { background: rgba(62, 196, 180, .25); opacity: 1; }
.ring-arrow.left { left: 26px; }
.ring-arrow.right { right: 26px; }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 26px; height: 42px; border: 2px solid rgba(232,238,242,.4); border-radius: 14px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--teal); animation: hintDrop 1.8s ease-in-out infinite;
}
@keyframes hintDrop { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ── 区块通用 ── */
.section { max-width: 1100px; margin: 0 auto; padding: 110px 24px 30px; }
.sec-title {
  font-size: 30px; letter-spacing: 4px; margin-bottom: 40px;
  display: flex; align-items: center; gap: 16px;
}
.sec-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.works-filter { margin: -28px 0 26px; font-size: 14px; color: var(--dim, #8fa39c); }
.works-filter b { color: var(--teal); font-weight: 600; }
.works-filter a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

/* 滚动 reveal */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.3,1); }
.reveal.on { opacity: 1; transform: none; }

/* ── 作品卡 ── */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.work-card {
  background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: 14px;
  overflow: hidden; transform-style: preserve-3d; transition: border-color .3s, box-shadow .3s;
}
.work-card:hover { border-color: var(--teal); box-shadow: 0 12px 40px rgba(62,196,180,.18); }
.work-thumb { height: 150px; background-size: cover; background-position: center; transition: transform .5s; }
.work-card:hover .work-thumb { transform: scale(1.06); }
.work-thumb.placeholder { display: flex; align-items: center; justify-content: center; font-size: 42px; }
.ph-3d { background: linear-gradient(135deg, #1a2a3a, #0f1c2a); }
.ph-3d::before { content: "🐾"; }
.ph-design { background: linear-gradient(135deg, #22302a, #101c18); }
.ph-design::before { content: "🪶"; }
.ph-dev { background: linear-gradient(135deg, #2a2438, #141020); }
.ph-dev::before { content: "⚙️"; }
.work-meta { padding: 16px 18px 20px; }
.work-meta h3 { font-size: 17px; margin-bottom: 6px; }
.work-meta p { color: var(--dim); font-size: 13px; }
.work-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.work-tags span {
  font-size: 11px; color: var(--teal); letter-spacing: 1px;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
}

/* ── 作品详情弹层 ── */
#work-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; }
#work-modal[hidden] { display: none; }
.wm-backdrop { position: absolute; inset: 0; background: rgba(5, 8, 12, .78); backdrop-filter: blur(6px); }
.wm-card {
  position: relative; width: min(880px, 92vw); max-height: 88vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  animation: wmIn .28s cubic-bezier(.2, .7, .3, 1);
}
@keyframes wmIn { from { opacity: 0; transform: translateY(26px) scale(.97); } }
.wm-thumb { height: min(46vh, 400px); background-size: cover; background-position: center; }
.wm-body { padding: 22px 26px 28px; }
.wm-body h3 { font-size: 21px; letter-spacing: 1px; margin-bottom: 6px; }
.wm-sub { color: var(--teal); font-size: 13px; letter-spacing: 1px; margin-bottom: 14px; }
.wm-body > p:last-child { color: var(--ink); line-height: 1.9; font-size: 14.5px; }
.wm-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(13, 18, 25, .72); color: var(--ink); font-size: 22px; cursor: pointer;
  transition: background .25s, transform .25s;
}
.wm-close:hover { background: rgba(62, 196, 180, .3); transform: rotate(90deg); }

/* ── 3D 展区 ── */
#gl-wrap {
  position: relative; height: 70vh; min-height: 460px;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 120%, #14222c 0%, var(--bg) 65%);
}
#gl { width: 100%; height: 100%; display: block; }
#gl-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--dim); letter-spacing: 1px; background: transparent; pointer-events: none;
}
.gl-tip { position: absolute; bottom: 12px; right: 16px; color: var(--dim); font-size: 12px; }

/* ── 关于 / 页脚 ── */
.about-card {
  background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: 14px;
  padding: 28px 30px; line-height: 1.9;
}
.about-card .dim { color: var(--dim); font-size: 13px; margin-top: 10px; }
/* 26100401 v7：联系方式占位槽（点位预留，条目待补） */
.contact-slots { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.contact-slot {
  width: 120px; height: 34px; border-radius: 17px;
  border: 1px dashed rgba(255,255,255,.18); background: rgba(255,255,255,.02);
}
footer {
  margin-top: 90px; padding: 36px 20px 44px; text-align: center; color: var(--dim);
  border-top: 1px solid rgba(255,255,255,.05); font-size: 13px;
}

/* ── 动效控制台 ── */
#fx-panel { position: fixed; right: 18px; bottom: 18px; z-index: 60; }
#fx-toggle {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(22, 32, 45, .9); color: var(--ink); font-size: 20px; cursor: pointer;
  transition: transform .25s, box-shadow .25s;
}
#fx-toggle:hover { transform: rotate(40deg); box-shadow: 0 0 18px rgba(62,196,180,.4); }
#fx-menu {
  position: absolute; right: 0; bottom: 54px; width: 190px;
  background: rgba(22, 32, 45, .96); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 13px; backdrop-filter: blur(8px);
}
#fx-menu p { color: var(--dim); margin-bottom: 8px; font-size: 12px; letter-spacing: 1px; }
#fx-menu label { display: block; padding: 5px 2px; cursor: pointer; }
#fx-menu input { accent-color: var(--teal); margin-right: 6px; }
#fx-menu hr { border: none; border-top: 1px solid rgba(255,255,255,.08); margin: 8px 0; }
#fx-cursor { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

/* ── 26100601 v9 移动端适配（≤768px 平板竖屏 / ≤640px 手机 / ≤380px 小屏） ── */
@media (max-width: 768px) {
  .nav-inner { padding: 12px 16px; }
  .brand-word { font-size: 22px; letter-spacing: 2px; }
  .section { max-width: 100%; padding: 90px 16px 24px; }
  .sec-title { font-size: 24px; letter-spacing: 3px; margin-bottom: 28px; }
  .wm-card { width: 94vw; max-height: 86vh; }
  .wm-thumb { height: min(38vh, 300px); }
  .wm-body { padding: 18px 18px 24px; }
  /* 3D 区移动端降高：70vh 在手机竖屏太占篇幅 */
  #gl-wrap { height: 56vh; min-height: 340px; }
  .gl-tip { font-size: 11px; right: 12px; }
  /* 触屏没有 hover，卡片 hover 边框常驻弱化提示可点 */
  .work-card:active { border-color: var(--teal); }
}
@media (max-width: 640px) {
  .nav-links a { margin-left: 16px; font-size: 14px; }
  .section { padding-top: 80px; }
  /* Hero：圆环箭头收窄贴近边缘+小号化，避免压住小屏圆环 */
  .ring-arrow { width: 40px; height: 40px; font-size: 20px; }
  .ring-arrow.left { left: 10px; }
  .ring-arrow.right { right: 10px; }
  .ring-caption { font-size: 13px; letter-spacing: 2px; bottom: 11vh; max-width: 92vw; white-space: normal; text-align: center; }
  /* 作品卡手机单列大图 */
  .work-grid { grid-template-columns: 1fr; gap: 16px; }
  .work-thumb { height: 180px; }
  /* 动效控制台避免贴边误触 */
  #fx-panel { right: 12px; bottom: 12px; }
  #fx-menu { width: 172px; right: 0; }
  footer { margin-top: 60px; padding: 28px 14px 36px; }
}
@media (max-width: 380px) {
  .brand-word { font-size: 19px; }
  .nav-links a { margin-left: 12px; font-size: 13px; }
  .sec-title { font-size: 21px; }
  #gl-wrap { min-height: 300px; }
}
/* 触屏设备通用：去掉依赖 hover 才出现的交互提示 */
@media (hover: none) {
  .ring-arrow { opacity: .55; }
  .work-card:hover { border-color: rgba(255,255,255,.06); box-shadow: none; }
  .work-card:hover .work-thumb { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  #ringLogo.spin, .scroll-hint span { animation: none !important; }
  .ring-bg, .hero-veil, .ring-caption { transition: none !important; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
