:root {
  /* 不論螢幕多大，內容都維持手機寬度置中 */
  --column: 480px;
  --gutter: 12px;

  /* 深黑色調，區塊維持透色 */
  --ink: #f5f5f7;
  --text: #f5f5f7;
  --text-2: rgba(245, 245, 247, .66);
  --line: rgba(255, 255, 255, .12);
  --chip: rgba(255, 255, 255, .1);
  --glass: rgba(255, 255, 255, .07);
  --glass-button: rgba(255, 255, 255, .14);
  --glass-line: rgba(255, 255, 255, .16);
  --placeholder: rgba(255, 255, 255, .1);
  --placeholder-text: rgba(245, 245, 247, .7);

  --sans: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;

  --radius: 8px;
  --radius-inner: 6px;
}

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

html {
  background: #0a0a0b;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

.sprite { position: absolute; }

.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 背景：深黑，上方帶一點灰階漸層，固定不隨頁面捲動 */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #1b1b1d 0%, #121214 34%, #0a0a0b 68%, #050505 100%);
}

/* 細緻的顆粒，做出霧面的質感 */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
  opacity: .14;
}


/* 淺灰圖片佔位 */
.ph {
  display: grid;
  place-items: center;
  padding: 2px;
  color: var(--placeholder-text);
  background: var(--placeholder);
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

/* 按鈕 */
.button-13 {
  background-color: #fff;
  border: 1px solid #d5d9d9;
  border-radius: 8px;
  box-shadow: rgba(213, 217, 217, .5) 0 2px 5px 0;
  box-sizing: border-box;
  color: #0f1111;
  cursor: pointer;
  display: inline-block;
  font-family: "Amazon Ember",sans-serif;
  font-size: 13px;
  line-height: 29px;
  padding: 0 10px 0 11px;
  position: relative;
  text-align: center;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: middle;
  width: 100px;
}

.button-13:hover {
  background-color: #f7fafa;
}

.button-13:focus {
  border-color: #008296;
  box-shadow: rgba(213, 217, 217, .5) 0 2px 5px 0;
  outline: 0;
}

/* button-13 在這個網站的補充：全站字體、閃光需要的裁切，以及透色 */
.button-13 {
  overflow: hidden;
  border-color: var(--glass-line);
  color: var(--text);
  background-color: var(--glass-button);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--sans);
  font-weight: 600;
}

.button-13:hover { background-color: rgba(255, 255, 255, .22); }

/* 區塊：和 button-13 同樣的外觀與透色，但內容要能選取，也不會被按 */
.block {
  background-color: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, .35) 0 2px 5px 0;
  color: var(--text);
}

/* 底部與名片面板的按鈕要用手指按，寬高放大，其他照 button-13 */
.dock .button-13,
.sheet__actions .button-13 {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 8px;
  width: 100%;
  padding: 0 10px;
  font-size: 14px;
  line-height: 42px;
  white-space: nowrap;
}

.lang__btn:focus-visible,
.sheet__close:focus-visible,
.social__link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* 閃光：滑過時淡淡一道高光掃過，整顆只微微亮一下 */
.button-13::after,
.lang__btn::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 55%;
  background: linear-gradient(105deg,
    transparent 0%, rgba(255, 255, 255, .08) 30%, rgba(255, 255, 255, .28) 50%, rgba(255, 255, 255, .08) 70%, transparent 100%);
  opacity: 0;
  transform: translateX(-130%) skewX(-18deg);
  pointer-events: none;
}

.button-13.is-flashing,
.lang__btn.is-flashing,
.social__link.is-flashing { animation: flash-glow .7s ease-out; }

.button-13.is-flashing::after,
.lang__btn.is-flashing::after { animation: flash-sweep .7s cubic-bezier(.3, .6, .4, 1); }

@media (hover: hover) {
  .button-13:hover,
  .lang__btn:hover,
  .social__link:hover { animation: flash-glow .7s ease-out; }

  .button-13:hover::after,
  .lang__btn:hover::after { animation: flash-sweep .7s cubic-bezier(.3, .6, .4, 1); }
}

@keyframes flash-glow {
  0%   { filter: brightness(1) drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
  30%  { filter: brightness(1.02) drop-shadow(0 0 5px rgba(255, 255, 255, .28)); }
  100% { filter: brightness(1) drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
}

@keyframes flash-sweep {
  from { opacity: 1; transform: translateX(-130%) skewX(-18deg); }
  to   { opacity: 1; transform: translateX(230%) skewX(-18deg); }
}

/* 版面 */
.page {
  display: grid;
  gap: 8px;
  width: min(100%, var(--column));
  margin-inline: auto;
  padding: 12px var(--gutter) 96px;
}

.section { scroll-margin-top: 4px; }

/* 標題直接放在漸層上時明暗差很大，用透色小標籤托住才讀得清楚 */
.label {
  display: inline-block;
  margin: 14px 0 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .06em;
}

/* 語言切換 */
.lang {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}

.lang__btn {
  position: relative;
  height: 28px;
  min-width: 42px;
  padding: 0 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s;
}

.lang__btn[aria-pressed="true"] {
  color: #0a0a0b;
  background: rgba(255, 255, 255, .78);
}

/* 第一區：人像貼齊畫面、沒有外框，下緣漸層後直接接到作品區 */
.hero {
  position: relative;
  margin: -12px calc(var(--gutter) * -1) 0;
}

/* 圖示下方的細線，左右和下面的區塊對齊 */
.hero::after {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, .24);
}

.hero__art {
  position: relative;
  /* 遮罩不重複，否則高度有小數時底部會多一條細線 */
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 97%);
  mask-image: linear-gradient(to bottom, #000 58%, transparent 97%);
}

/* 電腦上欄位左右也要淡掉，不然看得出一個方框 */
@media (min-width: 481px) {
  .hero__art {
    -webkit-mask-image:
      linear-gradient(to bottom, #000 58%, transparent 97%),
      linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to bottom, #000 58%, transparent 97%),
      linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    mask-composite: intersect;
  }
}

.hero__bg {
  width: 100%;
  height: auto;
}

.hero__figure {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 名字、職稱、四個連結靠左疊在一起，底部對齊人物下緣。放在淡出的圖層外，字才不會跟著變淡 */
.hero__id {
  position: absolute;
  left: 6%;
  bottom: 5%;
  width: 48%;
  color: #fff;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
}

.hero__dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, .7);
}

.hero__name {
  font-size: clamp(26px, 7.6vw, 34px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  white-space: nowrap;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .55);
}

.hero__title {
  margin-top: 4px;
  text-wrap: balance;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
}

.hero__cert {
  width: max-content;
  max-width: min(53vw, 220px);
  margin-top: 6px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 6px;
  color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .08);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  text-wrap: balance;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
}

/* 白色細線圓框 */
.social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social__link {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  color: #fff;
  transition: transform .15s, background-color .15s;
}

/* 圓框外多留一點範圍，手指比較好按 */
.social__link::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
}

.social__link .icon {
  width: 14px;
  height: 14px;
  stroke-width: 1.4;
}

.social__link:hover {
  background-color: rgba(255, 255, 255, .12);
  transform: translateY(-2px);
}
.social__link:active { transform: translateY(1px); }

/* 作品區：同一排 1/2、1/4、1/4，下面兩個小方塊 */
.works { margin-top: 6px; }

.portfolio {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.cat,
.mini {
  min-width: 0;
  padding: 6px 6px 8px;
}

.cat--main,
.mini { grid-column: span 2; }

.cat__media {
  height: clamp(84px, 27vw, 124px);
  border-radius: var(--radius-inner);
}

.mini__media {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-inner);
}

.cat h3,
.mini h3 {
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.015em;
}

.cat--main h3 { font-size: 15px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 6px;
}

.tags li {
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--text);
  background: var(--chip);
  font-size: 10.5px;
  line-height: 1.4;
}

/* 關於我 */
.about { padding: 16px; }

.about p { line-height: 1.6; white-space: pre-line; }

/* 經歷：職稱粗體在上，公司淡色在下 */
.xp { padding: 4px 16px; }

.xp__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding-block: 12px;
}

.xp__item + .xp__item { border-top: 1px solid var(--line); }

.xp__item h3 {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.xp__item h3 + p {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.4;
}

.xp__date {
  padding-top: 2px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

/* 頁尾小字 */
.foot {
  padding-top: 14px;
  color: rgba(245, 245, 247, .5);
  font-size: 11.5px;
  text-align: center;
}

/* 底部：存入聯絡人、分享名片 */
.dock {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 6px;
  width: min(100% - var(--gutter) * 2, var(--column) - var(--gutter) * 2);
  padding: 6px;
  border-radius: 14px;
  background: rgba(40, 40, 44, .55);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 0 0 1px var(--glass-line), rgba(0, 0, 0, .5) 0 8px 24px;
  transform: translateX(-50%);
}

/* 我的名片 */
.sheet {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: var(--column);
  max-height: calc(100dvh - 24px);
  margin: 0 auto;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 0;
  border-radius: 14px 14px 0 0;
  color: var(--text);
  background: rgba(28, 28, 30, .66);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: inset 0 1px 0 var(--glass-line), rgba(0, 0, 0, .35) 0 -12px 48px;
}

.sheet[open] { animation: sheet-in .28s cubic-bezier(.2, .8, .3, 1); }

.sheet::backdrop {
  background: rgba(0, 0, 0, .62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sheet__head h2 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.sheet__close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--glass-button);
  cursor: pointer;
}

.sheet__close:focus-visible { outline-color: var(--ink); }

/* QR code 的底維持實心白，手機才掃得到 */
.qr-card {
  width: min(100%, 290px);
  margin-inline: auto;
  padding: 18px;
  border-radius: var(--radius);
  color: #111;
  background: #fff;
}

.qr-card__code { width: 100%; height: auto; }

.qr-card__who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  min-width: 0;
}

.qr-card__who img { flex: none; border-radius: 50%; }
.qr-card__who div { display: grid; min-width: 0; }
.qr-card__who strong { font-size: 15px; font-weight: 800; line-height: 1.3; }

.qr-card__who small {
  overflow: hidden;
  color: #55555c;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet__hint {
  margin: 12px 0 14px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.01em;
  text-align: center;
}

.sheet__actions {
  display: grid;
  gap: 10px;
}

.sheet__actions .button-13 {
  justify-content: space-between;
  padding: 0 14px;
}

.sheet__actions .contact-row {
  padding-block: 9px;
  line-height: 1.3;
  text-align: left;
}

.contact-row__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.contact-row__text strong { font-weight: 700; }

.contact-row__text small {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 340px) {
  .dock .button-13 {
    column-gap: 6px;
    padding: 0 6px;
  }
}

/* 提示訊息 */
.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(min(100%, var(--column)) - var(--gutter) * 2);
  padding: 10px 16px;
  border-radius: var(--radius);
  color: #fff;
  background: rgba(58, 58, 62, .86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: rgba(0, 0, 0, .35) 0 8px 22px;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .button-13,
  .lang__btn,
  .social__link,
  .button-13::after,
  .lang__btn::after,
  .sheet[open] { animation: none !important; }
}

/* ───────── 拼貼預覽：多一層有內容的紙片 ───────── */
.hero__notes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 太窄的手機放不下，收起紙片，資訊都還在頁面其他地方 */
@media (max-width: 359px) {
  .hero__notes { display: none; }
}

/* 人物縮小並往右移，腳下的位置不變 */
.hero__figure {
  transform: translateX(7%) scale(.88);
  transform-origin: 50% 100%;
}

/* 職稱固定兩行，不會碰到人物 */
.hero__title { width: 9.5em; }

/* 人物右移後不能把頁面撐寬 */
.hero__art { overflow: hidden; }

/* 最窄的手機：iPAS 維持一行，文字才不會壓到撕紙邊 */
@media (max-width: 340px) {
  :lang(zh-Hant) .hero__cert {
    max-width: none;
    font-size: 10.5px;
    white-space: nowrap;
  }

  .social { margin-top: 10px; }
}


/* 裁掉人物上方的空白，圖層都貼齊下緣 */
.hero__art { aspect-ratio: 1080 / 796; }

.hero__bg,
.hero__notes,
.hero__figure {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: auto;
}

/* 撕紙的白邊可能經過這一行，墊個深色底才讀得清楚 */
.hero__status {
  margin-left: -6px;
  padding: 1px 8px 1px 6px;
  border-radius: 999px;
  background: rgba(12, 12, 14, .82);
}

/* 最窄的手機不裁切照片，文字才有足夠高度 */
@media (max-width: 340px) {
  .hero__art { aspect-ratio: 1080 / 876; }
}

@media (max-width: 340px) {
  .hero__name {
    width: fit-content;
    margin-left: -6px;
    padding: 0 6px;
    border-radius: 6px;
    background: rgba(12, 12, 14, .82);
  }
}

/* ───────── 第一區是一張名片 ───────── */
.hero {
  margin: 0;
  border-radius: 20px;
  box-shadow: rgba(0, 0, 0, .6) 0 1px 2px, rgba(0, 0, 0, .6) 0 18px 40px;
}

/* 卡片的細邊與一道斜向反光 */
.hero::after {
  inset: 0;
  height: auto;
  border-radius: inherit;
  background: linear-gradient(112deg, rgba(255, 255, 255, .1), transparent 30%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  pointer-events: none;
}

.hero__art {
  border-radius: inherit;
  -webkit-mask-image: none;
  mask-image: none;
}

/* 卡片比畫面窄，人物再往右一點，圖示和 iPAS 框才不會碰到人 */
.hero__figure { transform: translateX(9%) scale(.88); }

:lang(en) .hero__cert { max-width: 168px; }
:lang(en) .social { margin-top: 10px; }

@media (max-width: 340px) {
  :lang(en) .hero__cert { max-width: 150px; }

  .social { gap: 6px; }

  .social__link {
    width: 28px;
    height: 28px;
  }
}

/* ───────── 名片下緣的 slogan ───────── */
/* 照片下面接一條細長的底，人物像站在上面；名字那一疊的位置仍然以照片為準 */
.hero { --slogan-h: 40px; }

.hero__art { border-radius: 20px 20px 0 0; }

.hero__id { bottom: calc(var(--slogan-h) + (100% - var(--slogan-h)) * .05); }

.hero__slogan {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--slogan-h);
  padding: 0 6%;
  border-top: 1px solid rgba(255, 255, 255, .16);
  border-radius: 0 0 20px 20px;
  color: rgba(255, 255, 255, .84);
  background: #121214;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .03em;
  white-space: nowrap;
}

/* 開頭一小段細線，讓這句讀起來像標語 */
.hero__slogan::before {
  content: "";
  flex: none;
  width: 16px;
  height: 1px;
  background: currentColor;
}

/* ───────── 底部兩顆按鈕：同樣的亮邊與霧面，Share card 底色暗一階，都保持透色 ───────── */
.dock .button-13--primary,
.dock .button-13--secondary { border-color: rgba(255, 255, 255, .34); }

.dock .button-13--primary { background-color: rgba(255, 255, 255, .26); }

.dock .button-13--primary:hover { background-color: rgba(255, 255, 255, .32); }

.dock .button-13--secondary { background-color: rgba(255, 255, 255, .16); }

.dock .button-13--secondary:hover { background-color: rgba(255, 255, 255, .22); }

/* ───────── 作品區：可以點進去的作品頁 ───────── */
.mini--link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s;
}

.mini--link:hover { background-color: rgba(255, 255, 255, .11); }
.mini--link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.mini__media--img {
  overflow: hidden;
  background: #161618;
}

.mini__media--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini--link h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.mini__go {
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .7;
}

/* 作品圖上的小標籤，提示可以點進去 */
.mini__media--img { position: relative; }

.mini__chip {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(10, 10, 11, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.5;
}

/* 作品區：Social Media 等大格子也可以點進作品頁 */
.cat--link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s;
}

.cat--link:hover { background-color: rgba(255, 255, 255, .11); }
.cat--link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.cat__media--img {
  position: relative;
  overflow: hidden;
  background: #161618;
}

.cat__media--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat--link h3 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
}

.cat--link .mini__chip { left: 4px; bottom: 4px; padding: 1px 6px; font-size: 9.5px; }

/* ───────── 作品區：Graphic & Brand Design 合併成一格，寬度約三分之二；下排兩格各半 ───────── */
.portfolio { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cat--design { grid-column: span 4; }
.cat--social { grid-column: span 2; }
.mini { grid-column: span 3; }

.cat--design h3 { font-size: 15px; }

/* 計價說明：比一般標籤淡一點 */
.tags .tags__note {
  color: var(--text);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  opacity: .85;
}

/* ───────── Graphic & Brand Design 格子：一本一直在翻頁的型錄 ───────── */
.cat__media--book {
  position: relative;
  background: radial-gradient(120% 120% at 50% 30%, #f6f0e6 0%, #e6dccb 100%);
}

/* 高度跟著格子走，寬度依跨頁比例 */
.tbook {
  position: absolute;
  top: 9%;
  bottom: 9%;
  left: 50%;
  display: flex;
  aspect-ratio: 340 / 236;
  translate: -50% 0;
  perspective: 700px;
}

.tbook__page {
  width: 50%;
  height: 100%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 6px 12px rgba(40, 28, 10, .22);
}

.tbook__l { border-radius: 3px 0 0 3px; }
.tbook__r { border-radius: 0 3px 3px 0; }

/* 書背的陰影 */
.tbook::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 16%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .18) 48%, rgba(255, 255, 255, .12) 52%, transparent);
  pointer-events: none;
}

/* 翻動的那一頁：以書背為軸轉 180 度，正面是右頁、背面是下一個跨頁的左頁 */
.tbook__leaf {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  visibility: hidden;
  z-index: 1;
}

.tbook__face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.tbook__front { border-radius: 0 3px 3px 0; }
.tbook__back { transform: rotateY(180deg); border-radius: 3px 0 0 3px; }

.tbook.is-turning .tbook__leaf {
  visibility: visible;
  transform: rotateY(-180deg);
  transition: transform 1.1s cubic-bezier(.45, .05, .25, 1);
}

/* 開放接案中：綠底白字 */
.hero__status {
  color: #fff;
  background: #16824a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  text-shadow: none;
  font-weight: 650;
}

.hero__dot { background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }

/* 書的左右兩側：其他型錄與 DM 的封面微微散開，像攤在桌上 */
.cat__media--book .tside {
  position: absolute;
  top: 18%;
  z-index: 0;
  width: auto;
  height: 64%;
  aspect-ratio: 120 / 166;
  object-fit: cover;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(40, 28, 10, .25);
}

.cat__media--book .tside--l1 { left: 5%; rotate: -8deg; }
.cat__media--book .tside--l2 { left: 15%; top: 13%; rotate: -3deg; }
.cat__media--book .tside--r1 { right: 5%; rotate: 8deg; }
.cat__media--book .tside--r2 { right: 15%; top: 13%; rotate: 3deg; }

.tbook { z-index: 1; }
.cat__media--book .mini__chip { z-index: 2; }

/* 中間的書微微發亮，和後面的封面分開：書後一圈暖白光、頁面細白邊，兩側封面稍微退暗 */
.tbook::before {
  content: "";
  position: absolute;
  inset: -16% -10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 251, 240, .95), rgba(255, 251, 240, .55) 55%, rgba(255, 251, 240, 0));
  filter: blur(4px);
  pointer-events: none;
}

.cat__media--book .tbook__page,
.cat__media--book .tbook__face {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .75), 0 8px 18px rgba(40, 28, 10, .32);
}

.cat__media--book .tside { filter: brightness(.86) saturate(.9); }

/* Visual Merchandising 格子：三張照片輪流淡入淡出，每張約 4 秒 */
.mini__media--carousel img {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: vm-fade 12s infinite;
}

.mini__media--carousel img:nth-child(1) { animation-delay: -0.6s; }
.mini__media--carousel img:nth-child(2) { animation-delay: 3.4s; }
.mini__media--carousel img:nth-child(3) { animation-delay: 7.4s; }
.mini__media--carousel .mini__chip { z-index: 1; }

@keyframes vm-fade {
  0% { opacity: 0; transform: scale(1.04); }
  5% { opacity: 1; }
  33% { opacity: 1; }
  38% { opacity: 0; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .mini__media--carousel img { animation: none; }
  .mini__media--carousel img:nth-child(1) { opacity: 1; }
}
