@font-face {
  font-family: "LXGW WenKai TC";
  src: url("../fonts/LXGWWenKaiTC-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LXGW WenKai TC";
  src: url("../fonts/LXGWWenKaiTC-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #fff8f0;
  --ink: #286e54;
  --ink-2: #0e2e2c;
  --teal: #2d8078;
  --teal-light: #95c8bc;
  --mist: #e9f2ed;
  --butter: #f6edc9;
  --coral: #ee735c;
  --paper: #f7f5ef;
  --white: #ffffff;
  --text: #183431;
  --muted: #657b77;
  --line: rgba(22, 62, 59, 0.17);
  --shadow: 0 24px 70px rgba(14, 46, 44, 0.15);
  --header-h: 80px;
  --max: 1540px;
  --display: "PingFang TC", "Noto Sans TC", sans-serif;
  --body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.language-pending:not(.has-site-loader) body { opacity: 0; }
html.language-ready body { opacity: 1; transition: opacity 180ms ease-out; }

html.has-site-loader:not(.loader-ready):not(.loader-fallback),
html.has-site-loader:not(.loader-ready):not(.loader-fallback) body {
  overflow: hidden;
}

.site-loader {
  --loader-progress: 0%;
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--white);
  background-color: #3a9a96;
  background-image: url("../media/graph.png");
  background-repeat: repeat;
  transform: translate3d(0, 0, 0);
  transition: transform 560ms cubic-bezier(.76, 0, .24, 1), visibility 0s linear 0s;
  contain: layout paint;
}

html.loader-ready .site-loader {
  visibility: hidden;
  transform: translate3d(0, -105%, 0);
  transition: transform 560ms cubic-bezier(.76, 0, .24, 1), visibility 0s linear 560ms;
}

html.loader-fallback .site-loader {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.site-loader__content {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.site-loader__progress {
  color: var(--white);
  font-family: "Kanit", sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

.site-loader__name {
  position: relative;
  isolation: isolate;
  font-family: "Kanit", sans-serif;
  font-size: clamp(2rem, 7vw, 5.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: clamp(.12em, 1.5vw, .3em);
  white-space: nowrap;
}

.site-loader__name-base { color: rgba(42, 76, 58, .12); }

.site-loader__name-fill {
  position: absolute;
  inset: 0;
  color: #f5e891;
  clip-path: inset(0 calc(100% - var(--loader-progress)) 0 0);
  transition: clip-path 90ms linear;
}

html[lang="zh-Hans"] body {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

html[lang="en"] h1,
html[lang="en"] h2 {
  font-family: "Oswald", Impact, sans-serif;
  font-weight: 700;
  letter-spacing: -.06em;
	text-transform: uppercase;
    line-height: 1;
}

html[lang="zh-Hans"] h1,
html[lang="zh-Hans"] h2 {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-weight: 900;
  letter-spacing: -.035em;
}

html[lang="zh-Hant"] h1,
html[lang="zh-Hant"] h2 {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-weight: 900;
  letter-spacing: -.035em;
}

body.modal-open { overflow: hidden; }

button,
a { -webkit-tap-highlight-color: transparent; }

button { font: inherit; }

a { color: inherit; }

img,
video { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}
p {font-size:18px;line-height:1.35}
html[lang="en"] p{font-size:18px;line-height:1.2}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  padding: 10px 16px;
  color: var(--white);
  background: var(--ink-2);
  border-radius: 8px;
  transform: translateY(-160%);
}
h1,h2,h3{letter-spacing: -.07em;}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 500;
  height: var(--header-h);
  padding: 0 max(22px, env(safe-area-inset-left)) 0 max(22px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--white);
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-height: 48px;
}

.brand-logo {
  width: auto;
  height: 75px;
  object-fit: contain;
}

.brand-copy { display: grid; line-height: 1.05; letter-spacing: .08em; }
.brand-copy strong { font-size: 15px; }
.brand-copy small { margin-top: 5px; color: var(--teal-light); font-size: 9px; }

.header-actions,
.language-menu { display: flex; align-items: center; }
.header-actions { gap: 10px; }

.language-switcher {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-pill,
.language-menu {
  min-height: 44px;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.06);
  border-radius: 999px;
}

.nav-pill {
  min-width: 52px;
  padding: 0 18px;
  cursor: pointer;
}

.nav-pill:hover { color: var(--ink); background: var(--butter); border-color: var(--butter); }

.language-menu {
  padding: 4px;
  gap: 2px;
}

.language-toggle { display: none; }
.language-label-mobile { display: none; }

.language-option {
  min-height: 34px;
  padding: 0 10px;
  color: rgba(255,255,255,.72);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
}

.language-option:hover { color: var(--white); }
.language-option.is-active { color: var(--ink); background: var(--butter); }

.hero {
  position: relative;
  min-height: min(940px, 100svh);
  padding: calc(var(--header-h) + 2%) max(5vw, 32px) 70px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background-color: #e8efdf;
  background-image: url("../media/background.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(247,245,239,.18);
}

.hero-content { width: min(50%, 58vw); }
html[lang="en"] .hero-content{width: min(60%, 58vw); }
.hero-kicker,
.eyebrow {
  margin: 0 0 22px;
  color: var(--ink);
  font-size: 12px!important;
  font-weight: 800;
  letter-spacing: .18em;
}

.hero-kicker,.project-category {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  background: rgba(247,245,239,.2);
  border: 1px solid rgba(22,62,59,.15);
  border-radius: 999px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(238,115,92,.17);
}

.hero h1 {
  max-width: 940px;
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(54px, 5vw, 114px);
  line-height: 1.2;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.hero h1 em {
  color: var(--teal);
  font-style: normal;
  position: relative;
}

.hero-intro {
  width: min(660px, 100%);
  margin: 30px 0 0;
  color: #284e4a;
  font-size: clamp(18px, 1.15vw, 20px);
  line-height: 1.35;
  text-wrap: pretty;
}

.hero-cta-row { display: flex; align-items: center; gap: 26px; margin-top: 38px; }

.primary-cta,
.text-cta {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-cta {
  padding: 0 24px;
  color: var(--white);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 7px 7px 0 var(--teal-light);
}

.primary-cta:hover { color: var(--ink); background: var(--butter); transform: translate(-2px,-2px); box-shadow: 10px 10px 0 var(--teal); }

.text-cta {
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
}

.text-cta:hover { color: var(--teal); border-color: var(--teal); }

.hero-stamp {
  position: absolute;
  right: 5vw;
  bottom: 7vh;
  width: 126px;
  height: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--butter);
  background: var(--ink);
  border-radius: 50%;
  transform: rotate(8deg);
  box-shadow: 0 0 0 8px rgba(255,255,255,.35);
}

.hero-stamp span { font-family: var(--display); font-size: 52px; line-height: 1; }
.hero-stamp small { font-size: 8px; line-height: 1.35; letter-spacing: .12em; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
}

.scroll-cue i { width: 52px; height: 1px; background: var(--ink); position: relative; }
.scroll-cue i::before,.scroll-cue i::after{ content: ""; position: absolute; transform-origin: center;  }
.scroll-cue i::before{border-right: 1px solid;height: 6px;right: 0;top: 0;}
.scroll-cue i::after {right: -3px; top: 0px; width: 7px; height: 7px; border-right: 1px solid; border-bottom: 1px solid; transform: rotate(45deg);}

.proof-strip {
  position: relative;
  isolation: isolate;
  contain: paint;
  min-height: 300px;
  overflow: hidden;
  scroll-margin-top: var(--header-h);
  background: #7b8b93 url("../media/ripple-poster.webp") no-repeat center / cover;
}

.proof-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(149, 200, 188, .30), rgba(73, 84, 112, .68));
}

.proof-strip-motion-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .64;
  pointer-events: none;
}

.ripple {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
  padding: clamp(38px, 5vw, 35px) 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 34px);
}

.proof-card {
  min-width: 0;
  min-height: 220px;
  padding: clamp(20px, 2.4vw, 38px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--ink);
  background: #f4ff9d;
  border: 1px solid rgba(22, 62, 59, .16);
  border-radius: 11px;
  box-shadow: 0 16px 42px rgba(14, 46, 44, .14);
  text-align: center;
}

.proof-card h3 {
  margin: 0;
  color: var(--teal);
  font-family: "Kanit", "Noto Sans TC", sans-serif;
  font-size: clamp(80px, 5.2vw, 92px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.055em;
  line-height: .9;
}

.proof-card p {
  margin: 0;
  color: #31544f;
  font-size: clamp(26px, 1.05vw, 18px);
  font-weight: 750;
  line-height: 1.45;
  text-wrap: balance;
}

.rolling-number-display { display: inline-flex; align-items: baseline; white-space: nowrap; }
.rolling-number-value { display: inline-block; min-width: 1ch; background-image: linear-gradient(transparent 72%, rgba(149, 200, 188, .55) 72%); }
.rolling-number-affix { display: inline-block; margin-inline: .08em; font-size: .28em; font-weight: 800; letter-spacing: 0; }
html[lang="en"] .proof-card h3 { font-family: "Oswald", "Kanit", sans-serif; }
html[lang="zh-Hans"] .proof-card h3 { font-family: "Noto Sans SC", sans-serif; font-weight: 900; }
html[lang="zh-Hant"] .proof-card h3 { font-family: "Noto Sans TC", sans-serif; font-weight: 900; }

.works-section {
  padding: 120px max(4vw, 24px) 150px;
  background: var(--paper);
  scroll-margin-top: var(--header-h);
}
.hero-image, .hero-tint {
    width: 100%;
    position: absolute;
    inset: 0;
    height: 100%;
}
.hero-tint {
    z-index: -2;
    background: linear-gradient(180deg, #fff8f047 -10%, #fff8f0db 100%, #fff8f024 70%, #fff8f01f 50%, var(--cream));
    box-shadow: inset 0 -50px 90px #ffff;
}
.section-heading,
.filter-wrap,
.portfolio-grid { width: min(var(--max), 100%); margin-inline: auto; }

.section-heading { margin-bottom: 50px; }

.title-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: 50px; align-items: end; }

.title-row h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(64px, 5vw, 150px);
  line-height: .82;
  letter-spacing: -.065em;
}

.works-note { margin: 0 0 8px; color: var(--muted); font-size: 15px; line-height: 1.75; text-wrap: pretty; }

.filter-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 300;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filters { display: flex; flex-wrap: wrap; gap: 7px; }

.filters button {
  min-height: 42px;
  padding: 0 15px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .08em;
  touch-action: manipulation;
}
html[lang="en"] .filters button{
  letter-spacing:-.03em;
}
.filters button:hover { color: var(--ink); border-color: var(--line); }
.filters button.is-active { color: var(--white); background: var(--ink); border-color: var(--ink); }

.result-count { flex: 0 0 auto; margin: 0; color: var(--muted); font-size: 13px; }
.result-count strong { color: var(--ink); font-family: var(--display); font-size: 22px; }

.portfolio-grid { margin-top: 34px; }
.portfolio-grid::after { content: ""; display: block; clear: both; }

.portfolio-card {
  width: calc(33.333333% - 1px);
  margin: 0 0 30px;
  padding-inline: 11px;
  float: left;
}

.portfolio-card.ai-flow-showcase {
  width: 100%;
}

.ai-flow-shadow-host {
  min-height: 420px;
  overflow: hidden;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.ai-flow-shadow-host.is-mounted { min-height: 0; }
.ai-flow-placeholder { min-height: 420px; display: grid; place-items: center; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .08em; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.workflow-project-detail,
.workflow-shadow-host { width: 100%; min-width: 0; }
.workflow-shadow-host { min-height: 420px; overflow: hidden; background: #fff; }
.workflow-shadow-host.is-mounted { min-height: 0; }
.workflow-placeholder { min-height: 420px; display: grid; place-items: center; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .08em; }

.portfolio-card .work-card,
.portfolio-card .ai-flow-shadow-host {
  opacity: 1;
  transform: scale(1);
  transform-origin: center;
  transition: opacity 750ms linear, transform 750ms linear;
}

.portfolio-card:not(.is-filter-match) .work-card,
.portfolio-card:not(.is-filter-match) .ai-flow-shadow-host {
  opacity: 0;
  transform: scale(.88);
}

.portfolio-grid.is-filtering .portfolio-card { will-change: transform, opacity; }

.work-card {
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  text-align: left;
  background: var(--white);
  border: 1px solid rgba(22,62,59,.1);
  border-radius: 22px;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(14,46,44,.08);
  transform: translateY(0);
  touch-action: manipulation;
}

.work-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.work-card:hover .card-image img { transform: scale(1.035); }
.work-card:hover .card-arrow { color: var(--white); background: var(--coral); transform: rotate(-8deg); }

.card-image {
  position: relative;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  background: var(--mist);
	height: 290px;
	display:block;
}

.card-image img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.card-image.is-loaded img { opacity: 1; }
.card-image img.is-contain { object-fit: contain; padding: 24px; }

.card-loader {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.card-loader i {
  width: 10px;
  height: 10px;
  display: block;
  background: #72c2a1;
  border-radius: 50%;
  animation: card-loader-bounce .7s ease-in-out infinite;
}

.card-loader i:nth-child(2) { animation-delay: -.6s; }
.card-loader i:nth-child(3) { animation-delay: -.5s; }
.card-loader i:nth-child(4) { animation-delay: -.4s; }

.card-image.is-loaded .card-loader {
  opacity: 0;
  visibility: hidden;
}

@keyframes card-loader-bounce {
  0%, 40%, 100% { transform: translateY(0); }
  20% { transform: translateY(-10px); }
}

.card-fallback {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  background: var(--butter);
  font-family: var(--display);
  font-size: 28px;
  text-align: center;
}

.card-number {
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 14px;
  min-width: 44px;
  height: 30px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(14,46,44,.88);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.card-copy { padding: 22px 22px 24px; }
.card-meta { margin: 0 0 9px; color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.card-title-row { display: flex;align-items: center; justify-content: space-between; gap: 18px; padding:0 20px}

.card-title-row h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(23px, 1vw, 32px);
  line-height: 1.2;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.card-arrow {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--mist);
  border-radius: 50%;
  font-size: 18px;
}

.site-footer {
  padding: 34px max(5vw, 28px) max(34px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--white);
  background: var(--ink-2);
  font-size: 13px;
  letter-spacing: .06em;
}

.site-footer strong { color: var(--butter); }
.site-footer a { color: var(--white); text-underline-offset: 5px; }
.site-footer a:hover { color: var(--butter); }

.loading-layer {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--butter);
  background: rgba(14,46,44,.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-layer.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.loading-layer p { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .16em; }

.loader-mark { width: 80px; height: 52px; display: flex; align-items: flex-end; justify-content: center; gap: 7px; }
.loader-mark i { width: 10px; height: 22px; background: var(--butter); border-radius: 7px; animation: loader-wave .78s ease-in-out infinite alternate; }
.loader-mark i:nth-child(2) { height: 42px; animation-delay: .15s; background: var(--coral); }
.loader-mark i:nth-child(3) { height: 30px; animation-delay: .3s; }

@keyframes loader-wave { to { height: 48px; } }

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 3000;
  padding: 18px;
  display: grid;
  place-items: center;
}

.modal-shell[hidden] { display: none; }

.modal-scrim {
  position: absolute;
  inset: 0;
  padding: 0;
  background: rgba(14,46,44,.74);
  border: 0;
  cursor: pointer;
}

.modal-panel {
  position: fixed;
  inset: 18px;
  z-index: 1;
  overflow: hidden;
  background: var(--paper);
  border-radius: 24px;
  box-shadow: 0 40px 120px rgba(0,0,0,.8);
}

.modal-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 66px;
  padding: 0 22px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--white);
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.14);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
}

.modal-toolbar > span {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.close-button {
  min-height: 44px;
  padding: 0 8px 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  cursor: pointer;
}

.close-button:hover { color: var(--ink); background: var(--butter); border-color: var(--butter); }
.close-button i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: 23px; font-style: normal; line-height: 1; }

.project-close-button {
  width: 44px;
  min-width: 44px;
  padding: 6px;
  flex: 0 0 44px;
  justify-content: center;
  border-radius: 50%;
}

.modal-content {
  height: calc(100% - 66px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.about-hero {
  padding: clamp(62px, 8vw, 126px) max(6vw, 36px) 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: clamp(42px, 7vw, 120px);
  color: var(--white);
  background: var(--ink-2);
}

.about-kicker { color: var(--teal-light); }
.about-hero h2 { margin: 0; font-family: var(--display); font-size: clamp(45px, 5vw, 132px); line-height: 1.3;}
.about-hero h2 em { display: block; color: var(--butter); font-style: normal; }
.about-lead { margin: 30px 0 0; max-width: 780px; color: rgba(255,255,255,.78); font-size: clamp(17px, 1.4vw, 22px); line-height: 1.75; }

.profile-card {
  align-self: end;
  padding: 30px;
  color: var(--ink);
  background: var(--butter);
  border-radius: 20px;
}

.profile-card strong { display: block; font-family: var(--display); font-size: 36px; line-height: 1.1; }
.profile-card p { margin: 13px 0 0; }
.profile-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 28px; }
.profile-facts span { padding-top: 10px; border-top: 1px solid rgba(22,62,59,.25); font-size: 12px; }
.profile-facts b { display: block; font-size: 18px; }

.about-body { padding: 90px max(6vw, 36px) 120px; }
.about-section { max-width: 1320px; margin: 0 auto 100px; scroll-margin-top: 86px; }
.about-section:last-child { margin-bottom: 0; }

.about-profile-section {
  max-width: 1500px;
  padding: clamp(34px, 5vw, 76px);
  color: var(--white);
  background: var(--ink-2);
  border-radius: 24px;
}

.about-profile-label {
  width: max-content;
  max-width: 100%;
  margin: 0 0 30px;
  padding: 4px 12px;
  color: var(--butter);
  background: var(--ink);
  border-radius: 999px;
  font-size: 12px!;
  font-weight: 800;
  letter-spacing: .04em;
}

.about-profile-layout {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr);
  align-items: center;
  gap: clamp(42px, 7vw, 110px);
}

.about-profile-figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 22px;
  text-align: center;
}

.about-profile-figure img {
  width: min(250px, 72vw);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid rgba(246, 237, 201, .36);
  border-radius: 50%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .24);
}

.about-profile-figure figcaption { display: grid; gap: 4px; color: rgba(255,255,255,.82); }
.about-profile-figure figcaption strong { color: var(--white); font-size: 20px; }
.about-profile-figure figcaption span { font-size: 15px; }

.about-overview h3 {
  width: 100%;
  margin: 0;
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(38px, 4vw, 68px);
  line-height: 1.18;
  letter-spacing: -.05em;
  text-wrap: balance;
}

.about-overview > p {
  max-width: 1040px;
  margin: 24px 0 30px;
  color: rgba(255,255,255,.78);
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.7;
  text-wrap: pretty;
}

.about-profile-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(255,255,255,.42);
  border-left: 1px solid rgba(255,255,255,.42);
}

.about-profile-facts > div {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid rgba(255,255,255,.42);
  border-bottom: 1px solid rgba(255,255,255,.42);
}

.about-profile-facts dt { color: rgba(255,255,255,.7); font-size: 12px; font-weight: 700; }
.about-profile-facts dd { margin: 4px 0 0; color: var(--butter); font-size: 17px; font-weight: 850; overflow-wrap: anywhere; }
.about-profile-facts a { color: inherit; text-underline-offset: 4px; }

.profile-email-cta {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.about-section-head { display: grid; grid-template-columns: 180px 1fr; gap: 40px; margin-bottom: 36px; align-items: start; }
.section-index,.section-heading .eyebrow { color: var(--coral); font-size: 12px; font-weight: 900; letter-spacing: .15em; }
.about-section h3 { margin: 0; font-family: var(--display); font-size: clamp(42px, 5vw, 40px); line-height: 1.2; letter-spacing: -.045em; }

.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.intro-card { padding: 30px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.intro-card h4 { margin: 0 0 12px; color: var(--ink); font-size: 19px; }
.intro-card p { margin: 0; color: var(--muted); }

.skill-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-cloud span { padding: 11px 15px; color: var(--ink); background: var(--mist); border: 1px solid rgba(45,128,120,.2); border-radius: 10px; font-size: 13px; font-weight: 750; }

.timeline { border-top: 1px solid var(--line); }
.timeline-item { padding: 30px 0; display: grid; grid-template-columns: 180px 1fr; gap: 40px; border-bottom: 1px solid var(--line); }
.timeline-date { color: var(--teal); font-size: 13px; font-weight: 900; letter-spacing: .05em; }
.timeline-item h4 { margin: 0; color: var(--ink); font-family: var(--display); font-size: 26px; line-height: 1.2; }
.timeline-item h4 span { display: block; margin-top: 7px; color: var(--muted); font-family: var(--body); font-size: 13px; font-weight: 600; }
.timeline-item p { margin: 13px 0 0; color: var(--muted); }

.project-hero {
  padding: clamp(60px, 7vw, 110px) max(5vw, 30px) 72px;
  color: var(--white);
  background: var(--ink-2);
}

.project-hero-inner { width: min(1320px, 100%); margin: auto; }
.project-category { margin: 0 0 18px; color: var(--teal-light); font-size: 12px!important; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.project-hero h2 { max-width: 1120px; margin: 0; font-family: var(--display); font-size: clamp(48px, 4vw, 106px); line-height: .92; letter-spacing: -.06em; text-wrap: balance; }
.project-summary { max-width: 900px; margin: 30px 0 0; color: rgba(255,255,255,.74); font-size: clamp(16px, 1.25vw, 20px); line-height: 1.85; text-wrap: pretty; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.project-tags span { padding: 8px 11px; color: var(--butter); border: 1px solid rgba(246,237,201,.26); border-radius: 8px; font-size: 14px; font-weight: 800; letter-spacing: .08em; }

.project-body { width: min(1400px, calc(100% - 60px)); margin: 0 auto; padding: 70px 0 110px; }
.project-section-title { margin: 0 0 28px; display: flex; align-items: baseline; justify-content: space-between; gap: 20px; font-family: var(--display); font-size: clamp(32px, 4vw, 56px); line-height: 1.05; letter-spacing: -.04em; }
.project-section-title small { color: var(--muted); font-family: var(--body); font-size: 11px; letter-spacing: .08em; }

.project-media-grid { column-count: 2; column-gap: 24px; }
.media-card {
  width: 100%;
  height: auto;
  margin: 0 0 24px;
  display: inline-block;
  overflow: hidden;
  break-inside: avoid;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.media-card.is-wide { column-span: all; display: block; }
.media-card.is-centered {
  width: min(100%, 960px);
  margin-right: auto;
  margin-left: auto;
  column-span: all;
  display: block;
}
.media-card a { display: block; text-decoration: none; }
.media-image-link {
  position: relative;
  min-height: 120px;
  overflow: hidden;
  background: var(--mist);
}
.media-image-link img {
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 300ms ease-out;
}
.media-image-link.is-loaded img,
.media-image-link.is-error img { opacity: 1; }
.media-card-loader {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}
.media-card-loader i {
  width: 10px;
  height: 10px;
  display: block;
  background: #72c2a1;
  border-radius: 50%;
  animation: card-loader-bounce .7s ease-in-out infinite;
}
.media-card-loader i:nth-child(2) { animation-delay: -.6s; }
.media-card-loader i:nth-child(3) { animation-delay: -.5s; }
.media-card-loader i:nth-child(4) { animation-delay: -.4s; }
.media-image-link.is-loaded .media-card-loader,
.media-image-link.is-error .media-card-loader {
  opacity: 0;
  visibility: hidden;
}
.media-card img,
.media-card video { width: 100%; height: auto; object-fit: contain; background: #eef1ed; }
.media-card img { width: 100%; height: auto; }
.media-caption { padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 12px; }
.media-caption strong { color: var(--ink); }
.media-embed iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.media-pdf iframe { width: 100%; height: min(78vh, 920px); min-height: 620px; border: 0; background: var(--mist); }

.project-media-grid--html5-canvas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  column-count: initial;
  align-items: start;
}

.project-media-grid--html5-canvas .media-card {
  min-width: 0;
  margin: 0;
  display: block;
}

.project-media-grid--html5-canvas .media-card:nth-child(3) {
  width: 100%;
  grid-column: 1 / -1;
}

.project-media-grid--moffy-shorts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  column-count: initial;
  align-items: start;
}

.project-media-grid--moffy-shorts .media-card {
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.project-media-grid--moffy-shorts .media-embed iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  background: #000;
}

.project-media-grid--cmwl {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(180px, 1fr);
  gap: 24px;
  column-count: initial;
  align-items: stretch;
}

.project-media-grid--cmwl .media-card {
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.project-media-grid--cmwl .media-card video {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  object-fit: contain;
}

.project-media-grid--cmwl .is-cmwl-desktop video { aspect-ratio: 16 / 9; }
.project-media-grid--cmwl .is-cmwl-mobile video { aspect-ratio: 9 / 16; }

.project-links { margin-top: 68px; }
.link-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.project-link { min-height: 64px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font-weight: 750; }
.project-link:hover { color: var(--white); background: var(--teal); border-color: var(--teal); }
.project-link small { color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-link:hover small { color: rgba(255,255,255,.7); }

/* CTA：沿用參考版的雙層逐字輪替與箭頭掃入效果。 */
.cta {
  position: relative;
  overflow: hidden;
  gap: 11px;
  touch-action: manipulation;
  transition-property: color, border-color, box-shadow, background-color;
  transition-duration: 180ms;
  transition-timing-function: ease;
}

.cta-motion-label {
  display: block;
  height: 1.2em;
  overflow: hidden;
  line-height: 1.2;
  white-space: nowrap;
}

.cta-motion-line { display: block; height: 1.2em; white-space: nowrap; }
.cta-motion-letter {
  display: inline-block;
  transform: translateY(0);
  transition: transform 500ms cubic-bezier(.76, 0, .024, 1);
  transition-delay: var(--cta-letter-delay, 0ms);
}

.cta-motion-arrow {
  width: 1.15em;
  height: 1.15em;
  margin: 0;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  font-size: 1.05em;
  font-style: normal;
  line-height: 1;
}

@media (hover: hover) and (pointer: fine) {
  .cta:hover .cta-motion-letter { transform: translateY(-100%); }
  .cta:hover .cta-motion-arrow { animation: cta-arrow-sweep 500ms ease forwards; }
}

.cta:active .cta-motion-letter,
.cta.is-cta-active .cta-motion-letter { transform: translateY(-100%); }
.cta:active .cta-motion-arrow { animation: cta-arrow-sweep 500ms ease forwards; }
.cta.is-cta-active .cta-motion-arrow { animation: cta-arrow-sweep-press 500ms ease forwards; }

.cta:not(.text-cta):is(:hover, :active, .is-cta-active) {
  color: var(--cta-motion-color);
  background: var(--cta-motion-background);
  border-color: var(--cta-motion-border-color);
  box-shadow: var(--cta-motion-shadow);
  transform: none;
}

.cta:focus-visible { box-shadow: 0 0 0 4px rgba(238,115,92,.28); }

@keyframes cta-arrow-sweep {
  49% { transform: translateX(32%); }
  50% { opacity: 0; transform: translateX(-32%); }
  51% { opacity: 1; }
}

@keyframes cta-arrow-sweep-press {
  49% { transform: translateX(32%); }
  50% { opacity: 0; transform: translateX(-32%); }
  51% { opacity: 1; }
}

.no-media { padding: 50px; color: var(--muted); background: var(--mist); border-radius: 16px; text-align: center; }
.no-script { padding: 24px; color: #713b31; background: #fff0eb; }

@media (min-width: 1793px) {
  .portfolio-card { width: calc(25% - 1px); }
}

@media (max-width: 1100px) {
  .hero-content { width: min(720px, 72vw); }
  .hero-stamp { width: 105px; height: 105px; }
  .hero-stamp span { font-size: 42px; }
  .portfolio-card { margin-inline: 0; padding-inline: 8px; }
  .about-hero { grid-template-columns: 1fr; }
  .profile-card { max-width: 620px; }
  .ripple { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --header-h: 68px; }
  .site-header { padding-inline: 14px; gap: 10px; }
  .brand-copy small { display: none; }
  .brand-logo { height: 42px; }
  .brand { gap: 8px; }
  .nav-pill { min-width: 44px; padding: 0 12px; }
  .language-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: var(--white);
    border: 2px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255,255,255,.45);
  }
  .language-toggle img { width: 23px; height: 23px; }
  .language-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 58px;
    min-height: 0;
    padding: 6px 0;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    color: var(--ink);
    background: var(--white);
    border: 1px solid rgba(40,110,84,.16);
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(14,46,44,.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }
  .language-switcher.is-open .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  .language-option {
    width: 100%;
    min-height: 34px;
    padding: 0 11px;
    color: #9f9f9f;
    background: var(--white);
    border-radius: 0;
    font-size: 12px;
    white-space: nowrap;
  }
  .language-option:hover { color: var(--ink); }
  .language-option.is-active { color: var(--ink); background: var(--white); }
  .language-label-desktop { display: none; }
  .language-label-mobile { display: inline; }
  .hero { min-height: 860px; padding: calc(var(--header-h) + 62px) 20px 82px; align-items: flex-start; background-position: 67% center; }
  .hero-veil { background: rgba(247,245,239,.48); }
  .hero-content { width: 100%; }
  .hero h1 { font-size: clamp(47px, 13vw, 76px); line-height: .98; }
  .hero-intro { max-width: 90%; font-size: 15px; }
  .hero-cta-row { align-items: flex-start; flex-direction: column; gap: 21px; }
  .hero-stamp { right: 20px; bottom: 72px; width: 92px; height: 92px; }
  .hero-stamp span { font-size: 35px; }
  .scroll-cue { left: 20px; bottom: 27px; }
  .ripple { width: calc(100% - 28px); grid-template-columns: 1fr; gap: 14px; padding-block: 30px; }
  .proof-card { min-height: 190px; }
  .works-section { padding: 82px 14px 100px; }
  .title-row { grid-template-columns: 1fr; gap: 24px; }
  .title-row h2 { font-size:clamp(53px, 10vw, 110px); }
  .filter-wrap { align-items: flex-start; flex-direction: column; gap: 8px; padding-block: 10px; }
  .filters {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 8px 4px 0;
    scroll-padding-inline: 8px;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: 0 0 auto; }
  .portfolio-grid { margin-top: 24px; }
  .portfolio-card { width: calc(50% - 1px); margin: 0 0 12px; padding-inline: 4px; }
  .card-image { height: auto; aspect-ratio: 5 / 3; }
  .card-number { top: 8px; left: 8px; min-width: 34px; height: 24px; padding-inline: 8px; font-size: 8px; }
  .card-copy { padding: 12px 10px 14px; }
  .card-meta {margin-bottom: 8px;font-size: 10px;width: 100%;line-height: 1;padding: 0 10px;display: block;}
  .card-title-row { gap: 8px; padding: 0 10px; }
  .card-title-row h3 { font-size: clamp(16px, 3vw, 19px); line-height: 1.22; }
  .card-arrow { flex-basis: 32px; width: 32px; height: 32px; font-size: 14px; }
  .site-footer { align-items: flex-start; flex-direction: column; padding-inline: 24px; }
  .modal-shell { padding: 0; }
  .modal-panel { inset: 0; border: 0; border-radius: 0; }
  .modal-toolbar { height: 62px; padding-inline: 14px 10px; }
  .modal-content { height: calc(100% - 62px); }
  .about-hero { padding: 62px 20px 58px; }
  .about-body { padding: 62px 20px 88px; }
  .about-section { margin-bottom: 74px; }
  .about-profile-section { padding: 28px 20px 34px; border-radius: 18px; }
  .about-profile-label { width: auto; }
  .about-profile-layout { gap: 38px; }
  .about-overview h3 { font-size: clamp(35px, 6vw, 50px); }
  .about-profile-facts { grid-template-columns: 1fr; }
  .about-section-head,
  .timeline-item { grid-template-columns: 1fr; gap: 11px; }
  .intro-grid { grid-template-columns: 1fr; }
  .profile-card { padding: 24px; }
  .project-hero { padding: 54px 20px 52px; }
  .project-body { width: calc(100% - 28px); padding: 50px 0 80px; }
  .project-media-grid { column-count: 1; }
  .project-media-grid--html5-canvas { display: grid; grid-template-columns: 1fr; }
  .project-media-grid--html5-canvas .media-card { width: 100%; }
  .project-media-grid--html5-canvas .media-card:nth-child(3) { grid-column: 1; }
  .project-media-grid--moffy-shorts { display: grid; grid-template-columns: 1fr; gap: 24px; }
  .project-media-grid--cmwl { display: grid; grid-template-columns: 1fr; }
  .project-media-grid--cmwl .media-card video { height: auto; flex: none; }
  .project-media-grid--cmwl .is-cmwl-desktop video { aspect-ratio: 16 / 9; }
  .project-media-grid--cmwl .is-cmwl-mobile video { aspect-ratio: 9 / 16; }
  .link-list { grid-template-columns: 1fr; }
  .media-card.is-wide { column-span: none; }
  .media-card img { min-height: 0; }
  .media-pdf iframe { height: 72vh; min-height: 520px; }
  .project-section-title { align-items: flex-start; flex-direction: column; }
  .close-button span { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 410px) {
  .brand-copy { display: none; }
  .brand-logo { height: 66px; }
  .nav-pill { min-width: 42px; padding-inline: 10px; }
  .language-option { padding-inline: 6px; }
  .hero h1 { font-size: 45px; }
}

@media (hover: none) {
  .work-card:hover,
  .primary-cta:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-loader,
  html.loader-ready .site-loader,
  .site-loader__name-fill { transition: none; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .cta:hover .cta-motion-letter,
  .cta:active .cta-motion-letter,
  .cta.is-cta-active .cta-motion-letter { transform: none; }
  .cta-motion-arrow { animation: none !important; }
}

@media print {
  .site-header,
  .site-loader,
  .loading-layer,
  .modal-scrim,
  .close-button { display: none !important; }
  body { background: #fff; }
}

.site-header,
.nav-pill,
.language-toggle,
.language-option,
.primary-cta,
.text-cta,
.work-card,
.card-image img,
.card-arrow,
.filters button,
.loading-layer,
.close-button,
.project-link { transition-property: color, background-color, border-color, box-shadow, transform, opacity, visibility; transition-duration: 240ms; transition-timing-function: cubic-bezier(.2,.75,.2,1); }

.card-image img { transition-duration: 300ms; }

/* Keep portfolio copy fully opaque while retaining AOS' movement transform. */
.card-copy[data-aos^="fade"][data-aos^="fade"],
.card-copy[data-aos^="fade"][data-aos^="fade"].aos-animate,
.portfolio-card.is-filter-match .card-copy[data-aos^="fade"][data-aos^="fade"] {
  opacity: 1 !important;
}
