/* ── Variables ── */
:root {
  --bg:       #1A1A1A;
  --surface:  #242424;
  --border:   #2E2E2E;
  --text:     #F5F5F0;
  --muted:    #888888;
  --accent:   #C8B89A;
  --accent-dim: rgba(200, 184, 154, 0.12);

  --font-en:  'Outfit', sans-serif;
  --font-zh:  'Noto Sans TC', sans-serif;

  --radius:   12px;
  --transition: 0.3s ease;

  --max-w:    1100px;
  --section-gap: 120px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-zh);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: var(--section-gap) 0;
}

/* ── Fade-in animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  background: rgba(26, 26, 26, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
nav.scrolled {
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color var(--transition);
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--text); }

/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}
.hero-content {
  max-width: 680px;
}
.hero-eyebrow {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.hero-name {
  font-family: var(--font-en);
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.hero-name-zh {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 32px;
  letter-spacing: 0.08em;
}
.hero-tagline {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 48px;
  max-width: 480px;
}
.hero-tagline strong {
  color: var(--text);
  font-weight: 500;
}
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #1A1A1A;
}
.btn-primary:hover {
  background: #D4C4AB;
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── Section Header ── */
.section-label {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 16px;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.8;
}
.section-header {
  margin-bottom: 64px;
}

/* ── About ── */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-text p {
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 16px;
  font-size: 16px;
}
.about-text p strong {
  color: var(--text);
  font-weight: 500;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.stat-number {
  font-family: var(--font-en);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Skills ── */
#skills .skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.skill-card {
  background: var(--surface);
  padding: 40px 36px;
  transition: background var(--transition);
  position: relative;
  overflow: hidden;
}
.skill-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 36px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.skill-card:hover { background: #2A2A2A; }
.skill-card:hover::after { width: calc(100% - 72px); }
.skill-icon {
  font-size: 28px;
  margin-bottom: 20px;
}
.skill-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.skill-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.tag {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(200, 184, 154, 0.2);
}

/* ── Background Timeline ── */
#background {
  padding-bottom: 0;
}
.bg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.bg-card {
  background: var(--surface);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: background var(--transition);
}
.bg-card:hover { background: #2A2A2A; }
.bg-year {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.bg-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.bg-role {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(200, 184, 154, 0.2);
  width: fit-content;
}
.bg-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}
.bg-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.bg-stat::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .bg-grid { grid-template-columns: 1fr; }
}

/* ── Partnership ── */
#partnership {
  padding-bottom: 0;
}
.partnership-card {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.partnership-left {
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
  background: linear-gradient(160deg, #242424 0%, #1e1e1e 100%);
}
.partnership-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.partnership-brand-name {
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text);
}
.partnership-brand-sub {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.partnership-ig-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.ig-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  transition: color var(--transition);
}
.ig-link:hover { color: var(--accent); }
.ig-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.partnership-stats {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.p-stat-value {
  font-family: var(--font-en);
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.p-stat-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.partnership-right {
  padding: 52px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.partnership-tag {
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.partnership-tag::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}
.partnership-title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 28px;
}
.partnership-brand-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  margin-bottom: 28px;
  font-style: normal;
}

.partnership-body {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.95;
}
.partnership-body em {
  color: var(--text);
  font-style: normal;
  font-weight: 500;
}

@media (max-width: 768px) {
  .partnership-card {
    grid-template-columns: 1fr;
  }
  .partnership-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 36px 28px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 28px;
  }
  .partnership-right {
    padding: 36px 28px;
  }
}

/* ── Featured Project ── */
#featured {
  padding-bottom: 0;
}
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: border-color var(--transition);
}
.featured-card:hover {
  border-color: var(--accent);
}
.featured-img {
  position: relative;
  overflow: hidden;
}
.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.featured-card:hover .featured-img img {
  transform: scale(1.03);
}
.featured-body {
  padding: 48px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.featured-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.featured-badge {
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(200, 184, 154, 0.25);
}
.featured-badge.role {
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border-color: var(--border);
}
.featured-title {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}
.featured-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 32px;
}
.featured-metrics {
  display: flex;
  gap: 28px;
  margin-bottom: 36px;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-value {
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.metric-label {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 768px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-img {
    aspect-ratio: 16/9;
  }
  .featured-body {
    padding: 32px 28px;
  }
}

/* ── Works ── */
#works .works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
  cursor: pointer;
}
.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.work-thumb {
  aspect-ratio: 1/1;
  background: var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.work-card:hover .work-thumb img {
  transform: scale(1.04);
}
.work-thumb-placeholder {
  color: var(--muted);
  font-size: 32px;
  opacity: 0.3;
}
.work-platform {
  position: absolute;
  top: 12px; right: 12px;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(26, 26, 26, 0.85);
  color: var(--accent);
}
.work-info {
  padding: 20px;
}
.work-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}
.work-desc {
  font-size: 12px;
  color: var(--muted);
}
.works-placeholder-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 0 16px;
}
.works-placeholder-msg p {
  color: var(--muted);
  font-size: 14px;
}

/* ── Process ── */
#process .process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.process-step {
  background: var(--bg);
  padding: 48px 36px;
  position: relative;
}
.step-num {
  font-family: var(--font-en);
  font-size: 56px;
  font-weight: 800;
  color: var(--accent-dim);
  line-height: 1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  border: 1px solid rgba(200, 184, 154, 0.15);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 24px;
  color: var(--accent);
}
.step-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}
.step-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

/* ── Contact ── */
#contact {
  border-top: 1px solid var(--border);
}
.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.contact-inner .section-title {
  margin-bottom: 16px;
}
.contact-inner .section-desc {
  max-width: 100%;
  margin-bottom: 48px;
}
.contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  transition: all var(--transition);
}
.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.contact-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.email-copy {
  cursor: pointer;
}
.email-copy.copied {
  border-color: #6BCB8B;
  color: #6BCB8B;
}

/* ── Footer ── */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy {
  font-size: 13px;
  color: var(--muted);
}
.footer-made {
  font-size: 12px;
  color: #444;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --section-gap: 80px; }

  .nav-links { display: none; }

  #about .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  #skills .skills-grid {
    grid-template-columns: 1fr;
  }

  #works .works-grid {
    grid-template-columns: 1fr 1fr;
  }

  #process .process-steps {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  #works .works-grid {
    grid-template-columns: 1fr;
  }
  .about-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Password Gate ── */
.gate-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.gate-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.gate-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  padding: 2.5rem;
}
.gate-logo {
  font-family: var(--font-en);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.gate-sub {
  font-family: var(--font-zh);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.gate-input-wrap {
  display: flex;
  gap: 0.5rem;
}
.gate-input-wrap input[type="password"] {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-en);
  outline: none;
  width: 200px;
  transition: border-color var(--transition);
  -webkit-text-security: disc;
}
.gate-input-wrap input[type="password"]:focus {
  border-color: var(--accent);
}
.gate-input-wrap input.shake {
  animation: gate-shake 0.35s ease;
  border-color: #e05c5c !important;
}
.gate-btn {
  background: var(--accent);
  color: #1A1A1A;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-en);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: opacity var(--transition);
  white-space: nowrap;
}
.gate-btn:hover { opacity: 0.82; }
.gate-error {
  color: #e05c5c;
  font-size: 0.82rem;
  min-height: 1.2em;
  font-family: var(--font-zh);
}
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-7px); }
  60%       { transform: translateX(7px); }
  80%       { transform: translateX(-4px); }
}
