/* 首頁專用：開場、作品、關於我、背景小東西
   共用的在 site.css。規格見 website/home-brief.md */

/* ── 背景四周：打洞、紙膠帶、迴紋針 ── */
.deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.holes { position: absolute; left: 34px; display: flex; flex-direction: column; gap: 52px; }
.holes i { width: 15px; height: 15px; border-radius: 50%; background: #D4D9DF; box-shadow: inset 0 2px 3px rgba(30,42,58,.28), 0 1px 0 rgba(255,255,255,.9); }

/* ── 開場：滿版背景圖 左邊文案 右邊名字紙片 ── */
.hero { position: relative; }
/* 橫向超出在這層裁掉：iPhone Safari 不理 html 上的裁切 整頁會被左右拖動 */
#smooth-wrapper { overflow-x: clip; }
#smooth-content { position: relative; }
.photo { position: relative; isolation: isolate; height: 660px; overflow: hidden; background: #E9EBEE; }
/* 背景圖獨立一層 才能單獨推近、做視差 */
.photo-bg { position: absolute; inset: -80px; z-index: -1; background: url("home/hero-bg-light.jpg") 50% 38%/cover no-repeat; }
/* 布料波動：游標附近疊一層扭曲過的同一張圖（motion.js 加上、#silk-wave 濾鏡） 用遮罩只露出游標周圍 */
.photo-wave { position: absolute; inset: 0; background: inherit; filter: url(#silk-wave); pointer-events: none; -webkit-mask: radial-gradient(circle 340px at var(--wx, -999px) var(--wy, -999px), #000 25%, transparent 72%); mask: radial-gradient(circle 340px at var(--wx, -999px) var(--wy, -999px), #000 25%, transparent 72%); }
/* 讓左邊的字看得清楚：左側一層淡淡的漸層 */
.photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(238,240,243,.7), rgba(238,240,243,.25) 45%, transparent 70%); }
.intro { position: absolute; left: var(--edge); top: 180px; width: 700px; }
.intro .hi { font-size: 18px; font-weight: 500; letter-spacing: .1em; }
.intro h1 { margin-top: 10px; font-size: 50px; font-weight: 700; line-height: 1.2; letter-spacing: .05em; white-space: nowrap; }
.intro .desc { margin-top: 22px; font-size: 15.5px; line-height: 1.9; color: #2E353D; }
.intro .desc p { white-space: nowrap; }
.scroll { position: absolute; z-index: 3; color: #8C9DB0; right: calc(var(--edge) - 64px); top: 590px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; }
.scroll svg { width: 12px; height: 100px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 50% { translate: 0 8px; } }

/* 名字紙片：照「Kiara Lin」字形往外擴一圈裁出來 中間空格也用紙接起來 有紙紋 字只有打凸 */
.nametag { position: absolute; right: calc(var(--edge) - 40px); top: 220px; z-index: 2; width: 580px; rotate: -7deg; transition: rotate .6s var(--ease); filter: drop-shadow(0 2px 2px rgba(30,42,58,.25)) drop-shadow(0 10px 14px rgba(30,42,58,.18)); }
.nametag:hover { rotate: -4deg; }
.nametag > svg { display: block; width: 100%; height: auto; overflow: visible; }
.nametag .cut { fill: #F6F5F0; stroke: #F6F5F0; stroke-width: 30; stroke-linejoin: round; paint-order: stroke; }
.nametag .edge { fill: rgba(30,42,58,.12); stroke: rgba(30,42,58,.12); stroke-width: 32; stroke-linejoin: round; }
.nametag .ink { fill: #F2F1EC; }
.nametag text { font-family: "Trocchi", serif; font-size: 130px; }

/* ── 作品區：像一張紙 圓角＋陰影 從下面滑上來蓋住開場（電腦版開場會停住） ── */
#work { position: relative; z-index: 2; margin-top: -32px; padding-top: 88px; border-radius: 32px 32px 0 0; background: linear-gradient(var(--bg) 0 760px, transparent 1000px); box-shadow: 0 -18px 40px -30px rgba(30,42,58,.35); }

/* ── 作品：一排兩個 資料夾 ── */
.list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px 72px; }
.folder { position: relative; min-width: 0; display: flex; flex-direction: column; --tabx: 0px; --r: -1.2deg; --fc: #CBD4DE; }
.tab { z-index: 3; align-self: flex-start; display: inline-flex; align-items: center; gap: 14px; height: 44px; padding: 0 12px 0 24px; margin: 0 40px -1px var(--tabx); font-family: var(--en); font-weight: 800; font-size: 14.5px; letter-spacing: .08em; white-space: nowrap; }
.tab .no { color: #6E7E90; font-weight: 600; letter-spacing: 0; }
.tab .yr { font-family: var(--zh); color: #46505C; font-weight: 500; font-size: 14px; letter-spacing: 0; padding-left: 14px; border-left: 1px solid #A3B0BE; }
.fbody { position: relative; isolation: isolate; height: 392px; padding: 22px 22px 0; border-radius: 14px; background: var(--noise) 0 0/220px, var(--fc); box-shadow: var(--shadow); }
.f1 .fbody { border-top-left-radius: 0; }
/* 照片：沒有白邊 hover 時擺正 */
.sheet { position: relative; z-index: 1; height: 290px; overflow: hidden; border-radius: 10px; background: #DDE3E9; rotate: var(--r); box-shadow: var(--shadow-2); transition: rotate .6s var(--ease), translate .6s var(--ease); }
.folder:hover .sheet { rotate: 0deg; translate: 0 -12px; }
.sheet .shot { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.ph { height: 100%; display: grid; place-items: center; background: repeating-linear-gradient(135deg, #E1E5EA 0 10px, #D9DEE4 10px 20px); font-size: 13px; color: #6B7684; letter-spacing: .08em; }
/* 描圖紙：蓋住照片最下面一點 tag、標題、副標、箭頭寫在上面 */
.vclip { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 118px; overflow: hidden; border-radius: 0 0 14px 14px; }
.vellum { position: absolute; inset: 0; padding: 22px 24px 12px; background: linear-gradient(rgba(214,223,232,.62), rgba(196,207,219,.82)); backdrop-filter: blur(3.5px); -webkit-backdrop-filter: blur(3.5px); border-top: 1px solid rgba(255,255,255,.75); -webkit-mask: radial-gradient(circle 18px at 50% 0, transparent 17px, #000 18px); mask: radial-gradient(circle 18px at 50% 0, transparent 17px, #000 18px); transition: translate .6s var(--ease); }
.folder:hover .vellum { translate: 0 8px; }
.tags { display: flex; gap: 6px; }
.tags span { flex: none; height: 24px; padding: 0 10px; display: inline-flex; align-items: center; border: 1px solid #9EABBA; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: #3A424C; background: rgba(255,255,255,.35); white-space: nowrap; }
.ttl { margin-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.ttl h3 { font-size: 23px; line-height: 1.3; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.ttl p { margin-top: 2px; font-size: 14px; line-height: 1.45; color: #46505C; white-space: nowrap; }
/* 標題旁的小字：說明這是什麼作品 */
.ttl .kind { margin-left: 12px; font-size: 13px; font-weight: 500; letter-spacing: .06em; color: #5F6873; }
/* 箭頭圓鈕：平常黑色 hover 變橘紅 */
.go { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 20px; transition: rotate .4s var(--ease), background .35s; }
.folder:hover .go { rotate: 45deg; background: var(--hot); }
/* 夾子、膠帶、迴紋針：夾在資料夾上 可以壓到照片 */
.cl { position: absolute; z-index: 3; background: var(--src) center/contain no-repeat; filter: drop-shadow(0 2px 2px rgba(30,42,58,.25)); }
.cl.binder { --src: url("home/binder-clip.png"); width: 92px; height: 138px; right: 14px; top: -96px; rotate: 14deg; }
.cl.paper-clip { --src: url("home/paperclip.png"); width: 54px; height: 199px; left: 16px; top: -60px; rotate: 4deg; }
.fbody > .tape { z-index: 3; width: 160px; height: 42px; right: -42px; top: 14px; rotate: 38deg; }
/* hover：整個資料夾背後透出橘紅光暈 */
.folder::before { content: ""; position: absolute; left: -16%; right: -16%; top: -14%; bottom: -22%; z-index: -1; border-radius: 40%; background: radial-gradient(closest-side, rgba(255,74,28,.55), rgba(255,110,40,.3) 55%, rgba(255,150,70,.08) 80%, transparent); filter: blur(46px); opacity: 0; transition: opacity .5s; pointer-events: none; }
.folder:hover::before { opacity: 1; }
/* 觸控裝置沒有 hover：捲到畫面中間的那張亮起來（home.js 加 .lit） */
.folder.lit::before { opacity: 1; }
.folder.lit .go { rotate: 45deg; background: var(--hot); }
.folder.lit .sheet { rotate: 0deg; translate: 0 -12px; }
/* 點資料夾噴出的小紙花（motion.js 產生） */
.confetti { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; margin: -6px 0 0 -5px; border-radius: 1.5px; box-shadow: 0 1px 1.5px rgba(30,42,58,.22); }
.f2 { --tabx: 200px; --fc: #D3DBE3; --r: 1deg; }
.f2 .shot { object-position: 0 0; transform-origin: 0 0; }
.f3 { --tabx: 110px; --fc: #C2CCD7; --r: -.7deg; }

/* ── 關於我：左邊照片 右邊自我介紹、精簡經歷、工具 ── */
.about { margin-top: 150px; }
.ab { display: grid; grid-template-columns: 480px 1fr; grid-template-areas: "head head" "xp tools"; gap: 56px 80px; align-items: start; }
.ab-head { grid-area: head; display: grid; grid-template-columns: 480px 1fr; column-gap: 80px; align-items: start; }
.ab-head .ab-intro { margin-top: 0; }
.ab-xp { grid-area: xp; }
.ab-tools { grid-area: tools; }
.ab-xp h3:first-child, .ab-tools h3:first-child { margin-top: 0; }
.ab h2 { font-size: 30px; font-weight: 700; line-height: 1.45; letter-spacing: .06em; }
.ab-intro { margin-top: 18px; font-size: 15.5px; line-height: 1.95; color: #2E353D; }
.ab-intro p { white-space: nowrap; }
/* 電腦一行放不下的句子 第二個分句換行 */
.ab-intro .ln { display: block; }
.ab h3 { margin-top: 44px; font-family: var(--en); font-weight: 800; font-size: 14px; letter-spacing: .1em; }
.xp { position: relative; margin-top: 18px; padding-left: 26px; }
.xp::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 1px; background: #B9C4D0; transform: scaleY(var(--draw, 1)); transform-origin: top; }
.xp li { position: relative; list-style: none; padding-bottom: 18px; }
.xp li:last-child { padding-bottom: 0; }
.xp li::before { content: ""; position: absolute; left: -26px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1.5px solid #8C9DB0; }
.xp li:first-child::before { background: var(--ink); border-color: var(--ink); }
.xp .yr { display: block; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--mute); }
.xp b { display: block; font-weight: 700; font-size: 15px; line-height: 1.5; }
.xp b small { margin-left: 10px; font-weight: 500; font-size: 13px; color: var(--mute); }
.xp p { font-size: 13.5px; line-height: 1.6; color: #3F4954; white-space: nowrap; }
/* 工具分三組（照履歷）：左邊組名 右邊標籤 */
.tools { margin-top: 14px; display: grid; gap: 12px; }
/* 分類名稱固定在左邊 標籤折行時對齊第一顆標籤 不會掉到分類名稱下面 */
.tg { position: relative; padding-left: 80px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tg b { position: absolute; left: 0; top: 0; line-height: 34px; font-size: 13px; font-weight: 500; color: var(--mute); }
.tools span { height: 34px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; background: #FBFCFD; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-2); }

/* ── 平板（768–1199）：開場改成上下排 名字紙片在文字下面 ── */
@media (max-width: 1199px) {
  .photo { height: auto; padding: 170px var(--edge) 64px; }
  .intro { position: relative; left: auto; top: auto; width: auto; }
  .nametag { position: relative; right: auto; top: auto; width: 480px; margin: 56px 0 0 auto; }
  .scroll { display: none; }
  .ab { grid-template-columns: minmax(0, 620px); justify-content: center; grid-template-areas: "head" "xp" "tools"; gap: 44px; }
  .ab-head { display: block; }
  .ab-head .ab-intro { margin-top: 16px; }
  .ab-intro p, .xp p { white-space: normal; }
  .ab-intro .ln { display: inline; }
  .list { column-gap: 40px; }
  /* 卡片變窄 分頁少往右推 才不會跑出卡片 */
  .f2 { --tabx: 64px; }
  .f3 { --tabx: 32px; }
  /* 工具到聯絡我的距離縮短 */
  .ft { margin-top: 120px; }
  /* 卡片變窄 標題旁的小字改放到下一行 才不會把箭頭擠出去 */
  .ttl .kind { display: block; margin: 2px 0 0; font-size: 12.5px; line-height: 1.4; }
  .vclip { height: 136px; }
  /* 作品 tag 一排放不下就左右滑 */
  .tags { overflow-x: auto; margin-right: -24px; padding-right: 24px; scrollbar-width: none; }
  .tags::-webkit-scrollbar { display: none; }
}
/* 作品改一欄 */
@media (max-width: 899px) {
  .list { grid-template-columns: minmax(0, 1fr); max-width: 600px; margin: 0 auto; }
  .deco { display: none; }
}

/* ── 手機（< 768） ── */
@media (max-width: 767px) {
  .photo { padding: 148px var(--gutter) 52px; }
  .photo-bg { background-position: 40% 30%; }
  #work { margin-top: -22px; padding-top: 56px; border-radius: 22px 22px 0 0; }
  .photo::before { background: linear-gradient(180deg, rgba(238,240,243,.55), rgba(238,240,243,.3) 60%, rgba(238,240,243,.15)); }
  .intro .hi { font-size: 14px; }
  .intro h1 { font-size: 29px; }
  .intro .desc { margin-top: 14px; font-size: 13.5px; line-height: 1.65; }
  .intro .desc p { white-space: normal; }
  .intro .desc p + p { margin-top: 4px; }
  .nametag { width: 300px; margin: 18px 0 0 auto; rotate: -6deg; }

  .list { gap: 64px; }
  .tab { gap: 10px; height: 40px; padding: 0 8px 0 16px; font-size: 12.5px; }
  .tab .yr { font-size: 12.5px; padding-left: 10px; }
  .f2, .f3 { --tabx: 0px; }
  .f2 .fbody, .f3 .fbody { border-top-left-radius: 0; }
  .fbody { height: auto; padding: 16px 16px 0; }
  .sheet { height: 210px; }
  /* 描圖紙改成跟著內容長高 往上蓋住照片最下面一點 */
  .vclip { position: relative; height: auto; margin: -34px -16px 0; }
  .vellum { position: relative; inset: auto; padding: 20px 16px 14px; }
  .tags { margin-right: -16px; padding-right: 16px; }
  .ttl { gap: 14px; }
  .ttl h3 { font-size: 20px; white-space: normal; }
  .ttl .kind { display: block; margin: 2px 0 0; font-size: 12.5px; line-height: 1.4; }
  .ttl p { font-size: 13.5px; white-space: normal; }
  .go { width: 40px; height: 40px; font-size: 18px; }
  .cl.binder { width: 64px; height: 96px; right: 14px; top: -64px; }
  .cl.paper-clip { width: 38px; height: 140px; left: -26px; top: 26px; rotate: -4deg; }
  .fbody > .tape { width: 100px; height: 28px; right: -14px; top: 6px; rotate: 34deg; }
  /* 手機的光暈範圍小一點、濃一點 */
  /* 手機：光暈不用 filter 模糊（亮起來時整塊重畫很吃效能） 漸層本身就夠柔 */
  .folder::before { left: -10%; right: -10%; top: -6%; bottom: -10%; filter: none; }

  .about { margin-top: 110px; }
  .ab h2 { font-size: 24px; }
  .ab-intro { font-size: 14px; line-height: 1.65; }
  .ab-intro p { white-space: normal; }
  .ab-intro p + p { margin-top: 4px; }
  .ab h3 { margin-top: 36px; }
  .xp { padding-left: 24px; }
  .xp li { padding-bottom: 16px; }
  .xp li::before { left: -24px; }
  .xp b small { display: block; margin: 0; }
  .xp p { white-space: normal; font-size: 13.5px; }
  .tools span { height: 32px; padding: 0 14px; font-size: 13px; }
  /* 手機：組名放在標籤上面 */
  .tools { gap: 14px; }
  .tg { padding-left: 0; }
  .tg b { position: static; width: 100%; line-height: inherit; font-size: 12.5px; }
}

/* ── 窄手機（< 600）：關於我改上下排 ── */
@media (max-width: 599px) {
  .ab { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .ab-head .ab-intro { margin-top: 18px; }
}
