:root {
  --bg: #0e0d0b;
  --bg-soft: #15130f;
  --ink: #e9e4d8;
  --ink-dim: #9a9589;
  --ink-mute: #6a665c;
  --gold: #c9a961;
  --gold-soft: #d8bd7a;
  --rule: rgba(233, 228, 216, 0.10);
  --serif: "Newsreader", "Noto Serif TC", "Iowan Old Style", "Georgia", serif;
  --sans: "Inter", -apple-system, "PingFang TC", "Helvetica Neue", sans-serif;
  --max: 780px;
  --gutter: clamp(24px, 5vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 24px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
  background: linear-gradient(180deg, rgba(14,13,11,0.85), rgba(14,13,11,0));
  backdrop-filter: blur(6px);
}
.brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.lang-switch button {
  background: none;
  border: none;
  color: var(--ink-mute);
  cursor: pointer;
  padding: 4px 6px;
  font: inherit;
  transition: color .2s ease;
}
.lang-switch button:hover { color: var(--ink-dim); }
.lang-switch button.active { color: var(--gold); }
.lang-switch .divider { color: var(--ink-mute); }

/* ── Hero ── */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}
.kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 32px;
  opacity: 0;
  animation: fade-up .9s .1s ease forwards;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(40px, 7vw, 74px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 48px;
  opacity: 0;
  animation: fade-up 1.1s .25s ease forwards;
}
.hero-title .line-zh { display: inline-block; }
.hero-meta {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  color: var(--gold-soft);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: fade-up 1s .55s ease forwards;
}
.hero-meta .name-formal {
  font-weight: 500;
  font-style: normal;
}
.hero-meta .name-sep {
  color: var(--ink-mute);
  margin: 0 10px;
  font-weight: 300;
}
.hero-meta .name-casual {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}
.hero-role {
  font-size: 14px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
  opacity: 0;
  animation: fade-up 1s .75s ease forwards;
}

/* ── Section base ── */
.section {
  padding: 120px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--rule);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 48px;
}

/* ── About prose ── */
.prose p {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 28px;
}
.prose p:last-child { margin-bottom: 0; }
.prose em {
  font-style: italic;
  color: var(--gold-soft);
  font-weight: 400;
}
.prose strong {
  font-weight: 600;
  color: var(--ink);
}
.prose.zh p { letter-spacing: 0.02em; }

/* ── Work cards ── */
.work-card {
  display: grid;
  grid-template-columns: 60px 1fr 40px;
  gap: 28px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: transform .35s ease, opacity .3s ease;
}
.work-card:first-of-type { border-top: 1px solid var(--rule); }
.work-card:hover { transform: translateX(6px); }
.work-card:hover .work-arrow { color: var(--gold); transform: translateX(4px); }
.work-card:hover .work-title { color: var(--gold-soft); }

.work-index {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--gold);
  padding-top: 6px;
}
.work-body {}
.work-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--ink);
  transition: color .25s ease;
}
.work-desc {
  font-size: 16px;
  color: var(--ink-dim);
  margin-bottom: 14px;
  line-height: 1.65;
}
.work-desc strong { color: var(--ink); font-weight: 500; }
.work-meta {
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}
.work-arrow {
  font-size: 22px;
  color: var(--ink-mute);
  padding-top: 6px;
  transition: color .25s ease, transform .25s ease;
  justify-self: end;
}

/* ── Contact ── */
.contact-lede {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 32px;
}
.contact-email {
  display: inline-block;
  font-family: var(--serif);
  font-size: 24px;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 4px;
  transition: color .25s ease, border-color .25s ease;
}
.contact-email:hover { color: var(--gold-soft); border-color: var(--gold-soft); }

/* ── Footer ── */
.footer {
  padding: 48px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--rule);
}
.foot-right { font-style: italic; }

/* ── Scroll reveal ── */
.section, .footer {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s ease;
}
.section.in-view, .footer.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ── Animations ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { min-height: 90vh; padding-top: 80px; }
  .work-card {
    grid-template-columns: 40px 1fr 24px;
    gap: 20px;
    padding: 32px 0;
  }
  .work-title { font-size: 24px; }
  .section { padding: 80px var(--gutter); }
  .footer { flex-direction: column; gap: 16px; text-align: center; }
}

/* ── Lang visibility ── */
[data-only-lang] { transition: opacity .3s ease; }
