/* ===== 自訂字體 ===== */
@font-face {
  font-family: 'GenSenRounded';
  src: url('fonts/GenSenRounded2TW-B.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

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

:root {
  --bg: #f4f1eb;
  --black: #1a1a1a;
  --gray: #888;
  --light-gray: #d4d0c8;
  --accent: #e8a87c;
  --accent2: #a8c4a0;
  --white: #fff;
  --font-en: 'Bebas Neue', 'Anton', sans-serif;
  --font-body: 'GenSenRounded', 'MS PGothic', sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

section {
  scroll-snap-align: start;
}

body {
  background: var(--bg);
  color: var(--black);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--light-gray); border-radius: 2px; }

/* ===== Nav ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  mix-blend-mode: normal;
  transition: background 0.3s, backdrop-filter 0.3s;
}

nav.scrolled {
  background: rgba(244, 241, 235, 0.85);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--font-en);
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--black);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
  position: relative;
  font-weight: 500;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--black);
  transition: width 0.3s;
}

.nav-links a:hover::after { width: 100%; }

/* ===== Hero ===== */
#hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-image: url('images/hero-bg.jpg.png');
  background-size: cover;
  background-position: center 50%;
  background-repeat: no-repeat;
}

/* 背景圖遮罩 0.2 */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(244, 241, 235, 0.2);
  z-index: 0;
}

/* 離開 Hero 時背景圖縮放動畫 */
#hero {
  transition: background-size 0.9s ease;
}

#hero.hero-exit {
  background-size: 110%;
}

#hero > * { position: relative; z-index: 1; }

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}

.hero-blob-1 {
  width: 400px; height: 400px;
  background: var(--accent);
  top: 10%; right: 5%;
  animation: blobFloat 8s ease-in-out infinite;
}

.hero-blob-2 {
  width: 350px; height: 350px;
  background: var(--accent2);
  bottom: 15%; left: 3%;
  animation: blobFloat 10s ease-in-out infinite reverse;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.05); }
  66% { transform: translate(-15px, 20px) scale(0.95); }
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #272727;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  width: 48px; height: 1px;
  background: #272727;
}

.hero-title {
  position: relative;
  line-height: 0.9;
  margin-bottom: 32px;
}

.hero-title .line {
  display: block;
  font-family: 'Impact', 'Arial Narrow', sans-serif;
  font-size: clamp(80px, 14vw, 180px);
  letter-spacing: -2px;
  color: #272727;
}

.hero-title .line-outline {
  -webkit-text-stroke: 2px #272727;
  color: transparent;
}

.hero-title .line-fill {
  color: #272727;
}

.hero-sub {
  font-size: 15px;
  color: var(--gray);
  letter-spacing: 1px;
  margin-bottom: 48px;
  font-weight: 300;
}

.hero-cta {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 40px;
  font-size: 13px;
  letter-spacing: 1px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover { background: #333; transform: translateY(-2px); }

.btn-ghost {
  color: var(--black);
  font-size: 13px;
  letter-spacing: 1px;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--black);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.btn-ghost:hover { opacity: 0.5; }

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-scroll span {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--light-gray), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.4; transform: scaleY(0.6); }
}

/* ===== Section Common ===== */
section { padding: 120px 48px; }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 64px;
  text-align: center;
  flex-direction: column;
  align-items: center;
}

.section-title {
  font-family: var(--font-en);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1;
  letter-spacing: -1px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-title .title-zh {
  font-family: var(--font-body);
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}

.section-title .title-en {
  font-family: var(--font-en);
  font-size: clamp(18px, 2.5vw, 32px);
  letter-spacing: 4px;
  color: var(--gray);
  line-height: 1;
}

.section-meta {
  text-align: right;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gray);
  text-transform: uppercase;
  padding-bottom: 8px;
}

.section-meta .count {
  font-size: 13px;
  color: var(--black);
  font-weight: 600;
}

/* ===== Works Filter ===== */
.works-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--light-gray);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--gray);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.filter-btn .f-zh {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 1;
}

.filter-btn .f-en {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.6;
  line-height: 1;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

.filter-btn.active .f-en,
.filter-btn:hover .f-en {
  opacity: 0.8;
}

/* ===== Works Grid ===== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-card {
  cursor: pointer;
  transition: transform 0.3s;
}

.work-card:hover { transform: translateY(-6px); }

.work-thumb {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--light-gray);
  margin-bottom: 16px;
}

.work-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.work-card:hover .work-thumb img { transform: scale(1.05); }

.work-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 13px;
  letter-spacing: 1px;
}

.work-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,26,26,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 12px;
}

.work-card:hover .work-overlay { opacity: 1; }

.work-overlay span {
  color: var(--white);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.5);
  padding: 10px 20px;
  border-radius: 20px;
}

.work-number {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gray);
  margin-bottom: 6px;
}

.work-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.work-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.work-tag {
  font-size: 11px;
  color: var(--gray);
  background: rgba(0,0,0,0.05);
  padding: 3px 10px;
  border-radius: 12px;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26,26,26,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  display: flex;
  gap: 48px;
  max-width: 1000px;
  width: 90%;
  align-items: center;
}

.lightbox-img {
  flex: 0 0 55%;
  border-radius: 12px;
  overflow: hidden;
  background: #333;
}

.lightbox-img img {
  width: 100%;
  display: block;
  object-fit: contain;
  max-height: 70vh;
}

.lightbox-info { flex: 1; color: var(--white); }

.lightbox-num {
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.lightbox-title {
  display: none;
}

.lightbox-desc {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
}

.lightbox-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.lightbox-tag {
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  padding: 4px 12px;
  border-radius: 12px;
}

.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  color: rgba(255,255,255,0.6);
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover { color: var(--white); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--white);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex; align-items: center; justify-content: center;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ===== About ===== */
#about { border-top: 1px solid var(--light-gray); }

.about-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.about-left {
  display: flex;
  justify-content: center;
}

.about-left .about-portrait {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.about-left .about-portrait img {
  width: 280px;
  height: auto;
  border-radius: 16px;
  display: block;
}

.about-portrait-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 13px;
}

.about-right { padding-top: 16px; text-align: center; }

.about-name {
  font-family: var(--font-en);
  font-size: 56px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.about-role {
  font-size: 14px;
  color: var(--gray);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.about-bio {
  font-size: 15px;
  line-height: 2;
  color: #444;
  margin-bottom: 48px;
}

.about-skills { margin-bottom: 48px; }

.skills-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 16px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.skill-item {
  padding: 8px 16px;
  border: 1px solid var(--light-gray);
  border-radius: 24px;
  font-size: 13px;
  color: var(--black);
}

.about-social { display: flex; gap: 16px; justify-content: center; }

.social-link {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid var(--black);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.social-link:hover { opacity: 0.4; }

/* ===== Contact ===== */
#contact {
  border-top: 1px solid var(--light-gray);
  text-align: center;
}

.contact-title {
  font-family: var(--font-en);
  font-size: clamp(40px, 6vw, 72px);
  margin-bottom: 24px;
}

.contact-sub {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 48px;
}

.contact-email {
  display: inline-block;
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--black);
  text-decoration: none;
  border-bottom: 2px solid var(--black);
  padding-bottom: 4px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: opacity 0.2s;
  margin-bottom: 64px;
}

.contact-email:hover { opacity: 0.5; }

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--light-gray);
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--gray);
}

/* ===== Works filters row ===== */
.works-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
}

.section-count {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gray);
  text-transform: uppercase;
  margin-top: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  .nav-links { gap: 24px; }
  section { padding: 80px 24px; }
  .works-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-left .about-portrait { max-width: 280px; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .works-grid { grid-template-columns: 1fr; }
  .hero-title .line { font-size: clamp(60px, 18vw, 80px); }
  footer { flex-direction: column; gap: 8px; text-align: center; }
}
