/* ===== 罗曼平作品集 · 网站化增强层 v2 (壳层，不改动原 section 内联样式) ===== */
:root{
  --brand:#9A5A3C; --brand-2:#E7B98C; --ink:#3D3228; --cream:#F4EBDC;
  --nav-h:60px;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth; scroll-padding-top:var(--nav-h);}
body{
  margin:0; background:#241d16; color:var(--cream);
  font-family:'Nunito','Noto Sans SC',system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
  -webkit-font-smoothing:antialiased;
}

/* 关键修复：内容整体下移，避免被固定导航栏遮挡 */
#deck{padding-top:var(--nav-h);}

/* ---------- 顶部滚动进度条 ---------- */
#progress{position:fixed; top:0; left:0; height:3px; width:0;
  background:linear-gradient(90deg,var(--brand),var(--brand-2));
  z-index:1000; transition:width .1s linear;}

/* ---------- 顶部导航 ---------- */
#topnav{position:fixed; top:0; left:0; right:0; height:var(--nav-h);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 clamp(16px,4vw,42px);
  background:rgba(36,29,22,.72); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(231,185,140,.16); z-index:900; transition:transform .35s ease;}
#topnav.hide{transform:translateY(-100%);}
#topnav .brand{display:flex; align-items:center; gap:10px; cursor:pointer;
  font-weight:900; letter-spacing:.12em; color:var(--cream); font-size:15px;}
#topnav .brand .dot{width:9px;height:9px;border-radius:50%;background:var(--brand-2);
  transition:transform .3s;}
#topnav .brand:hover .dot{transform:scale(1.5);}
#topnav .brand small{font-weight:700;color:var(--brand-2);letter-spacing:.24em;font-size:11px;}
#navlinks{display:flex; align-items:center; gap:4px;}
#navlinks a{color:#D9C7B2; text-decoration:none; font-size:14px; font-weight:700;
  padding:8px 14px; border-radius:30px; letter-spacing:.04em; transition:background .25s,color .25s;}
#navlinks a:hover{color:#fff; background:rgba(231,185,140,.14);}
#navlinks a.active{color:var(--ink); background:var(--brand-2);}
#navtoggle{display:none; background:none; border:0; cursor:pointer; padding:8px;}
#navtoggle span{display:block;width:24px;height:2px;background:var(--cream);margin:5px 0;transition:.3s;}

/* ---------- 舞台 ---------- */
.stage{position:relative; width:100%; overflow:hidden; scroll-margin-top:var(--nav-h);
  opacity:0; transform:translateY(34px);
  transition:opacity .8s cubic-bezier(.16,.8,.24,1), transform .8s cubic-bezier(.16,.8,.24,1);}
.stage.in{opacity:1; transform:none;}
.stage-canvas{width:1280px; height:720px; transform-origin:top left;}
.stage-canvas>section{width:1280px !important; height:720px !important; overflow:hidden;}
.stage img{cursor:zoom-in;}
.stage+.stage{margin-top:10px;}
@media (min-width:1000px){ .stage+.stage{margin-top:14px;} }

/* ---------- 大数字出现动画 ---------- */
@keyframes numPop{0%{opacity:0; transform:scale(.45) translateY(8px);}
  60%{opacity:1; transform:scale(1.08);} 100%{opacity:1; transform:scale(1);}}
.num-pop{animation:numPop .7s cubic-bezier(.2,.9,.3,1.2) both; transform-origin:center bottom;}

/* ---------- 卡片 hover 动效 ---------- */
.hover-card{transition:transform .32s cubic-bezier(.2,.8,.3,1), box-shadow .32s;}
.hover-card:hover{transform:translateY(-6px);}
.hover-pill{transition:transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .25s, filter .25s;}
.hover-pill:hover{transform:translateY(-3px) scale(1.04); filter:brightness(1.04);}

/* ---------- 图标交互 ---------- */
.stage svg{transition:transform .4s cubic-bezier(.2,.8,.3,1);}
.hover-card:hover svg,.hover-pill:hover svg{transform:scale(1.14) rotate(-4deg);}
.stage svg:hover{transform:scale(1.16) rotate(3deg);}

/* ---------- 可翻转卡片 ---------- */
.flip-card{cursor:pointer; position:relative; transform-style:preserve-3d;
  will-change:transform; outline:none;}
.flip-card::after{content:"↻"; position:absolute; top:9px; right:12px;
  font-size:14px; color:var(--brand); opacity:.45; transition:opacity .25s, transform .4s; z-index:2;}
.flip-card:hover::after{opacity:.95; transform:rotate(180deg);}
.flip-card.is-back::after{content:"×"; color:var(--cream); opacity:.85;}
.flip-card.is-back > *:not(.flip-back){opacity:0 !important; pointer-events:none;}
.flip-card img{cursor:pointer !important;}
.flip-back{position:absolute; inset:0; border-radius:inherit; display:none;
  flex-direction:column; justify-content:center; gap:9px; padding:18px 22px;
  background:linear-gradient(135deg,#3D3228,#6A503C); color:#F4EBDC;
  box-shadow:inset 0 0 0 1px rgba(231,185,140,.18); z-index:1; text-align:left;}
.flip-card.is-back .flip-back{display:flex;}
.flip-back .fb-title{font-weight:900; font-size:16px; letter-spacing:.02em; color:#fff;}
.flip-back .fb-sub{font-size:11px; font-weight:700; letter-spacing:.18em; color:var(--brand-2); margin-top:-4px;}
.flip-back .fb-desc{font-size:12.5px; line-height:1.65; color:#EAD9C4;}
.flip-back .fb-tags{display:flex; gap:6px; flex-wrap:wrap; margin-top:2px;}
.flip-back .fb-tags i{font-style:normal; font-size:10.5px; font-weight:800; letter-spacing:.04em;
  color:#3D3228; background:var(--brand-2); padding:4px 9px; border-radius:20px;}

/* ---------- 封面滚动提示 ---------- */
.scroll-cue{position:absolute; left:50%; bottom:18px; transform:translateX(-50%);
  z-index:6; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:4px;
  color:var(--brand); font-size:11px; font-weight:800; letter-spacing:.2em;
  background:rgba(251,247,239,.7); padding:8px 14px 6px; border-radius:30px;
  box-shadow:0 8px 22px rgba(61,50,40,.18); animation:cueBounce 1.8s ease-in-out infinite;}
.scroll-cue svg{width:18px;height:18px;}
@keyframes cueBounce{0%,100%{transform:translateX(-50%) translateY(0);}50%{transform:translateX(-50%) translateY(7px);}}

/* ---------- 联系邮箱链接 ---------- */
.mail-link{display:inline-flex; align-items:center; gap:8px; text-decoration:none;
  color:inherit; transition:color .25s, transform .25s;}
.mail-link:hover{color:var(--brand); transform:translateY(-2px);}
.mail-link svg{width:1em;height:1em;}

/* ---------- 回到顶部 / 演示 / 灯箱 (同前) ---------- */
#totop{position:fixed; right:22px; bottom:24px; width:48px; height:48px; border-radius:50%;
  border:0; cursor:pointer; z-index:850; background:var(--brand); color:var(--cream); font-size:20px;
  box-shadow:0 10px 26px rgba(154,90,60,.45); opacity:0; pointer-events:none; transform:translateY(12px);
  transition:opacity .3s, transform .3s, background .25s;}
#totop.show{opacity:1; pointer-events:auto; transform:none;}
#totop:hover{background:#7d4730; transform:translateY(-3px);}
#present{position:fixed; right:22px; bottom:80px; height:40px; padding:0 16px; border-radius:30px;
  border:1px solid rgba(231,185,140,.4); cursor:pointer; background:rgba(36,29,22,.8);
  color:var(--brand-2); font-weight:800; font-size:13px; z-index:850; backdrop-filter:blur(8px);
  transition:.25s; display:flex; align-items:center; gap:7px;}
#present:hover{background:var(--brand); color:var(--cream); border-color:var(--brand); transform:translateY(-2px);}
#lightbox{position:fixed; inset:0; z-index:1100; display:none; align-items:center; justify-content:center;
  background:rgba(20,15,11,.92); backdrop-filter:blur(6px); opacity:0; transition:opacity .3s;}
#lightbox.open{display:flex; opacity:1;}
#lightbox img{max-width:92vw; max-height:88vh; border-radius:10px;
  box-shadow:0 30px 80px rgba(0,0,0,.6); transform:scale(.96); transition:transform .3s;}
#lightbox.open img{transform:scale(1);}
#lightbox .close{position:fixed; top:22px; right:26px; font-size:34px; color:#fff; cursor:pointer; opacity:.8; line-height:1;}
#lightbox .close:hover{opacity:1;}

/* ---------- 演示模式 ---------- */
body.present-mode{overflow:hidden;}
body.present-mode #topnav,body.present-mode #progress,
body.present-mode #totop,body.present-mode #present,
body.present-mode #deck{padding-top:0;}
body.present-mode #topnav,body.present-mode #progress,
body.present-mode #totop,body.present-mode #present{display:none;}
body.present-mode .stage{position:fixed; inset:0; margin:0; display:none;
  align-items:center; justify-content:center; background:#241d16; opacity:1; transform:none;}
body.present-mode .stage.current{display:flex;}
body.present-mode .stage-canvas{transform-origin:center center;}
body.present-mode .scroll-cue{display:none;}
#present-exit{display:none;}
body.present-mode #present-exit{display:block; position:fixed; top:18px; right:22px; z-index:1200;
  background:rgba(231,185,140,.15); color:var(--cream); border:1px solid rgba(231,185,140,.4);
  padding:8px 16px; border-radius:30px; cursor:pointer; font-weight:700; font-size:13px;}
#present-counter{display:none;}
body.present-mode #present-counter{display:block; position:fixed; bottom:20px; left:50%;
  transform:translateX(-50%); z-index:1200; color:var(--brand-2); font-weight:800; letter-spacing:.1em;
  font-size:14px; background:rgba(36,29,22,.7); padding:7px 18px; border-radius:30px;}

/* ---------- 移动端 ---------- */
@media (max-width:760px){
  #navtoggle{display:block;}
  #navlinks{position:fixed; top:var(--nav-h); right:0; width:min(78vw,300px);
    flex-direction:column; align-items:stretch; gap:2px; background:rgba(36,29,22,.97);
    backdrop-filter:blur(14px); padding:14px; border-left:1px solid rgba(231,185,140,.16);
    height:calc(100vh - var(--nav-h)); transform:translateX(105%); transition:transform .3s ease;}
  #navlinks.open{transform:none;}
  #navlinks a{padding:14px 16px; font-size:16px;}
  #present{display:none;}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  .stage{transition:none; opacity:1; transform:none;}
  .num-pop,.scroll-cue{animation:none;}
}

/* ---------- 打字机效果（联系页大字） ---------- */
.tw-cursor{display:inline-block; width:.06em; color:var(--brand); font-weight:400;
  transform:translateY(.02em); animation:twBlink 1.05s step-end infinite; margin-left:3px;}
@keyframes twBlink{0%,50%{opacity:1;}50.01%,100%{opacity:0;}}
@media (prefers-reduced-motion:reduce){ .tw-cursor{display:none;} }

/* ---------- 内容保护：禁止选择 / 拖拽 / 保存 ---------- */
*{ -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none; -webkit-touch-callout:none; }
.stage img,#lightbox img{ -webkit-user-drag:none; -khtml-user-drag:none; -moz-user-drag:none; -o-user-drag:none; user-drag:none; }
/* 透明遮罩盖在图片上，进一步阻止长按/右键直达图片 */
.stage,.stage-canvas{ -webkit-tap-highlight-color:transparent; }
