/* ================= 版面斷點總表（改版面時先看這裡） =================
   畫面寬度 > 960px   電腦全螢幕：所有排版照 PDF
   ≤ 960px            半螢幕／平板：作品頁文字在上、圖片在下；
                      圖片維持「大圖在左、小圖疊在右」或並排，最寬 640px；
                      封面：601px 以上一律照 PDF 第 1 頁等比例縮放（檔案最下方）
                      關於我：簡介放在照片右邊（560px 以下才移到照片下方）
   ≤ 760px            上方選單收成右上兩條線按鈕
   ≤ 600px            手機：封面改成照片在上、文字在下；
                      WORK / RESEARCH 清單縮小字體但維持置中
   ≤ 520px            最後一頁 THANK YOU 與聯絡資訊改上下排
   檢查寬度：1440（電腦）、720（半螢幕）、390（手機）
   ===================================================================== */
/* 吳芷庭 Portfolio — 視覺沿用 PDF：深炭灰底、萊姆綠漸層、噴霧綠圓、／ 標記、直書鏤空章節字
   版面以 PDF 的 1200px 畫布為基準，圖片尺寸與位置換算成百分比，所以縮放時比例不變 */
:root {
  --bg: #212221;
  --bg-alt: #262826;
  --bar: #2d2d2d;
  --line: #3a3d39;
  --ink: #f2f3ef;
  --muted: #a9ada3;
  --green: #7ed957;
  --lime: #c6e15f;
  --pill: #6aa84f;
  --grad: linear-gradient(90deg, var(--green), var(--lime));
  --font-en: "Open Sans", "Noto Sans TC", sans-serif;
  --font-zh: "Noto Sans TC", "Open Sans", "PingFang TC", sans-serif;
  --header-h: 68px;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-zh); font-size: 17px; line-height: 1.9; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--bar);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: clamp(16px, 3vw, 36px);
}
.brand { font-family: var(--font-en); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.header-right { display: flex; align-items: center; gap: clamp(10px, 2vw, 24px); }
.nav { display: flex; align-items: center; gap: clamp(4px, 1.6vw, 22px); }
.nav a { font-family: var(--font-en); font-size: 13px; text-decoration: none; padding: 4px 11px; border-radius: 6px; transition: background .2s, color .2s; }
.nav a:hover { color: var(--green); }
.nav a.active { background: var(--pill); color: #fff; }
.pdf-btn {
  font-family: var(--font-en); font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--green); color: var(--green); padding: 4px 12px; border-radius: 6px; transition: background .2s, color .2s;
}
.pdf-btn:hover { background: var(--green); color: #1b1c1b; }
.menu-btn { width: 34px; height: 24px; background: none; border: 0; cursor: pointer; display: grid; align-content: center; gap: 6px; padding: 0; }
.menu-btn span { display: block; height: 2px; background: var(--green); border-radius: 2px; transition: transform .25s; }
.menu-open .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Layout primitives ---------- */
section { position: relative; overflow: hidden; }
.page { position: relative; max-width: 1200px; margin: 0 auto; padding: clamp(56px, 7vw, 96px) var(--gutter); }
.alt { background: var(--bg-alt); }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.slash { color: var(--green); margin-right: .35em; font-weight: 400; }
.label { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.label + p { margin-bottom: 22px; }
.text p { line-height: 2; }

/* 噴霧綠圓：直接使用 PDF 裡的原始素材 */
.blob { position: absolute; z-index: 0; pointer-events: none; aspect-ratio: 1; background: url(images/blob.png) center / contain no-repeat; opacity: .72; }
.blob.b2 { background-image: url(images/blob-2.png); }
.page > *:not(.blob):not(.side-word), .layer { position: relative; z-index: 1; }

/* 章節眉標：每個主題頂端的分隔列 */
.eyebrow { margin-right: 50px;
  display: flex; align-items: center; gap: 14px; margin-bottom: 28px;
  font-family: var(--font-en); font-size: 12.5px; letter-spacing: .22em; color: var(--muted); text-transform: uppercase;
}
.eyebrow b { color: var(--green); font-weight: 700; }
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 直書鏤空章節字 */
.side-word {
  position: absolute; top: clamp(56px, 7vw, 96px); right: clamp(8px, 2vw, 28px); z-index: 1;
  writing-mode: vertical-rl; text-orientation: upright; font-family: var(--font-en);
  font-size: clamp(24px, 2.6vw, 34px); letter-spacing: .3em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.2px var(--green); user-select: none;
}

/* ---------- Resource buttons（每個作品同一位置、同一樣式） ---------- */
.res { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 34px; }
.res a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 14.5px;
  padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02);
  transition: border-color .2s, background .2s;
}
.res a:hover { border-color: var(--green); background: rgba(126,217,87,.08); }
.res a::after { content: "↗"; color: var(--muted); font-size: 12px; }
.tag {
  font-family: var(--font-en); font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  padding: 1px 7px; border-radius: 4px; background: var(--pill); color: #fff;
}
.tag.doc { background: transparent; color: var(--green); border: 1px solid var(--green); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 39.75% 1fr; min-height: min(760px, calc(100svh - var(--header-h))); }
.hero-photo { overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-text { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; text-align: right; padding: 48px calc(var(--gutter) + 150px) 48px var(--gutter); gap: 14px; }
.hero h1 { font-family: var(--font-en); font-weight: 400; letter-spacing: .11em; font-size: clamp(60px, 9.4vw, 136px); line-height: 1; margin-left: -16vw; margin-right: -195px; text-shadow: 0 6px 30px rgba(0,0,0,.35); position: relative; z-index: 2; }
.hero .tagline { font-family: var(--font-en); font-weight: 300; font-size: clamp(22px, 2.5vw, 32px); letter-spacing: .06em; position: relative; z-index: 2; }
.hero .zh-title { font-size: clamp(20px, 1.9vw, 25px); letter-spacing: 1.15em; margin-right: -1.15em; position: relative; z-index: 2; }
.hero .name { font-size: clamp(17px, 1.6vw, 20px); letter-spacing: .05em; position: relative; z-index: 2; }
.hero-meta { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; margin-top: 70px; }
.hero .blob { width: 180px; right: -105px; top: 62%; transform: translateY(-50%); z-index: 0; }

/* ---------- Contents ---------- */
.contents h2 { color: transparent; -webkit-text-stroke: 2px var(--green); font-family: var(--font-en); font-weight: 400; letter-spacing: .12em; font-size: clamp(52px, 8vw, 100px); text-align: right; line-height: 1.1; margin-right: 1%; }
.contents .blob { width: 20%; right: 0; top: 4%; }
.toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 46px; }
.toc li:nth-child(2) { padding-left: 3%; }
.toc li:nth-child(3) { padding-left: 6%; }
.toc a { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: start; gap: 16px; text-decoration: none; letter-spacing: .15em; font-size: clamp(16px, 1.8vw, 22px); }
.toc .no { position: relative; font-family: var(--font-en); width: 64px; height: 46px; display: grid; place-items: center; margin-top: -4px; color: #1d1f1c; }
.toc .no::before { content: ""; position: absolute; inset: -6px; background: url(images/blob-2.png) center / contain no-repeat; opacity: .8; z-index: -1; }
.toc .sec { font-family: var(--font-en); padding-right: 14px; border-right: 1px solid var(--ink); line-height: 1.4; }
.toc .items { line-height: 1.9; margin-top: -4px; }
.toc a:hover .sec { color: var(--green); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 34% minmax(0, 1fr); gap: 4%; padding-right: 50px; }
.profile h2 { font-family: var(--font-en); font-size: 25px; letter-spacing: .04em; margin-bottom: 26px; }
.portrait { position: relative; width: 82%; max-width: 230px; aspect-ratio: 1; }
.portrait::before { content: ""; position: absolute; width: 88%; aspect-ratio: 1; left: 34%; top: 9%; background: url(images/blob.png) center / contain no-repeat; filter: brightness(.55) saturate(.9); z-index: -1; }
.portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile .slash-line { color: var(--green); font-size: 22px; line-height: 1; margin: 32px 0 14px 26px; }
.profile .bio { padding-left: 26px; display: flex; flex-direction: column; gap: 16px; }
.profile .contact-mini { font-family: var(--font-en); }
.profile .contact-mini a { text-decoration: none; }
.cv h3 { font-size: 18px; margin-bottom: 6px; }
.cv ul { list-style: none; padding: 0; margin: 0 0 24px; }
.cv li { padding-left: 1.5em; text-indent: -1.5em; line-height: 2; }
.cv li::before { content: "／"; margin-right: .4em; }
.cv .year { font-family: var(--font-en); color: var(--muted); margin-left: .6em; font-size: .92em; white-space: nowrap; }
.skills { display: flex; flex-wrap: wrap; gap: 0 36px; }
.skills li { white-space: nowrap; }

.story { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5%; padding-right: 50px; }
.story .col { display: flex; flex-direction: column; gap: 16px; font-size: 16.5px; line-height: 2.05; }
.story .lead { font-weight: 700; font-size: 18px; }
.story-wrap { padding-block: clamp(80px, 9vw, 120px); }
/* 綠圓放在較短欄位下方的空白，大小隨空白高度調整 */
.story .fill { flex: 1 1 0; min-height: 0; display: flex; align-items: center; padding-top: 24px; }
.story .fill span { display: block; height: 100%; max-height: 230px; aspect-ratio: 1; background: url(images/blob.png) center / contain no-repeat; opacity: .7; }
.story .fill-left { justify-content: flex-end; align-items: flex-start; padding-top: 48px; }
.story .fill-left span { max-height: 118px; background-image: url(images/blob-2.png); transform: scaleX(-1) rotate(-35deg); }
.story .fill-right { justify-content: flex-end; align-items: flex-end; }
.story .fill-right span { max-height: 290px; transform: translate(34%, 40%) rotate(205deg); }
.story-wrap .story-dot { width: 54px; left: 61%; top: 36px; transform: rotate(110deg); }

/* ---------- Chapter openers ---------- */
.chapter .page { text-align: center; padding-block: clamp(90px, 13vw, 170px); }
.chapter h2 { font-family: var(--font-en); font-weight: 400; font-size: clamp(56px, 10vw, 124px); letter-spacing: .35em; margin-right: -.35em; color: transparent; -webkit-text-stroke: 2px var(--green); line-height: 1.1; }
.chapter ol { list-style: none; padding: 0; margin: 28px auto 0; display: inline-flex; flex-direction: column; gap: 14px; text-align: left; }
.chapter li a { text-decoration: none; letter-spacing: .14em; font-size: clamp(16px, 1.9vw, 22px); display: flex; flex-wrap: wrap; gap: 0 16px; }
.chapter .no { font-family: var(--font-en); padding-right: 14px; border-right: 1px solid var(--ink); }
.chapter b { font-family: var(--font-en); }
.chapter li a:hover b, .chapter li a:hover span:last-child { color: var(--green); }
.chapter .blob { width: 11%; left: 67%; top: 34%; }
#research .blob { width: 110px; left: auto; top: auto; right: 4%; bottom: 10%; }
#work .blob { width: 110px; left: 4%; top: auto; bottom: 10%; }

/* ---------- Project pages ---------- */
.project h2 { font-size: clamp(22px, 2.5vw, 29px); letter-spacing: .1em; font-weight: 400; padding-right: 50px; }
.project h2 b { font-family: var(--font-en); font-weight: 700; }
/* 研究兩頁的標題照 PDF 整行加粗 */
#shipping h2, #streaming h2 { font-weight: 700; }
.project h2 .bar { display: inline-block; width: 1px; height: .9em; background: var(--ink); margin: 0 .5em; vertical-align: -.08em; }
.project .side-word { top: clamp(120px, 12vw, 150px); }
.body { display: grid; align-items: center; padding-right: 50px; }

/* PosterSwap：海報 343 / 文字 333 / 照片 205（PDF 1200 寬換算） */
.ps { grid-template-columns: minmax(0, 1fr) 33% 20%; gap: 3.5%; }
.ps .poster { aspect-ratio: 343 / 487; object-fit: cover; width: 100%; }
.ps .photos { display: flex; flex-direction: column; gap: 38px; }
.ps .photos img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Global Compass：左文字，右邊流程圖在上、兩張截圖並排在下 */
.gc { grid-template-columns: 38% minmax(0, 1fr); gap: 5%; align-items: start; }
.gc .gallery { margin-top: 6px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gallery img { width: 100%; border-radius: 6px; border: 1px solid var(--line); }
.gallery .wide { grid-column: 1 / -1; }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.gallery figcaption { font-size: 13px; color: var(--muted); }
.gc .blob { width: 9%; right: 4%; top: 52%; }

/* 海運：論文頁 + 簡報封面 + 發表照 */
.sh { grid-template-columns: minmax(0, 1fr) 54%; gap: 5%; }
.collage { position: relative; }
.sh-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; gap: 16px; }
.sh-grid img { width: 100%; box-shadow: 0 10px 26px rgba(0,0,0,.35); }
.sh-grid .paper { grid-row: 1 / 3; height: auto; }
.sh-grid .slide { aspect-ratio: 16 / 9; object-fit: cover; }
.sh-grid .talk { aspect-ratio: 1 / .82; object-fit: cover; object-position: 50% 30%; }

/* 串流：左文字，右邊兩張簡報上下排 */
.nd { grid-template-columns: minmax(0, 1fr) 36%; gap: 6%; }
.nd .slides { display: flex; flex-direction: column; gap: 24px; position: relative; }
.nd .slides img { position: relative; z-index: 1; }
.nd .slides .blob { width: 34%; right: -18%; top: 52%; z-index: 0; opacity: .65; }

/* ---------- Files hub ---------- */
.files h2 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 8px; }
.files .intro { color: var(--muted); margin-bottom: 28px; }
.resume-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px; border: 1px solid var(--green); border-radius: 12px; margin-bottom: 30px;
  background: linear-gradient(90deg, rgba(126,217,87,.10), rgba(198,225,95,.03));
}
.resume-card p { font-weight: 700; font-size: 18px; }
.resume-card small { display: block; color: var(--muted); font-weight: 400; font-size: 14px; }
.resume-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-block; text-decoration: none; font-size: 15px; font-weight: 700; padding: 9px 20px; border-radius: 8px; border: 1px solid var(--green); transition: background .2s, color .2s; }
.btn.solid { background: var(--grad); color: #1b1c1b; border-color: transparent; }
.btn.ghost { color: var(--green); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost:hover { background: rgba(126,217,87,.1); }
.file-table { width: 100%; border-collapse: collapse; }
.file-table th { text-align: left; font-family: var(--font-en); font-size: 12px; letter-spacing: .18em; color: var(--muted); font-weight: 600; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
.file-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.file-table td:first-child { color: var(--muted); font-size: 14px; white-space: nowrap; }
.file-table .res { margin: 0; }
.table-box { overflow-x: auto; }

/* ---------- Contact ---------- */
.contact .page { min-height: 620px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto auto; gap: 40px; row-gap: 0; }
.contact .big { margin-bottom: 40px; }
.contact-pdf { grid-column: 1; grid-row: 3; margin-top: 28px; justify-content: flex-start; }
.contact .big { font-family: var(--font-en); font-weight: 700; font-size: clamp(64px, 9vw, 116px); line-height: 1.12; }
.contact .thanks { align-self: end; grid-column: 1; grid-row: 2; line-height: 1.5; }
.contact .thanks p:first-child { font-family: var(--font-en); font-weight: 300; font-size: clamp(32px, 3.6vw, 44px); letter-spacing: .08em; }
.contact .thanks p:last-child { color: var(--green); letter-spacing: .1em; }
.contact-card { align-self: end; grid-column: 2; grid-row: 2; padding-right: 50px; }
.contact-card h3 { color: var(--green); font-weight: 400; font-family: var(--font-en); margin-bottom: 8px; font-size: 18px; }
.contact-card dl { display: grid; grid-template-columns: auto auto; gap: 0 18px; margin: 0; line-height: 1.7; }
.contact-card dd { margin: 0; font-family: var(--font-en); }
.contact-card a { text-decoration: none; }
.contact-card a:hover { color: var(--green); }

footer { text-align: center; color: var(--muted); font-family: var(--font-en); font-size: 13px; padding: 24px; border-top: 1px solid var(--line); }

/* ---------- Reveal ---------- */
.reveal { transition: opacity .7s ease, transform .7s ease; }
.js .reveal.pre { opacity: 0; transform: translateY(24px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .js .reveal.pre { opacity: 1; transform: none; } }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about-grid, .story, .ps, .gc, .sh, .nd { grid-template-columns: minmax(0, 1fr); padding-right: 0; gap: 32px; }
  .project h2 { padding-right: 0; }
  .side-word { display: none; }
  /* 海報在左、兩張照片上下放在右，和海運那頁同樣排法 */
  .ps { grid-template-columns: minmax(0, 1.466fr) minmax(0, 1fr); gap: 24px 16px; max-width: 600px; }
  .ps .text { grid-column: 1 / -1; }
  .ps .photos { gap: 16px; }
  .story .fill, .story-wrap .story-dot { display: none; }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nd .slides .blob { display: none; }
}
@media (max-width: 760px) {
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; background: var(--bar); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; transform: translateY(-130%); transition: transform .3s; z-index: -1; }
  .nav a { padding: 12px; font-size: 15px; }
  .menu-open .nav { transform: none; }
  /* 目錄：維持 CONTENTS 靠右 */
  .contents h2 { margin-right: 0; font-size: clamp(44px, 14vw, 64px); margin-bottom: 28px; }
  .toc { gap: 30px; }
  .toc li:nth-child(n) { padding-left: 0; }
  .toc a { grid-template-columns: auto minmax(0, 1fr); font-size: 16px; letter-spacing: .08em; }
  .toc .sec { border-right: 0; }
  .toc .items { grid-column: 1 / -1; }
  /* 章節封面：大字縮小，不會超出畫面 */
  .chapter h2 { font-size: clamp(40px, 13vw, 64px); letter-spacing: .18em; margin-right: -.18em; }
  .chapter .page { padding-bottom: 130px; }
  #work .blob, #research .blob { width: 76px; left: auto; right: 8%; top: auto; bottom: 28px; }
  .skills { flex-direction: column; }
  /* 聯絡：THANK YOU 靠左、聯絡資訊靠右，和電腦版一致 */
  .contact .page { min-height: 0; gap: 40px 24px; }
  .contact .big { font-size: clamp(52px, 17vw, 80px); grid-column: 1 / -1; }
  .contact-card, .contact-pdf { padding-right: 0; }
  .contact .thanks p:first-child { font-size: clamp(26px, 5vw, 36px); }
}
/* 很窄的手機才把 THANK YOU 和聯絡資訊上下排 */
@media (max-width: 520px) {
  .contact .page { grid-template-columns: minmax(0, 1fr); }
  .contact .thanks { grid-column: 1; grid-row: auto; }
  .contact-card { grid-column: 1; grid-row: auto; justify-self: end; text-align: right; }
  .contact-card dl { justify-content: end; }
  .contact-pdf { grid-column: 1; grid-row: auto; justify-content: flex-start; order: 2; margin-top: 18px; }
  .contact .big { order: 0; } .contact .thanks { order: 1; } .contact-card { order: 3; margin-top: 40px; }
}
@media (min-width: 761px) { .menu-btn { display: none; } }

/* 點圖片放大 */
.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10,11,10,.88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: min(1200px, 100%); max-height: 90svh; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }

/* 海運三張圖：中等寬度維持左右兩欄，只有很窄的手機才改成上下排 */
@media (max-width: 960px) {
  .sh-grid, .gallery { max-width: 640px; }
  /* Netflix 兩張簡報並排 */
  .nd .slides { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 640px; }
}
@media (max-width: 480px) {
  .nd .slides { gap: 10px; }
  .gallery { gap: 10px; }
}
@media (max-width: 480px) {
  .sh-grid { gap: 10px; }
}

/* 其他球各轉不同方向 */
#work .blob { transform: rotate(140deg); }
#research .blob { transform: scaleX(-1) rotate(60deg); }
#globalcompass .page > .blob { transform: rotate(-100deg); }

/* 首尾呼應：聯絡頁大字旁的噴霧球 */
.contact .big { position: relative; isolation: isolate; }
.contact .big .grad-text { display: inline-block; position: relative; z-index: 1; }
.contact .big::after { content: ""; position: absolute; z-index: -1; width: 1.45em; aspect-ratio: 1; left: 2.75em; top: 1.08em; background: url(images/blob.png) center / contain no-repeat; opacity: .5; transform: rotate(45deg); }

/* 封面：中等寬度（例如半個螢幕）維持左右排法，只縮小留白和球 */
@media (max-width: 960px) {
}
/* 封面：只有手機才改成照片在上、文字在下 */
@media (max-width: 600px) {
  .chapter ol { max-width: 100%; }
  .chapter li a { font-size: 14px; letter-spacing: .04em; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; }
  .chapter li a > span:not(.no), .chapter li a > b { grid-column: 2; }
  /* 封面：照片在上，PORTFOLIO 疊在照片下緣，文字維持靠右 */
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero { height: auto; }
  .hero-photo { height: 46svh; max-height: 420px; }
  .hero-text { padding: 0 var(--gutter) 56px; }
  .hero h1 { margin: -.55em 0 0; font-size: clamp(44px, 15vw, 72px); letter-spacing: .04em; }
  .hero-meta { margin-top: 28px; }
  .hero .zh-title { letter-spacing: .9em; margin-right: -.9em; }
  .hero .blob { width: 130px; left: auto; right: calc(100% - 24px); top: 66%; }
}

/* 關於我：半螢幕時，個人簡介放到照片右邊的空白 */
@media (max-width: 960px) and (min-width: 561px) {
  .profile { display: grid; grid-template-columns: 210px minmax(0, 1fr); column-gap: 110px; align-items: center; }
  .profile h2 { grid-column: 1 / -1; }
  .profile .portrait { grid-column: 1; grid-row: 2 / 4; width: 210px; max-width: none; }
  .profile .slash-line { grid-column: 2; grid-row: 2; align-self: end; margin: 0 0 14px; }
  .profile .bio { grid-column: 2; grid-row: 3; align-self: start; padding-left: 0; }
}

/* ===== 封面：照 PDF 第 1 頁（1440 × 810 畫布，扣掉 80 高的上方列 = 1440 × 730）等比例排版 =====
   所有位置用 vw 換算：1px(PDF) = 100/1440 vw，視窗多寬都維持同一張構圖 */
@media (min-width: 601px) {
  .hero { display: block; position: relative; height: 50.69vw; min-height: 0; overflow: hidden; }
  .hero-photo { position: absolute; left: 0; top: 0; width: 39.72vw; height: 100%; }
  .hero-photo img { object-position: 67.9% 50%; }
  .hero-text { position: static; display: block; padding: 0; }
  .hero h1 { position: absolute; left: 27.34vw; top: 9.86vw; margin: 0; font-size: 10.42vw; letter-spacing: .07em; line-height: 1; white-space: nowrap; }
  .hero-meta { position: static; display: block; margin: 0; }
  .hero .tagline { position: absolute; right: 10.16vw; top: 28.29vw; margin: 0 -.09em 0 0; font-size: 2.5vw; letter-spacing: .09em; line-height: 1; white-space: nowrap; }
  .hero .zh-title { position: absolute; right: 10.81vw; top: 33.46vw; margin: 0 -1.04em 0 0; font-size: 2.08vw; letter-spacing: 1.04em; line-height: 1; white-space: nowrap; }
  .hero .name { position: absolute; right: 10.81vw; top: 38.46vw; margin: 0; font-size: 1.74vw; letter-spacing: 0; line-height: 1; white-space: nowrap; word-spacing: .2em; }
  .hero .blob { position: absolute; left: 76.04vw; top: 25.35vw; right: auto; width: 20.83vw; transform: none; z-index: 0; }
}
