:root {
  --bg: #050606;
  --bg-soft: #0b0c0c;
  --panel: #111314;
  --line: #34322a;
  --line-soft: rgba(224, 197, 105, 0.18);
  --gold: #d9b45f;
  --gold-bright: #e8cd8b;
  --gold-dark: #8a681f;
  --gold-metal: linear-gradient(112deg, #8a681f 0%, #d9b45f 18%, #fbeec0 38%, #c9a049 56%, #8f6c22 74%, #e6cd8b 100%);
  --text: #f4f1e8;
  --muted: #aaa79d;
  --serif: "Noto Serif TC", serif;
  --sans: "Manrope", "Noto Sans TC", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, monospace;
  --container: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 280px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }

.container {
  width: min(var(--container), calc(100% - 96px));
  margin-inline: auto;
}

.site-shell,
.detail-shell {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 5%, rgba(224, 197, 105, 0.07), transparent 25rem),
    var(--bg);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 790px;
  padding-top: 72px;
  background:
    radial-gradient(ellipse 54% 58% at 83% 42%, rgba(217, 180, 95, .085), transparent 67%),
    radial-gradient(ellipse 32% 42% at 58% 72%, rgba(138, 104, 31, .045), transparent 72%),
    linear-gradient(180deg, #090908 0%, #060707 56%, #050606 100%);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6,7,7,.98) 0%, rgba(6,7,7,.92) 28%, rgba(6,7,7,.34) 48%, transparent 69%),
    radial-gradient(120% 62% at 50% 116%, #050606 4%, transparent 58%),
    repeating-linear-gradient(116deg, transparent 0 12px, rgba(255,255,255,.006) 13px, transparent 14px 29px);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 -110px 90px -70px #050606;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(760px, 66%);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1,
.detail-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: 0.02em;
}

.hero h1 { font-size: clamp(3rem, 6.4vw, 5.12rem); line-height: 1.08; letter-spacing: -.01em; }
.hero-title__gold {
  color: var(--gold-bright);
  background: var(--gold-metal);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-title__ring { color: #f2eee4; }

.hero__description {
  margin: 24px 0 0;
  color: #b9b5ad;
  font-size: 1.094rem;
  line-height: 1.75;
}

.hero__constellation {
  position: absolute;
  z-index: 0;
  inset: 0 -4% 18px -3%;
  width: 107%;
  height: calc(100% - 18px);
  overflow: visible;
  pointer-events: none;
  opacity: .76;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.08) 0%, #000 36%, #000 100%);
}
.constellation { fill: url(#node-core); stroke: rgba(217,180,95,.28); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.constellation path { fill: none; vector-effect: non-scaling-stroke; }
.constellation--faint { opacity: .3; }
.constellation--primary { opacity: .9; }
.constellation--right { opacity: .58; }
.node-glow { fill: rgba(217,180,95,.22); stroke: none; filter: url(#node-glow); }
.constellation__micro-stars { fill: #f4e7bc; opacity: .82; }
.constellation__micro-stars circle:nth-child(3n + 1) { animation: constellation-pulse 3.8s ease-in-out infinite alternate; }
.constellation__micro-stars circle:nth-child(3n + 2) { animation: constellation-pulse 5.2s 1.1s ease-in-out infinite alternate; }
.constellation__label { fill: rgba(217,180,95,.56); font: 500 10px/1 var(--sans); letter-spacing: .03em; }

@keyframes constellation-pulse {
  from { opacity: .28; }
  to { opacity: 1; }
}

.source-selector { position: relative; z-index: 2; width: min(720px, 76%); margin: 302px auto 0; }
.source-selector__buttons { display: grid; grid-template-columns: 1fr 1fr; box-shadow: inset 0 0 0 1px rgba(217, 180, 95, .42); }
.source-tab { min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 24px; border: 0; color: #f0eee7; background: transparent; cursor: pointer; }
.source-tab.is-active { color: #14100a; background: var(--gold-metal); background-size: 200% 100%; }
.source-tab__number { font: 400 1.65rem/1 var(--serif); }
.source-tab strong { display: block; font-size: 1.05rem; line-height: 1.2; }
.source-tab small { display: block; margin-top: 8px; font: 500 .625rem/1.6 var(--mono); letter-spacing: .18em; opacity: .58; }

.gallery { padding-block: 58px 116px; }
.filter-title { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: var(--gold); font: 600 1.125rem/1.4 var(--sans); }
.filter-title__icon { width: 23px; height: 23px; flex: 0 0 23px; overflow: visible; fill: none; stroke: var(--gold); stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.gallery-meta { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 30px 0 24px; }
.result-summary { margin: 0; color: #f1eee7; font-size: .92rem; font-weight: 600; }

.filters { display: flex; flex-wrap: wrap; gap: 20px; margin: 12px 0 0; }
.filter-chip {
  border: 1px solid rgba(217, 180, 95, .66);
  border-radius: 11px;
  min-height: 50px;
  padding: 10px 22px;
  color: var(--gold);
  background: #080705;
  box-shadow: inset 0 0 0 1px rgba(217, 180, 95, .05);
  cursor: pointer;
  font-size: .906rem;
  transition: 180ms ease;
}
.filter-chip:hover { color: var(--gold-bright); border-color: var(--gold-bright); box-shadow: inset 0 0 18px rgba(217,180,95,.08); }
.filter-chip.is-active { color: #14100a; border-color: transparent; background: var(--gold-metal); background-size: 200% 100%; box-shadow: none; }

.work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
.work-card { min-width: 0; overflow: hidden; border: 1px solid rgba(217, 180, 95, .5); border-radius: 10px; background: #100e0c; box-shadow: inset 0 0 0 1px rgba(244,241,234,.025); transition: 200ms ease; }
.work-card:hover { transform: translateY(-4px); border-color: var(--gold-bright); box-shadow: 0 18px 50px rgba(0,0,0,.35), inset 0 0 24px rgba(217,180,95,.05); }
.work-card__link { display: flex; min-height: 100%; flex-direction: column; color: inherit; text-decoration: none; }
.work-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid rgba(217,180,95,.36); background: #343a43; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.work-card:hover img { transform: scale(1.025); }
.work-card__body { display: flex; flex: 1; flex-direction: column; align-items: stretch; padding: 18px; }
.work-card h3 { margin: 0 0 18px; color: var(--gold-bright); font: 700 1.25rem/1.42 var(--serif); }
.work-card__cta { display: block; width: 100%; margin-top: auto; border-radius: 7px; padding: 11px 13px; text-align: center; color: #14100a; background: var(--gold-metal); background-size: 200% 100%; font-size: .906rem; font-weight: 700; letter-spacing: .02em; transition: background-position 280ms ease; }
.work-card:hover .work-card__cta { background-position: 100% 0; }

.category-pill { position: absolute; z-index: 2; top: 8px; left: 10px; display: inline-block; border-radius: 999px; padding: 5px 12px; font-size: .75rem; font-weight: 600; }
.category-pill--violet { color: #d8c5ff; background: #4a3671; }
.category-pill--rose { color: #ffd5e0; background: #71384d; }
.category-pill--mint { color: #c4f3e5; background: #27594d; }
.category-pill--amber { color: #ffecbc; background: #66512b; }
.category-pill--sky { color: #cce9ff; background: #2a526c; }
.category-pill--coral { color: #ffdbca; background: #734536; }

.work-card__placeholder { position: relative; width: 100%; height: 100%; overflow: hidden; background: #343a43; }
.work-card__placeholder::before { content: ""; position: absolute; inset: 14px 10px; opacity: .75; background: repeating-linear-gradient(180deg, transparent 0 7px, rgba(177,205,224,.45) 8px, transparent 9px 14px); clip-path: polygon(0 0, 88% 0, 88% 6%, 63% 6%, 63% 12%, 96% 12%, 96% 19%, 75% 19%, 75% 27%, 100% 27%, 100% 34%, 54% 34%, 54% 42%, 91% 42%, 91% 50%, 68% 50%, 68% 58%, 97% 58%, 97% 66%, 58% 66%, 58% 74%, 92% 74%, 92% 82%, 72% 82%, 72% 90%, 44% 90%, 44% 100%, 0 100%); }
.work-card__placeholder span { position: absolute; left: 7%; z-index: 1; height: 2px; background: #d27ec8; opacity: .8; }
.work-card__placeholder span:nth-child(1) { top: 28%; width: 35%; }
.work-card__placeholder span:nth-child(2) { top: 55%; width: 52%; background: #7bd8a8; }
.work-card__placeholder span:nth-child(3) { top: 72%; width: 42%; background: #efc562; }
.work-card__placeholder i { display: none; }
.work-card__placeholder--violet,
.work-card__placeholder--rose,
.work-card__placeholder--mint,
.work-card__placeholder--amber,
.work-card__placeholder--sky,
.work-card__placeholder--coral { background-color: #343a43; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 56px; }
.pagination:empty { display: none; }
.pagination button { display: grid; min-width: 38px; height: 38px; place-items: center; border: 1px solid rgba(217,180,95,.42); border-radius: 6px; color: #99958d; background: #080705; cursor: pointer; }
.pagination button:hover:not(:disabled) { color: var(--gold-bright); border-color: var(--gold-bright); }
.pagination button.is-active { border-color: transparent; color: #14100a; background: var(--gold-metal); background-size: 200% 100%; font-weight: 700; }
.pagination button:disabled { opacity: .3; cursor: default; }

.site-footer { border-top: 1px solid var(--line-soft); color: #66655f; font-size: .74rem; }
.site-footer__inner { display: flex; justify-content: space-between; padding-block: 28px; }
.site-footer p { margin: 0; }

.detail-page { padding: 42px 0 54px; background: #000; }
.detail-container { width: min(1184px, calc(100% - 96px)); margin-inline: auto; }
.back-link { display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgba(217,180,95,.68); border-radius: 5px; padding: 10px 16px; color: var(--gold-bright); background: #080705; text-decoration: none; font-size: .906rem; font-weight: 600; letter-spacing: .02em; transition: 180ms ease; }
.back-link:hover { color: #14100a; border-color: transparent; background: var(--gold-metal); background-size: 200% 100%; }
.detail-heading { padding: 34px 0 26px; }
.detail-header h1 { margin: 0; color: var(--gold-bright); font: 700 clamp(2rem, 4vw, 3.375rem)/1.2 var(--serif); letter-spacing: .01em; }
.detail-artwork { position: relative; overflow: hidden; border: 1px solid rgba(217,180,95,.36); border-radius: 4px; background: #ede8df; }
.detail-artwork > img { width: 100%; aspect-ratio: 1.92 / 1; object-fit: cover; }
.detail-artwork__placeholder { display: grid; min-height: 610px; place-items: center; padding: 7%; background: radial-gradient(circle at 18% 35%, rgba(217,180,95,.2), transparent 24%), linear-gradient(135deg, #eee9df 0 48%, #ddd6ca 48% 100%); }
.mock-browser { width: min(850px, 100%); border: 1px solid rgba(0,0,0,.17); border-radius: 5px; background: #f7f5ef; box-shadow: 0 28px 72px rgba(0,0,0,.24); }
.mock-browser__bar { display: flex; gap: 6px; padding: 11px; border-bottom: 1px solid #ddd7c9; }
.mock-browser__bar i { width: 8px; height: 8px; border-radius: 50%; background: #bdb5a3; }
.mock-browser__content { min-height: 350px; display: grid; align-content: center; justify-items: center; gap: 18px; padding: 10%; color: #191a1a; background: linear-gradient(135deg, #eeebe2 50%, #ded7c8 50%); }
.mock-browser__content strong { max-width: 16ch; text-align: center; font: 700 clamp(1.5rem, 4vw, 3.1rem)/1.35 var(--serif); }
.mock-browser__content span { width: 34%; height: 7px; border-radius: 9px; background: rgba(0,0,0,.16); }
.mock-browser__content span:last-child { width: 22%; height: 34px; background: var(--gold-metal); }
.detail-artwork__tag { position: absolute; top: 18px; left: 18px; border-radius: 999px; padding: 6px 14px; font-size: .8rem; font-weight: 600; }
.artwork-link { position: absolute; right: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; padding: 10px 14px; color: #f4f1ea; background: rgba(10,13,19,.78); text-decoration: none; font-size: .8rem; backdrop-filter: blur(6px); }
.project-panel { margin-top: 14px; border: 1px solid rgba(244,241,234,.06); border-radius: 4px; padding: 26px 28px 28px; background: #11110f; box-shadow: inset 0 0 0 1px rgba(217,180,95,.025); }
.project-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 0 0 24px; }
.project-facts div { min-width: 0; }
.project-facts dt,
.project-panel h2,
.related-panel h2 { margin: 0 0 6px; color: var(--gold); font-size: .94rem; font-weight: 600; }
.project-facts dt,
.project-panel h2 { display: flex; align-items: center; gap: 8px; }
.section-title-icon { width: 16px; height: 16px; flex: 0 0 16px; overflow: visible; fill: none; stroke: var(--gold-bright); stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(217,180,95,.22)); }
.project-facts dd { margin: 0; color: #e2ded6; font-size: .9375rem; line-height: 1.75; }
.project-description { margin-top: 8px; }
.project-description p { margin: 0; color: #b8b4ab; font-size: .9375rem; line-height: 1.85; }
.project-description mark { border-bottom: 1px solid rgba(232,205,139,.55); padding: 0 .08em; color: var(--gold-bright); background: linear-gradient(180deg, transparent 58%, rgba(217,180,95,.16) 58%); font-weight: 600; }
.project-link { margin-top: 22px; }
.project-link > a { color: #c9c4b9; font-size: .906rem; overflow-wrap: anywhere; }
.project-link a:hover { color: var(--gold-bright); }
.related-panel { margin-top: 18px; border: 1px solid rgba(244,241,234,.06); border-radius: 4px; padding: 22px 26px 26px; background: #11110f; }
.related-panel__heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.related-panel__heading h2 { margin: 0; }
.related-panel__heading > a { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(217,180,95,.58); border-radius: 50%; color: var(--gold); text-decoration: none; }
.related-panel__heading > a:hover { color: #14100a; background: var(--gold-metal); }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.related-card { min-width: 0; overflow: hidden; border: 1px solid rgba(217,180,95,.2); border-radius: 4px; color: inherit; background: #171815; text-decoration: none; }
.related-card:hover { border-color: rgba(217,180,95,.65); }
.related-card__media { position: relative; aspect-ratio: 16 / 8.5; overflow: hidden; background: #343a43; }
.related-card__media img { width: 100%; height: 100%; object-fit: cover; }
.related-card__placeholder { position: relative; width: 100%; height: 100%; background: #343a43; }
.related-card__placeholder::before { content: ""; position: absolute; inset: 14px; background: repeating-linear-gradient(180deg, transparent 0 8px, rgba(177,205,224,.42) 9px, transparent 10px 16px); }
.related-card__placeholder span { position: absolute; left: 8%; z-index: 1; width: 36%; height: 2px; background: var(--gold); }
.related-card__placeholder span:nth-child(1) { top: 32%; }
.related-card__placeholder span:nth-child(2) { top: 52%; width: 55%; background: #79c9a6; }
.related-card__placeholder span:nth-child(3) { top: 70%; width: 44%; background: #c586c0; }
.related-card__tag { position: absolute; top: 10px; left: 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 5px 11px; font-size: .72rem; font-weight: 700; line-height: 1.15; letter-spacing: .015em; box-shadow: 0 3px 12px rgba(0,0,0,.38); backdrop-filter: blur(5px); }
.related-card__tag.category-pill--violet { color: #eee5ff; background: rgba(74,54,113,.96); }
.related-card__tag.category-pill--rose { color: #ffe8ee; background: rgba(113,56,77,.96); }
.related-card__tag.category-pill--mint { color: #e1fff6; background: rgba(39,89,77,.96); }
.related-card__tag.category-pill--amber { color: #fff3d2; background: rgba(102,81,43,.96); }
.related-card__tag.category-pill--sky { color: #e5f5ff; background: rgba(42,82,108,.96); }
.related-card__tag.category-pill--coral { color: #ffede4; background: rgba(115,69,54,.96); }
.related-card h3 { margin: 0; padding: 13px 14px 15px; color: #d8d4ca; font: 600 1rem/1.45 var(--serif); }
.detail-loading { padding: 80px 5%; color: var(--muted); }
.data-error { grid-column: 1 / -1; margin: 0; border: 1px solid #6d3a3a; padding: 22px; color: #ffc6c6; background: #251414; }
.data-error--page { width: min(720px, calc(100% - 40px)); margin: 80px auto; }

@media (max-width: 900px) {
  .container { width: min(100% - 48px, var(--container)); }
  .hero { min-height: 740px; }
  .hero__content { width: 72%; }
  .source-selector { width: 86%; margin-top: 280px; }
  .filters { gap: 12px; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-container { width: min(100% - 48px, 1184px); }
  .detail-artwork__placeholder { min-height: 440px; }
}

@media (min-width: 901px) and (max-width: 1120px) {
  .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .container { width: min(100% - 32px, var(--container)); }
  .desktop-only { display: none; }
  .hero { min-height: auto; padding-top: 58px; }
  .hero__content { width: 100%; }
  .hero h1 { font-size: clamp(2.15rem, 9vw, 2.4rem); line-height: 1.08; }
  .hero__description { font-size: .9375rem; line-height: 1.75; }
  .hero__constellation { inset: 34% -25% 18% 8%; opacity: .32; }
  .source-selector { width: 100%; margin-top: 180px; padding-bottom: 44px; }
  .source-tab { min-height: 72px; gap: 10px; padding: 8px; }
  .source-tab__number { font-size: 1.25rem; }
  .source-tab strong { font-size: .875rem; }
  .source-tab small { font-size: .5rem; letter-spacing: .1em; }
  .gallery { padding-block: 52px 84px; }
  .filters { margin-bottom: 0; gap: 10px; }
  .filter-chip { min-height: 42px; padding: 7px 13px; font-size: .8125rem; }
  .gallery-meta { align-items: flex-end; margin-top: 28px; }
  .work-grid { grid-template-columns: 1fr; }
  .site-footer__inner { align-items: flex-start; flex-direction: column; gap: 5px; }
  .detail-page { padding: 24px 0 38px; }
  .detail-container { width: min(100% - 28px, 1184px); }
  .detail-heading { padding: 28px 0 20px; }
  .detail-header h1 { font-size: 2rem; }
  .detail-artwork__placeholder { min-height: 320px; padding: 7%; }
  .mock-browser__content { min-height: 240px; }
  .detail-artwork__tag { top: 10px; left: 10px; }
  .artwork-link { right: 10px; bottom: 10px; }
  .project-panel { padding: 20px 18px 22px; }
  .project-facts { grid-template-columns: 1fr; gap: 14px; }
  .related-panel { padding: 18px; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
