/* Allen Works — 主樣式 */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #1a2333;
  --ink-2: #5a6577;
  --accent: #1d4e89;      /* 普魯士藍 */
  --accent-soft: #e8eef6;
  --line: #e4e8ee;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(26, 35, 51, .06), 0 8px 24px rgba(26, 35, 51, .07);
  --shadow-lg: 0 4px 8px rgba(26, 35, 51, .08), 0 16px 40px rgba(26, 35, 51, .14);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151d;
    --surface: #1a212c;
    --ink: #e8ecf2;
    --ink-2: #97a1b1;
    --accent: #6ea8dc;
    --accent-soft: #223349;
    --line: #2a3342;
    --shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .5);
  }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── 頁首 ── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px clamp(20px, 6vw, 72px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 900; letter-spacing: .18em; font-size: 17px; }
.logo span { color: var(--accent); margin-left: .3em; }
.site-header nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.site-header nav a {
  font-size: 15px; font-weight: 500; color: var(--ink-2);
  padding: 4px 2px; border-bottom: 2px solid transparent; transition: .2s;
}
.site-header nav a:hover { color: var(--accent); border-color: var(--accent); }

/* ── Hero ── */
.hero { position: relative; text-align: center; padding: clamp(64px, 12vh, 130px) 24px 56px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 620px 340px at 50% 36%, color-mix(in srgb, var(--accent) 17%, var(--bg)) 0%, transparent 70%);
}
.eyebrow {
  display: inline-block; font-size: 14px; font-weight: 500; letter-spacing: .3em;
  color: var(--accent); background: var(--accent-soft);
  padding: 6px 18px 6px 22px; border-radius: 99px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(40px, 7vw, 64px); font-weight: 900; letter-spacing: .06em; }
.hero h1 .en {
  display: block; font-size: clamp(15px, 2vw, 18px); font-weight: 500;
  letter-spacing: .45em; color: var(--ink-2); margin-top: 6px; text-transform: uppercase;
}
.hero .intro { margin: 26px auto 0; max-width: 560px; color: var(--ink-2); font-size: 17px; }
.hero-cta { display: flex; justify-content: center; gap: 14px; margin-top: 34px; }
.btn-primary, .btn-ghost {
  font-size: 15.5px; font-weight: 700; border-radius: 99px;
  padding: 11px 34px; transition: .2s; border: 2px solid var(--accent);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.stats { display: flex; justify-content: center; margin-top: 52px; }
.stats > div { padding: 2px clamp(28px, 5vw, 64px); }
.stats > div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-size: clamp(30px, 4.5vw, 42px); font-weight: 900; color: var(--ink); line-height: 1.2; }
.stats b i { font-style: normal; font-size: .45em; margin-left: 2px; color: var(--accent); }
.stats span { display: block; font-size: 13px; letter-spacing: .12em; color: var(--ink-2); margin-bottom: 6px; }

/* ── 區塊標題 ── */
section { padding: 0 clamp(20px, 6vw, 72px); max-width: 1280px; margin: 0 auto; }
h2 { font-size: clamp(26px, 3.5vw, 34px); font-weight: 900; margin: 72px 0 8px; letter-spacing: .04em; }
h2::after {
  content: ""; display: block; width: 48px; height: 4px;
  background: var(--accent); border-radius: 2px; margin-top: 10px;
}

/* ── 作品卡片 ── */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px; margin-top: 34px;
}
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--accent-soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 19px; font-weight: 700; }
.card-body p { font-size: 14px; color: var(--ink-2); line-height: 1.7; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; font-weight: 500; color: var(--accent);
  background: var(--accent-soft); border-radius: 99px; padding: 2px 12px;
}

/* ── 其他作品 ── */
.other-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px; margin-top: 34px;
}
.other {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; transition: .2s;
}
.other:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.other strong { font-size: 15.5px; font-weight: 700; }
.other .industry { font-size: 13px; color: var(--ink-2); margin-left: 10px; }
.other-tags { font-size: 12px; color: var(--accent); }

/* ── 作品詳細頁 ── */
.work-page { max-width: 880px; margin: 0 auto; padding: 48px clamp(20px, 5vw, 40px) 40px; }
.back { font-size: 14px; color: var(--ink-2); transition: .2s; }
.back:hover { color: var(--accent); }
.work-page h1 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 900; margin: 18px 0 10px; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.meta .date { font-size: 14px; color: var(--ink-2); margin-right: 6px; }
.cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 36px; }
.work-content { font-size: 16.5px; }
.work-content p { margin: 0 0 1.2em; }
.work-content ol, .work-content ul { margin: 0 0 1.2em 1.5em; }
.work-content img { border-radius: 10px; box-shadow: var(--shadow); margin: 10px 0 26px; }
.work-content a { color: var(--accent); font-weight: 500; border-bottom: 1px solid; }

/* ── 頁尾 ── */
.site-footer {
  margin-top: 96px; padding: 34px 24px; text-align: center;
  font-size: 13.5px; color: var(--ink-2); border-top: 1px solid var(--line);
}

.site-header nav a { white-space: nowrap; }
@media (max-width: 560px) {
  .site-header { padding: 12px 16px; }
  .logo { font-size: 14px; letter-spacing: .12em; }
  .site-header nav { gap: 12px; }
  .site-header nav a { font-size: 13px; }
  .stats { gap: 28px; }
}

/* ── 作品列表頁 ── */
.page-top h2 { margin-top: 48px; }
.section-note { color: var(--ink-2); font-size: 15px; margin-top: 14px; }
.more-wrap { text-align: center; margin-top: 40px; }
.more-btn {
  display: inline-block; font-size: 15.5px; font-weight: 700;
  color: var(--accent); border: 2px solid var(--accent); border-radius: 99px;
  padding: 10px 32px; transition: .2s;
}
.more-btn:hover { background: var(--accent); color: #fff; }

/* ── 個人介紹頁 ── */
.about-page h2 { font-size: 22px; margin: 40px 0 8px; }
.about-page h2::after { width: 36px; height: 3px; }
.about-page ul { margin: 12px 0 0 1.4em; }

/* ── 個人能力卡片 ── */
.abilities {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px; margin-top: 28px;
}
.ability {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px 24px; text-align: center;
}
.ability img { width: 132px; height: 132px; object-fit: contain; margin: 0 auto 14px; }
.ability h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.ability p { font-size: 14px; color: var(--ink-2); text-align: left; }

/* ── 作品分類篩選 ── */
.filter { display: flex; gap: 10px; margin-top: 26px; }
.filter button {
  font-family: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
  border-radius: 99px; padding: 7px 22px; transition: .2s;
}
.filter button:hover { color: var(--accent); border-color: var(--accent); }
.filter button.on { color: #fff; background: var(--accent); border-color: var(--accent); }

/* ── 打字機游標 ── */
.eyebrow { min-width: 240px; }
.caret {
  display: inline-block; width: 2px; height: 1.05em; background: var(--accent);
  margin-left: 4px; vertical-align: -0.15em; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Hero 浮出作品圖 ── */
.hero-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-art img {
  position: absolute; width: clamp(170px, 15vw, 250px);
  border-radius: 12px; box-shadow: var(--shadow-lg); opacity: .45;
}
.hero-art .a1 { left: 4%;  top: 16%; --r: -8deg; --tx: -220px; --ty: -50px; transform: rotate(var(--r)); }
.hero-art .a2 { left: 9%;  top: 58%; --r: 5deg; --tx: -200px; --ty: 70px; transform: rotate(var(--r)); }
.hero-art .a3 { right: 4%; top: 20%; --r: 7deg; --tx: 220px; --ty: -50px; transform: rotate(var(--r)); }
.hero-art .a4 { right: 8%; top: 60%; --r: -5deg; --tx: 200px; --ty: 70px; transform: rotate(var(--r)); }
@media (max-width: 980px) { .hero-art { display: none; } }

/* ── 捲動漸入 ── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.card.reveal.in { transition: transform .25s, box-shadow .25s; }

/* ── Hero 進場動畫 ── */
@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow, .hero h1, .hero .intro, .hero-cta, .stats {
    opacity: 0; animation: rise .7s cubic-bezier(.22,.9,.35,1) forwards;
  }
  .hero .eyebrow { animation-delay: .1s; }
  .hero h1      { animation-delay: .22s; }
  .hero .intro  { animation-delay: .38s; }
  .hero-cta     { animation-delay: .52s; }
  .stats        { animation-delay: .66s; }
  .hero-art img { opacity: 0; animation: art-in 1.1s cubic-bezier(.22,.9,.35,1) forwards; }
  .hero-art .a1 { animation-delay: .85s; }
  .hero-art .a3 { animation-delay: 1.0s; }
  .hero-art .a2 { animation-delay: 1.15s; }
  .hero-art .a4 { animation-delay: 1.3s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes art-in {
  from { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(.9); }
  to   { opacity: .45; transform: translate(0, 0) rotate(var(--r)); }
}

/* ── 合作洽詢 ── */
.nav-contact { color: var(--accent) !important; font-weight: 700; }
.contact-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px; margin-top: 34px; max-width: 760px;
}
.contact-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; transition: .2s;
}
.contact-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.cc-label { font-size: 12px; letter-spacing: .2em; color: var(--ink-2); }
.contact-card b { font-size: 17px; font-weight: 700; color: var(--accent); word-break: break-all; }

/* ── 作品頁合作引導 ── */
.work-cta {
  margin-top: 56px; padding: 36px 24px; text-align: center;
  background: var(--accent-soft); border-radius: var(--radius);
}
.work-cta p { font-size: 18px; font-weight: 700; margin-bottom: 18px; }
.work-cta .hero-cta { margin-top: 0; opacity: 1; animation: none; }

/* ── 頁尾連結 ── */
.footer-links { margin-bottom: 6px; }
.footer-links a { color: var(--accent); font-weight: 500; }

/* ── LINE 聯絡卡片 ── */
.contact-cards { max-width: 1080px; }
.contact-line { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.contact-line > div { display: flex; flex-direction: column; gap: 4px; }
.cc-qr { width: 84px; height: 84px; border-radius: 8px; background: #fff; padding: 4px; box-sizing: border-box; }

/* ── Hero 持續動態 ── */
@media (prefers-reduced-motion: no-preference) {
  /* 光暈呼吸 */
  .hero::before { animation: glow-breathe 6.5s ease-in-out infinite alternate; }
  /* 作品圖漂浮：進場動畫結束後接手，各自不同週期 */
  .hero-art .a1 { animation: art-in 1.1s cubic-bezier(.22,.9,.35,1) .85s forwards, art-float 5.6s ease-in-out 2.2s infinite alternate; }
  .hero-art .a2 { animation: art-in 1.1s cubic-bezier(.22,.9,.35,1) 1.15s forwards, art-float 6.8s ease-in-out 2.5s infinite alternate; }
  .hero-art .a3 { animation: art-in 1.1s cubic-bezier(.22,.9,.35,1) 1.0s forwards, art-float 6.2s ease-in-out 2.35s infinite alternate; }
  .hero-art .a4 { animation: art-in 1.1s cubic-bezier(.22,.9,.35,1) 1.3s forwards, art-float 7.4s ease-in-out 2.65s infinite alternate; }
}
@keyframes glow-breathe {
  from { opacity: .3;  transform: translateY(0)    scale(1); }
  to   { opacity: 1;   transform: translateY(14px) scale(1.12); }
}
@keyframes art-float {
  from { transform: translateY(0)     rotate(var(--r)); }
  to   { transform: translateY(-16px) rotate(calc(var(--r) + 1.6deg)); }
}

/* ── Slogan 主標（字數較多，級距略縮） ── */
.hero h1.slogan { font-size: clamp(30px, 4.6vw, 54px); letter-spacing: .08em; }

/* ── 作品圖：連續長圖的切片（緊貼、無圓角，陰影只套在整組外圍） ── */
.work-content .img-strip {
  margin: 10px 0 26px; box-shadow: var(--shadow); font-size: 0; line-height: 0;
  border-radius: var(--radius); overflow: hidden;   /* 圓角套在整組外圍，內部接縫仍緊貼 */
}
.work-content .img-strip img {
  display: block; width: 100%; margin: 0; border-radius: 0; box-shadow: none;
  vertical-align: top;
}
/* ── 作品圖：各自獨立的作品（維持卡片感） ── */
.work-content .img-list img { border-radius: 10px; box-shadow: var(--shadow); margin: 10px 0 26px; }
