/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #131110;
  --bg-2:        #1a1816;
  --bg-3:        #232020;
  --bg-card:     #2a2725;
  --accent:      #a8958f;
  --accent-light:#c4b0aa;
  --accent-dim:  rgba(168,149,143,0.18);
  --accent-glow: rgba(168,149,143,0.08);
  --text:        #f0ece6;
  --text-2:      #aca49e;
  --text-muted:  #665f5b;
  --border:      rgba(168,149,143,0.12);
  --border-hover:rgba(168,149,143,0.35);
  --radius:      14px;
  --radius-lg:   22px;
  --radius-xl:   32px;
  --ease:        cubic-bezier(0.22,1,0.36,1);
  --max-w:       1180px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Noto Sans TC', -apple-system, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: 'Noto Serif TC', 'Georgia', serif;
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.8rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.8rem); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(19,17,16,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--border);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__logo {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__logo-badge {
  background: var(--accent);
  color: var(--bg);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.08em;
  font-family: 'Inter', sans-serif;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav__links a {
  font-size: 0.9rem;
  color: var(--text-2);
  transition: color 0.25s;
  letter-spacing: 0.02em;
}
.nav__links a:hover { color: var(--text); }
.nav__cta {
  background: var(--accent);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 50px;
  transition: background 0.25s, transform 0.25s;
  white-space: nowrap;
}
.nav__cta:hover { background: var(--accent-light); transform: translateY(-1px); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(168,149,143,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(168,149,143,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: var(--accent-light);
  letter-spacing: 0.06em;
  margin-bottom: 28px;
}
.hero__tag-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero__title {
  margin-bottom: 28px;
  color: var(--text);
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
.hero__title em::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0.4;
  border-radius: 2px;
}
.hero__desc {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-2);
  max-width: 520px;
  margin-bottom: 44px;
  line-height: 1.85;
}
.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  letter-spacing: 0.01em;
}
.btn--primary {
  background: var(--accent);
  color: var(--bg);
}
.btn--primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(168,149,143,0.25); }
.btn--outline {
  border: 1px solid var(--border-hover);
  color: var(--text-2);
}
.btn--outline:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.btn--sm { padding: 10px 20px; font-size: 0.875rem; }

/* Hero Photo */
.hero__photo-wrap {
  position: relative;
}
.hero__photo-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--bg-3);
}
.hero__photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.85) contrast(1.05);
  transition: transform 6s ease;
}
.hero__photo-frame:hover img { transform: scale(1.03); }
.hero__photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(19,17,16,0.5) 0%, transparent 50%);
}
.hero__photo-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: rgba(19,17,16,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero__photo-badge-icon {
  width: 40px; height: 40px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.hero__photo-badge-text { font-size: 0.8rem; }
.hero__photo-badge-text strong { display: block; color: var(--text); font-size: 0.9rem; }
.hero__photo-badge-text span { color: var(--text-muted); }
.hero__deco-ring {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  opacity: 0.6;
}
.hero__deco-ring-2 {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border: 1px solid var(--border);
  border-radius: 50%;
  opacity: 0.3;
}

/* ===== STATS BAND ===== */
.stats {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stats__item {}
.stats__num {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}
.stats__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ===== ABOUT ===== */
.about {
  padding: 100px 0;
}
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  font-family: 'Inter', sans-serif;
}
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about__title { margin-bottom: 24px; }
.about__body {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.9;
}
.about__body p + p { margin-top: 20px; }
.about__body strong { color: var(--text); }
.about__pillars {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pillar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.pillar:hover { border-color: var(--border-hover); transform: translateX(6px); }
.pillar__icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.pillar__title {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.pillar__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== PORTFOLIO PREVIEW ===== */
.portfolio-preview {
  padding: 100px 0;
  background: var(--bg-2);
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
  flex-wrap: wrap;
  gap: 20px;
}
.section-header__left {}
.section-header__title { margin-bottom: 8px; }
.section-header__desc { color: var(--text-2); font-size: 1rem; max-width: 480px; }

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}
.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.4s var(--ease), box-shadow 0.4s;
  display: block;
  cursor: pointer;
}
.work-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.work-card__img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-3);
  position: relative;
}
.work-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.work-card:hover .work-card__img img { transform: scale(1.04); }
.work-card__img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.work-card__img-placeholder-icon { font-size: 2.5rem; opacity: 0.4; }
.work-card__cat {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(19,17,16,0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 4px 12px;
  font-size: 0.75rem;
  color: var(--accent-light);
  letter-spacing: 0.06em;
}
.work-card__body { padding: 24px; }
.work-card__title {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.work-card__desc {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 20px;
}
.work-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.work-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  background: var(--accent-dim);
  color: var(--accent-light);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: 0.04em;
}
.work-card__arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: color 0.25s, transform 0.25s;
}
.work-card:hover .work-card__arrow { color: var(--accent); transform: translateX(4px); }

/* Coming soon card */
.work-card--soon {
  border-style: dashed;
  opacity: 0.5;
  pointer-events: none;
}
.work-card--soon:hover { transform: none; box-shadow: none; }

/* ===== CTA BAND ===== */
.cta-band {
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(168,149,143,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-band__inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.cta-band__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.cta-band__title { margin-bottom: 20px; }
.cta-band__desc {
  color: var(--text-2);
  font-size: 1.05rem;
  margin-bottom: 40px;
  line-height: 1.8;
}
.cta-band__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER ===== */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__brand {
  font-family: 'Noto Serif TC', serif;
  font-size: 1rem;
  font-weight: 700;
}
.footer__copy { font-size: 0.8rem; color: var(--text-muted); }
.footer__links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer__links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.25s;
}
.footer__links a:hover { color: var(--accent); }

/* ===== PORTFOLIO PAGE ===== */
.page-hero {
  padding: 160px 0 80px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.page-hero__label { margin-bottom: 12px; }
.page-hero__title { margin-bottom: 16px; }
.page-hero__desc { font-size: 1.05rem; color: var(--text-2); max-width: 560px; }

.filter-bar {
  padding: 48px 0 0;
  position: sticky;
  top: 65px;
  z-index: 50;
  background: var(--bg);
  padding-bottom: 0;
}
.filter-bar__inner {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 28px 0;
  max-width: var(--max-w);
  margin: 0 auto;
}
.filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 14px 18px;
  border-bottom: 2px solid transparent;
  transition: color 0.25s, border-color 0.25s;
  font-family: inherit;
  white-space: nowrap;
  margin-bottom: -1px;
}
.filter-btn:hover { color: var(--text-2); }
.filter-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.portfolio-section {
  padding: 64px 0 100px;
}

/* ===== WORK DETAIL PAGE ===== */
.work-header {
  padding: 120px 0 80px;
  border-bottom: 1px solid var(--border);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.breadcrumb a { transition: color 0.25s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { opacity: 0.4; }
.work-header__cat { margin-bottom: 14px; }
.work-header__title { margin-bottom: 16px; }
.work-header__desc { font-size: 1.1rem; color: var(--text-2); max-width: 680px; line-height: 1.85; }

.work-detail {
  padding: 80px 0 100px;
}
.work-detail__layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 72px;
  align-items: start;
}
.work-detail__preview {
  position: sticky;
  top: 100px;
}
.work-detail__mockup {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
.work-detail__mockup img {
  width: 100%;
  display: block;
}
.work-detail__mockup-bar {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mockup-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
}
.mockup-dot:nth-child(1) { background: #ff5f57; opacity: 0.7; }
.mockup-dot:nth-child(2) { background: #febc2e; opacity: 0.7; }
.mockup-dot:nth-child(3) { background: #28c840; opacity: 0.7; }
.mockup-url {
  flex: 1;
  background: var(--bg-2);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.work-detail__content {}
.work-section {
  margin-bottom: 48px;
}
.work-section__num {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 6px;
  font-family: 'Inter', sans-serif;
}
.work-section__heading {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.work-section__body {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.9;
}
.work-section__body p + p { margin-top: 16px; }
.work-section__body strong { color: var(--text); }

.work-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.work-meta-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.work-meta-item__label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.work-meta-item__val {
  font-size: 0.9rem;
  color: var(--text-2);
  font-weight: 500;
}

.work-actions {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__photo-wrap { display: none; }
  .about__inner { grid-template-columns: 1fr; gap: 48px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .work-detail__layout { grid-template-columns: 1fr; }
  .work-detail__preview { position: static; }
}
@media (max-width: 768px) {
  .nav__links { display: none; }
  .works-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .work-meta-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .nav__inner { padding: 0 18px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  h1 { font-size: 2.2rem; }
}
