:root {
  --bg: #0b0d10;
  --bg-soft: #141821;
  --text: #f5e9c8;
  --muted: #a99f87;
  --line: #2a3140;
  --accent: #64f4d3;
  --accent-2: #ffb347;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans TC", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 179, 71, 0.12), transparent 35%),
    radial-gradient(circle at 85% 25%, rgba(100, 244, 211, 0.12), transparent 38%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  padding: 0 24px 48px;
}

.bg-glow {
  position: fixed;
  inset: -40% -20%;
  background:
    conic-gradient(from 120deg, rgba(255, 179, 71, 0.08), rgba(100, 244, 211, 0.08), transparent 45%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 60px
    );
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}

.topbar {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  animation: drop-in 0.7s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--accent-2);
  display: grid;
  place-items: center;
  font-family: "Cinzel", serif;
  color: var(--accent-2);
}

.brand-title {
  margin: 0;
  font-weight: 700;
}

.brand-sub {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 16px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav a:hover {
  color: var(--accent);
}

main {
  max-width: 1080px;
  margin: 0 auto;
}

.hero {
  padding: 72px 0 56px;
  animation: rise 0.9s ease;
}

.kicker {
  margin: 0;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
}

h1,
h2 {
  font-family: "Cinzel", serif;
  margin: 0;
}

.hero h1 {
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.2;
}

.hero h1 span {
  color: var(--accent);
}

.hero-text {
  max-width: 700px;
  margin-top: 20px;
  color: var(--muted);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), #96ffe8);
  color: #04100d;
  font-weight: 700;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
}

.section {
  padding: 28px 0;
}

.section-head {
  margin-bottom: 18px;
}

.section-head p {
  color: var(--muted);
  margin-top: 8px;
}

.project-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.project-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.filter-chip.is-active {
  border-color: var(--accent);
  color: #00140f;
  background: linear-gradient(120deg, var(--accent), #96ffe8);
  font-weight: 700;
}

.project-search {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  min-width: 220px;
  outline: none;
}

.project-search:focus {
  border-color: var(--accent);
}

.project-result-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  backdrop-filter: blur(2px);
  opacity: 0;
  transform: translateY(14px);
  animation: card-in 0.5s ease forwards;
}

.card-illustration-wrap {
  margin: -6px -6px 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-zoom-trigger {
  border: 0;
  padding: 0;
  width: 100%;
  display: block;
  cursor: zoom-in;
  background: transparent;
}

.card-illustration {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #16212a, #0f1620);
  transition: transform 0.35s ease;
}

.card-zoom-trigger:hover .card-illustration {
  transform: scale(1.04);
}

.card-illustration-fallback {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
}

.card-type {
  font-size: 0.8rem;
  color: var(--accent-2);
}

.card h3 {
  margin: 8px 0;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  color: #d8d0bd;
}

.card-actions {
  margin-top: 14px;
}

.card-link {
  display: inline-block;
  text-decoration: none;
  color: #031612;
  background: linear-gradient(120deg, var(--accent-2), #ffd08e);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.card-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.about p,
.contact p {
  color: var(--muted);
  max-width: 760px;
}

.mail {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

footer {
  max-width: 1080px;
  margin: 28px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

.social-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-links a {
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.84rem;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.social-links.compact {
  margin-top: 10px;
}

.section-more {
  margin-top: 16px;
}

.page-hero {
  padding: 58px 0 10px;
  animation: rise 0.9s ease;
}

.page-intro {
  margin-top: 14px;
  color: var(--muted);
  max-width: 700px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.contact-card h2 {
  margin-bottom: 8px;
}

.contact-card ul {
  margin-top: 10px;
  margin-bottom: 16px;
  padding-left: 18px;
  color: var(--muted);
}

.card-link-disabled {
  pointer-events: none;
  opacity: 0.65;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 10, 0.84);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 30;
}

.image-preview-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.image-preview-target {
  max-width: min(1100px, 94vw);
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
}

.image-preview-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(12, 16, 22, 0.8);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.image-preview-close:hover {
  border-color: var(--accent);
}

.floating-cta {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  text-decoration: none;
  color: #04100d;
  background: linear-gradient(120deg, var(--accent), #8cfde5);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.floating-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.detail-page-main {
  max-width: 860px;
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.detail-card h1 {
  margin-top: 6px;
  margin-bottom: 8px;
}

.detail-lead {
  color: var(--muted);
  margin-bottom: 14px;
}

.detail-cover img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.detail-card section {
  margin-top: 20px;
}

.detail-card section p,
.detail-card section li {
  color: var(--muted);
}

.detail-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.shot-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
}

.shot-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.card-link-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 18px;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  body {
    padding: 0 16px 36px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .nav a {
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 8px;
  }

  .hero {
    padding: 48px 0 34px;
  }

  .project-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .project-search {
    width: 100%;
    min-width: 0;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero-actions,
  .social-links,
  .project-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .social-links a,
  .card-link,
  .filter-chip {
    text-align: center;
    width: 100%;
  }

  .project-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .contact-card {
    padding: 14px;
  }

  .detail-card {
    padding: 14px;
  }

  .detail-actions {
    flex-direction: column;
  }

  .floating-cta {
    right: 12px;
    left: 12px;
    bottom: 12px;
    text-align: center;
  }

  .image-preview-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 420px) {
  .nav {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .kicker {
    font-size: 0.72rem;
    letter-spacing: 1.2px;
  }
}

