/* =========================================================
   Johan Ku 古又文 — 個人品牌網站
   風格：簡約文青／雜誌編輯感
   記憶點：針目（下針 V 字）線條，呼應立體針織雕塑
   ========================================================= */

:root{
  /* 顏色：冷調紙白 + 近黑墨 + 靛藍點綴（天然羊毛染料） */
  --paper:   #F2F1ED;
  --paper-2: #E7E5DF;
  --ink:     #17181A;
  --ink-2:   #56585B;
  --rule:    #CFCCC4;
  --indigo:  #2F3C56;

  /* 深色區塊 */
  --d-bg:    #17181A;
  --d-txt:   #EDEBE6;
  --d-dim:   #93959A;
  --d-rule:  #2E3034;
  --d-accent:#A8B6D6;

  --serif: "Bodoni Moda", "Noto Serif TC", Georgia, "Songti TC", "PMingLiU", serif;
  --sans:  "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", sans-serif;

  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(.22,.68,.24,1);
}

*, *::before, *::after{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .015em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote{ margin: 0; }
ul, ol{ list-style: none; padding: 0; }
img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; }

.sr{
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip{
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 12px 20px; font-size: .85rem; text-decoration: none;
}
.skip:focus{ left: 12px; top: 12px; }

:focus-visible{
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ── 共用文字樣式 ─────────────────────────────────────── */

.eyebrow{
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.sec-title{
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.1vw, 2.55rem);
  line-height: 1.3;
  letter-spacing: .02em;
  margin-top: 14px;
}

.sec-lead{
  color: var(--ink-2);
  font-size: .96rem;
  line-height: 2;
  max-width: 46ch;
}

.link{
  display: inline-block;
  margin-top: 18px;
  font-size: .88rem;
  text-decoration: none;
  border-bottom: 1px solid var(--indigo);
  padding-bottom: 3px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.link:hover{ color: var(--indigo); border-color: var(--ink); }

/* ── 按鈕 ─────────────────────────────────────────────── */

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-size: .85rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-decoration: none;
  transition: background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.btn:hover{ background: var(--indigo); border-color: var(--indigo); }

.btn-ghost{
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover{ background: transparent; color: var(--indigo); border-color: var(--indigo); }

.btn-sm{ padding: 9px 18px; font-size: .75rem; letter-spacing: .12em; }

/* ── 頁首 ─────────────────────────────────────────────── */

.hdr{
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  /* 首頁的主視覺底圖會鋪到頁首下方，所以選單列一律給實心紙色底 */
  background: var(--paper);
  transition: background .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.hdr.stuck{
  background: rgba(242,241,237,.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--rule);
}

.hdr-in{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 70px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand{
  display: flex; align-items: center;
  /* 識別標誌回到左上角，兼作回首頁的入口 */
  margin-right: auto; text-decoration: none;
}
.brand img{
  width: auto;
  height: clamp(20px, 2.2vw, 26px);
}

.hdr-nav{ display: none; gap: 28px; }
.hdr-nav a{
  font-size: .82rem; letter-spacing: .07em; color: var(--ink-2);
  text-decoration: none; transition: color .3s var(--ease);
}
.hdr-nav a:hover{ color: var(--indigo); }

.menu-btn{
  display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
  width: 40px; height: 40px; padding: 0 8px;
  background: none; border: 0; cursor: pointer;
}
.menu-btn-l{ display: block; height: 1px; width: 100%; background: var(--ink); transition: transform .35s var(--ease); }
.menu-btn.open .menu-btn-l:nth-child(1){ transform: translateY(3.5px) rotate(9deg); }
.menu-btn.open .menu-btn-l:nth-child(2){ transform: translateY(-3.5px) rotate(-9deg); }

.menu{
  position: fixed; top: 70px; left: 0; right: 0; z-index: 45;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.menu[hidden]{ display: none; }
.menu-list{ display: flex; flex-direction: column; padding: 4px var(--pad) 26px; }
.menu-list a{
  padding: 15px 0; border-bottom: 1px solid var(--rule);
  text-decoration: none; font-size: 1rem; letter-spacing: .05em;
}

@media (min-width: 980px){
  .hdr-nav{ display: flex; }
  .menu-btn{ display: none; }
  .menu{ display: none; }
}
@media (max-width: 560px){
  .hdr .btn-sm{ display: none; }
}

/* ── 左側毛線軌道 ─────────────────────────────────────── */

.rail{
  position: fixed; left: 36px; top: 50%; transform: translateY(-50%);
  z-index: 40; display: none; flex-direction: column; gap: 21px;
}
.rail-track{
  position: absolute; left: 4px; top: -8px; bottom: -8px;
  width: 1px; background: var(--rule);
}
.rail-fill{
  position: absolute; left: 0; top: 0; width: 1px;
  background: var(--indigo);
  height: calc(var(--p, 0) * 100%);
}
.rail-dot{
  position: relative; z-index: 1;
  width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--paper);
  transition: background .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.rail-dot.on{ background: var(--indigo); border-color: var(--indigo); transform: scale(1.3); }

.rail-label{
  position: absolute; left: 21px; top: 50%;
  transform: translateY(-50%) translateX(-6px);
  white-space: nowrap; font-size: .7rem; letter-spacing: .16em;
  color: var(--ink-2); opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.rail-dot:hover .rail-label,
.rail-dot.on .rail-label{ opacity: 1; transform: translateY(-50%) translateX(0); }

@media (min-width: 1400px){ .rail{ display: flex; } }

/* ── 針目線條（記憶點） ───────────────────────────────── */

.knit{ position: absolute; pointer-events: none; }
.knit svg{ width: 100%; height: 100%; display: block; }
.knit path{
  fill: none;
  stroke: var(--indigo);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .3;
}

/* ── 1. 開頭自我介紹 ──────────────────────────────────── */

.hero{
  position: relative;
  padding-top: 128px;
  padding-bottom: clamp(64px, 9vw, 118px);
  /* 針目線條刻意超出照片邊界，這裡收邊，避免手機出現左右捲動 */
  overflow: hidden;
}

/* 文字與人像壓在底圖之上 */
.hero-grid{ position: relative; z-index: 1; }
.hero-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(46px, 6vw, 84px);
  align-items: center;
}

/* 標題與內文壓在底圖上，後面刷一層漸淡的紙色，讓字跳出來又看不出方框 */
.hero-h1,
.hero-lead{ position: relative; }
.hero-h1::before,
.hero-lead::before{
  content: "";
  position: absolute;
  inset: -.42em -1.6em -.34em -1.1em;
  z-index: -1;
  background: radial-gradient(115% 100% at 34% 50%,
    rgba(242, 241, 237, .6) 0%,
    rgba(242, 241, 237, .54) 42%,
    rgba(242, 241, 237, 0) 76%);
}
.hero-lead::before{ inset: -.6em -1.4em -.5em -1em; }

.hero-h1{
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.05rem, 4.7vw, 3.85rem);
  line-height: 1.34;
  letter-spacing: .015em;
  margin-top: 22px;
}

.hero-lead{
  margin-top: 26px;
  max-width: 44ch;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 2.05;
}

.hero-cta{
  margin-top: 38px;
  display: flex; flex-wrap: wrap; gap: 14px;
}

.hero-meta{
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--ink-2);
}

.hero-fig{ position: relative; }
.hero-fig .knit{ top: -8%; right: -13%; bottom: -5%; left: -15%; z-index: 0; }

/* 作品照放大鋪在右半邊當底圖，往左漸層淡出成紙面 */
.hero-bg{
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-bg img{
  position: absolute;
  top: 50%;
  left: 8%;
  transform: translateY(-50%);
  width: min(88%, 1080px);
  height: auto;
  /* 齊左之後圖會壓到標題底下，透明度再壓低一點保住閱讀性 */
  opacity: .42;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 46%, transparent 88%);
  mask-image: linear-gradient(to right, #000 0%, #000 46%, transparent 88%);
}
@media (max-width: 899px){
  /* 手機上文字整片壓在圖上，所以再淡一點、只留上半部當氛圍 */
  .hero-bg img{
    top: 0;
    left: -14%;
    transform: none;
    width: 128%;
    opacity: .2;
  }
}

.hero-frame{
  position: relative; z-index: 2;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  border: 8px solid var(--paper);
  background: var(--paper-2);
}
.hero-frame img{
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  filter: grayscale(.18) contrast(1.03);
}

.hero-fig figcaption{
  position: relative; z-index: 2;
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 18px;
  font-size: .7rem;
  letter-spacing: .16em;
  color: var(--ink-2);
}
.hero-cap-n{ color: var(--ink); }

@media (min-width: 900px){
  .hero-grid{ grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); }
}

/* ── 區塊骨架 ─────────────────────────────────────────── */

.section{
  padding: clamp(84px, 10vw, 146px) 0;
  border-top: 1px solid var(--rule);
}
.section-alt{ background: var(--paper-2); }

.sec-head{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(22px, 4vw, 76px);
  align-items: end;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(44px, 5vw, 76px);
}
@media (min-width: 860px){
  .sec-head{ grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
}

/* ── 2. 關於我 ────────────────────────────────────────── */

.about-body{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(34px, 4vw, 62px);
  margin-bottom: clamp(60px, 7vw, 96px);
}
@media (min-width: 860px){
  .about-body{ grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
}

.about-prose p{
  color: var(--ink-2);
  font-size: .98rem;
  line-height: 2.1;
  margin-bottom: 1.5em;
}
.about-prose p:first-child{ color: var(--ink); font-size: 1.04rem; }
.about-prose p:last-child{ margin-bottom: 0; }

.about-aside{ border-left: 1px solid var(--rule); padding-left: 26px; }
.tag-list{ margin-top: 16px; }
.tag-list li{
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: .88rem;
  letter-spacing: .04em;
}

.miles{
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule);
}
.mile{
  padding: 32px 0 30px;
  border-bottom: 1px solid var(--rule);
}
.mile-fig{
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 4.6vw, 3.5rem);
  line-height: 1;
  letter-spacing: .01em;
}
.mile-fig-zh{
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  letter-spacing: .06em;
  padding-top: .42em;
}
/* 四位數的數字要縮一級，四欄並排才不會擠到換行 */
.mile-fig-lg{ font-size: clamp(2.1rem, 3.7vw, 2.85rem); }
.mile-plus{ font-size: .38em; letter-spacing: .02em; margin-left: 3px; }
.mile-unit{
  display: block;
  margin-top: 12px;
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--indigo);
}
.mile-txt{
  margin-top: 14px;
  font-size: .84rem;
  line-height: 1.9;
  color: var(--ink-2);
  max-width: 30ch;
}

@media (min-width: 620px){
  .miles{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mile{ padding-right: 26px; border-right: 1px solid var(--rule); }
  .mile:nth-child(2n){ border-right: 0; }
}
@media (min-width: 1000px){
  .miles{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mile{ border-bottom: 0; border-right: 1px solid var(--rule); }
  .mile:nth-child(2n){ border-right: 1px solid var(--rule); }
  .mile:last-child{ border-right: 0; }
}

/* ── 7. 服務項目：與大事記同一套欄位編排 ──────────────── */

.svc{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(30px, 3vw, 40px);
  border-top: 1px solid var(--rule);
  padding-top: clamp(28px, 3.2vw, 44px);
}
@media (min-width: 680px){
  .svc{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px){
  .svc{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .svc-col + .svc-col{ border-left: 1px solid var(--rule); padding-left: clamp(24px, 2.2vw, 38px); }
}

.svc-en{
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--indigo);
}
.svc-name{
  font-family: var(--serif);
  font-weight: 500;
  /* 九個字的標題，字級比其他欄位標題小兩級，四欄才不會擠 */
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.5;
  letter-spacing: .03em;
  margin-top: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.svc-list{ margin-top: 16px; }
.svc-list li{
  position: relative;
  padding: 7px 0 7px 16px;
  color: var(--ink-2);
  font-size: .89rem;
  line-height: 1.75;
}
.svc-list li::before{
  content: "";
  position: absolute;
  left: 0; top: 1.05em;
  width: 6px; height: 1px;
  background: var(--rule);
}

/* ── 5. 過往設計案精選：等大卡片網格 ──────────────────── */

.cards{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(30px, 3.4vw, 46px);
  border-top: 1px solid var(--rule);
  padding-top: clamp(30px, 3.6vw, 48px);
}
@media (min-width: 620px){
  .cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px){
  .cards{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 每張圖佔一樣大的框，圖片完整入鏡、不裁切也不變形 */
.card-media{
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  overflow: hidden;
}
.card-media img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform .9s var(--ease);
}
.card:hover .card-media img{ transform: scale(1.03); }

.card-meta{
  margin-top: 18px;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.card-name{
  font-family: var(--serif);
  font-weight: 500;
  /* 與服務項目標題同一層級，字級一起小兩級 */
  font-size: clamp(.95rem, 1.35vw, 1.06rem);
  line-height: 1.6;
  letter-spacing: .02em;
  margin-top: 10px;
}
.card-desc{
  margin-top: 12px;
  color: var(--ink-2);
  font-size: .92rem;
  line-height: 1.95;
}
.card-links{
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.card-links .link{ font-size: .8rem; margin-top: 12px; }

/* ── 4. YouTube 頻道：兩個主題與訂閱收尾 ──────────────── */

/* ── 4. 媒體怎麼說 ────────────────────────────────────── */

/* 剪報牆：等大的紙面，點下去看大圖 */
.clips{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 2.6vw, 34px);
  border-top: 1px solid var(--rule);
  padding-top: clamp(28px, 3.2vw, 44px);
}
@media (min-width: 620px){
  .clips{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px){
  .clips{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.clip-btn{
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
  transition: border-color .35s var(--ease);
}
.clip-btn:hover{ border-color: var(--indigo); }
.clip-btn img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform .8s var(--ease);
}
.clip-btn:hover img{ transform: scale(1.03); }

.clip-cap{
  margin-top: 12px;
  color: var(--ink-2);
  font-size: .84rem;
  line-height: 1.8;
}
.clip-src{
  display: block;
  margin-bottom: 4px;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--indigo);
}

/* 點開的大圖 */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(23, 24, 26, .92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox[hidden]{ display: none; }
.lightbox img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
}
.lightbox-close{
  position: absolute;
  top: clamp(12px, 2vw, 26px);
  right: clamp(12px, 2vw, 26px);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(242,241,237,.5);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.lightbox-close:hover{ background: var(--indigo); border-color: var(--indigo); }

.press-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--rule);
  padding-top: clamp(28px, 3.2vw, 44px);
}
@media (min-width: 640px){
  .press-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px){
  .press-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.quote-src{
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  letter-spacing: .03em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.quote-loc{
  margin-left: 10px;
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .16em;
  color: var(--ink-2);
  vertical-align: 2px;
}
.quote-yr{
  margin-top: 14px;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--indigo);
}
.quote-txt{
  margin-top: 10px;
  color: var(--ink-2);
  font-size: .92rem;
  line-height: 1.95;
}
.quote .link{ font-size: .8rem; margin-top: 14px; }
/* 原始網頁已失效，連到網路檔案館的存檔版本 */
.link-note{
  margin-left: 8px;
  font-size: .64rem;
  letter-spacing: .14em;
  color: var(--ink-2);
  vertical-align: 1px;
}

.press-more{
  margin-top: clamp(34px, 4vw, 52px);
  padding-top: clamp(20px, 2.4vw, 28px);
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: .82rem;
  line-height: 2.1;
}
/* 媒體名單：每個名字都是連結，中間用細分隔點串起來 */
.press-more a{
  display: inline-block;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.press-more a:hover{ color: var(--indigo); border-bottom-color: var(--indigo); }
.press-sep{ margin: 0 .5em; color: var(--rule); }
.press-more-l{
  display: block;
  margin-bottom: 6px;
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
}

/* 頻道區的說明就是區塊標題旁的 sec-lead，排版與其他區塊一致 */
#videos .yt{ margin-top: clamp(34px, 4vw, 52px); }

.sub-cta{
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: clamp(26px, 3vw, 38px);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}
.sub-note{
  color: var(--ink-2);
  font-size: .88rem;
  line-height: 1.9;
  max-width: 40ch;
}

/* ── 3. 歷年大事記：四個年代橫向並排 ──────────────────── */

.eras{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 3vw, 40px);
  border-top: 1px solid var(--rule);
  padding-top: clamp(28px, 3.2vw, 44px);
}
@media (min-width: 680px){
  .eras{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 「走向國際」事情最多，一律佔兩欄，條目平均流進左右兩邊 */
  .era-wide{ grid-column: span 2; }
  .era-list-2col{
    column-count: 2;
    column-gap: clamp(24px, 2.4vw, 40px);
    column-rule: 1px solid var(--rule);
  }
  .era-list-2col .era-item{ break-inside: avoid; }
}
@media (min-width: 1080px){
  .eras{ grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(28px, 2.6vw, 44px); }
  /* 欄與欄之間一條細線，像年表的刻度 */
  .era + .era{ border-left: 1px solid var(--rule); padding-left: clamp(24px, 2.2vw, 38px); }
}

.era-span{
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: .08em;
  color: var(--indigo);
}
.era-name{
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.2rem, 1.9vw, 1.42rem);
  line-height: 1.4;
  letter-spacing: .03em;
  margin-top: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

/* 年代欄位吃比較寬的版面，讓多數條目一行就放得下 */
@media (min-width: 1240px){
  #timeline .wrap{ max-width: 1360px; }
}

.era-list{ margin-top: 16px; }
.era-item{
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 7px 0;
}
.era-y{
  font-family: var(--serif);
  font-size: .95rem;
  letter-spacing: .04em;
  color: var(--ink);
}
.era-t{
  color: var(--ink-2);
  font-size: .875rem;
  line-height: 1.72;
}
/* 一個年份底下的多筆數字，用細短線串成一小落 */
.era-stats{
  display: block;
  margin-top: 6px;
}
.era-stats span{
  display: block;
  position: relative;
  padding-left: 14px;
  line-height: 1.9;
}
.era-stats span::before{
  content: "";
  position: absolute;
  left: 0; top: .95em;
  width: 6px; height: 1px;
  background: var(--rule);
}

/* 條目後面的出處小連結 */
.era-src{
  margin-left: 6px;
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--indigo);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.era-src:hover{ border-bottom-color: var(--indigo); }

.glow-links{ margin-top: 4px; }
.glow-links .link{ font-size: .8rem; color: var(--d-accent); border-bottom-color: var(--d-accent); }
.glow-links .link:hover{ color: var(--d-txt); border-bottom-color: var(--d-txt); }

/* ── 4-1. 熱門影片：等大封面，點擊就地播放 ────────────── */

.vids{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(22px, 2.6vw, 34px);
  margin-top: 20px;
}
@media (min-width: 620px){
  .vids{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 940px){
  .vids{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.vid{
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.vid-media{
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  background: var(--ink);
}
.vid-media img,
.vid-media iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  transition: transform .9s var(--ease), opacity .4s var(--ease);
}
.vid:hover .vid-media img{ transform: scale(1.04); opacity: .82; }

/* 播放鍵：一個細圓框加三角形，跟頁面其他線條同一種語彙 */
.vid-play{
  position: absolute;
  left: 50%; top: 50%;
  width: 54px; height: 54px;
  margin: -27px 0 0 -27px;
  border: 1px solid rgba(242,241,237,.85);
  border-radius: 50%;
  background: rgba(23,24,26,.32);
  transition: background .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.vid-play::after{
  content: "";
  position: absolute;
  left: 21px; top: 17px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--paper);
}
.vid:hover .vid-play{
  background: var(--indigo);
  border-color: var(--indigo);
  transform: scale(1.06);
}

.vid-title{
  display: block;
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .02em;
}
.vid-views{
  display: block;
  margin-top: 7px;
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--ink-2);
}

/* ── 6. 著作 ──────────────────────────────────────────── */

.book{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  border-top: 1px solid var(--rule);
  padding-top: clamp(30px, 4vw, 52px);
}
@media (min-width: 820px){
  .book{ grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }
}
.book-cover{
  max-width: 340px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  background: var(--paper-2);
}
.book-cover img{ width: 100%; height: auto; display: block; }

.book-name{
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  line-height: 1.35;
  letter-spacing: .03em;
  margin-top: 12px;
}
.book-sub{
  margin-top: 10px;
  color: var(--ink-2);
  font-size: .9rem;
  letter-spacing: .06em;
}
.book-desc{
  margin-top: 20px;
  color: var(--ink-2);
  font-size: .95rem;
  line-height: 2;
  max-width: 46ch;
}
/* 四位推薦人：名字在前、身分在後，一行一位 */
.book-praise{
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.praise-list{ margin-top: 12px; }
/* 八個人拆成左右兩欄各四位，版面才不會拖太長 */
@media (min-width: 520px){
  .praise-list{
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(4, auto);
    column-gap: clamp(20px, 2.6vw, 42px);
  }
  .praise-n{ min-width: 5.5em; }
}
.praise-list li{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 4px 0;
}
.praise-n{
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: .04em;
  min-width: 7.5em;
}
.praise-r{
  font-size: .82rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.book-quote{
  margin-top: 20px;
  padding-left: 20px;
  border-left: 1px solid var(--indigo);
  max-width: 44ch;
}
.book-quote p{
  font-family: var(--serif);
  /* 阿信那段是這一區的重點，字級比內文大兩級 */
  font-size: clamp(1.15rem, 1.9vw, 1.35rem);
  line-height: 1.85;
  letter-spacing: .02em;
}
.book-quote cite{
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: .76rem;
  letter-spacing: .12em;
  color: var(--ink-2);
}
.book-quote + .book-quote{ margin-top: 16px; }
.book-links .link{ font-size: .82rem; }

.book-cta{
  margin-top: clamp(24px, 3vw, 34px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
}

/* ── 線上閱讀頁（book.html） ──────────────────────────── */

.reader-page{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
}
.reader-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.reader-back,
.reader-note{
  font-size: .78rem;
  letter-spacing: .12em;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.reader-back:hover{ color: var(--indigo); }
.reader-note{ letter-spacing: .2em; }
.reader-title{ text-align: center; line-height: 1.4; }
.reader-name{
  display: block;
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: .04em;
}
.reader-sub{
  display: block;
  font-size: .7rem;
  letter-spacing: .14em;
  color: var(--ink-2);
}
@media (max-width: 560px){
  .reader-sub{ display: none; }
}

.reader{ flex: 1 1 auto; display: flex; min-height: 0; }
.reader-doc{
  flex: 1 1 auto;
  width: 100%;
  min-height: 70vh;
  border: 0;
  display: block;
}
.reader-fallback{
  max-width: 44ch;
  margin: clamp(48px, 10vh, 110px) auto;
  padding: 0 var(--pad);
  text-align: center;
}
.reader-fb-title{
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.4;
  margin-top: 12px;
}
.reader-fb-note{
  margin: 18px 0 28px;
  color: var(--ink-2);
  font-size: .95rem;
  line-height: 2;
}
.reader-foot{
  padding: 14px var(--pad);
  background: var(--paper);
  border-top: 1px solid var(--rule);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--ink-2);
  text-align: center;
}

/* ── 夜光針織：設計案精選的收尾大圖 ─────────────────── */

.glow{
  margin-top: clamp(48px, 6vw, 86px);
  background: var(--d-bg);
  border-radius: 2px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px){
  .glow{ grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: center; }
}
.glow img{ width: 100%; height: 100%; object-fit: cover; }
.glow figcaption{
  padding: clamp(26px, 3.4vw, 46px);
}
.glow .eyebrow{ color: var(--d-accent); }
.glow-note{
  margin-top: 14px;
  color: var(--d-dim);
  font-size: .93rem;
  line-height: 2;
}

/* ── 8. 聯絡方式（深色收尾） ──────────────────────────── */

.section-dark{
  background: var(--d-bg);
  color: var(--d-txt);
  border-top-color: var(--d-bg);
}
.section-dark .eyebrow{ color: var(--d-dim); }
.section-dark .sec-title{ color: var(--d-txt); }
.section-dark .sec-lead{ color: var(--d-dim); }
.section-dark .sec-head{ border-bottom-color: var(--d-rule); }

.mailto{
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 5vw, 3.1rem);
  line-height: 1.3;
  letter-spacing: .01em;
  word-break: break-word;
  text-decoration: none;
  padding: clamp(18px, 3vw, 32px) 0;
  border-bottom: 1px solid var(--d-rule);
  transition: color .4s var(--ease), padding-left .4s var(--ease);
}
.mailto:hover{ color: var(--d-accent); padding-left: 10px; }

.social{ margin-top: clamp(30px, 4vw, 46px); }
.social a{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid var(--d-rule);
  text-decoration: none;
  transition: color .35s var(--ease), padding-left .35s var(--ease), border-color .35s var(--ease);
}
.social a:hover{ color: var(--d-accent); padding-left: 9px; border-bottom-color: #4A4D55; }
.social-n{ font-size: .96rem; letter-spacing: .04em; }
.social-h{ font-size: .82rem; letter-spacing: .06em; color: var(--d-dim); }

.foot{
  margin-top: clamp(48px, 6vw, 82px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: .74rem;
  letter-spacing: .1em;
  color: #7E8084;
}

/* ── 動態：載入與捲動淡入 ─────────────────────────────── */

.load{
  opacity: 0;
  transform: translateY(18px);
  animation: rise .95s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise{ to{ opacity: 1; transform: none; } }

.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .95s var(--ease) var(--d, 0s),
    transform .95s var(--ease) var(--d, 0s);
}
.reveal.in{ opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .load, .reveal{ opacity: 1; transform: none; animation: none; transition: none; }
  *{ animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
