:root {
  color-scheme: dark;
  --ink: #070808;
  --paper: #f4f1f8;
  --white: #f8f8f6;
  --muted: #8d8a92;
  --soft: rgba(255, 255, 255, 0.68);
  --line: rgba(255, 255, 255, 0.14);
  --accent: #d7ff2f;
  --accent-soft: rgba(215, 255, 47, 0.12);
  --accent-line: rgba(215, 255, 47, 0.44);
  --nav-bg: rgba(7, 8, 8, 0.68);
  --nav-line: rgba(255, 255, 255, 0.08);
  --max: 1680px;
  --detail: 1180px;
  --detail-media: 1440px;
  --reading: 860px;
  --font-display: "Syne", ui-sans-serif, system-ui, sans-serif;
  --font-title: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --ink: #f5f3ef;
  --paper: #070808;
  --white: #1a1a1a;
  --muted: #6b6870;
  --soft: rgba(20, 20, 20, 0.72);
  --line: rgba(20, 20, 20, 0.14);
  --accent: #627400;
  --accent-soft: rgba(98, 116, 0, 0.09);
  --accent-line: rgba(98, 116, 0, 0.28);
  --nav-bg: rgba(245, 243, 239, 0.68);
  --nav-line: rgba(20, 20, 20, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

#home,
#works,
#about,
#contact,
.detail-hero,
.detail-section {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0;
  transition: background 400ms ease, color 400ms ease;
}

h1, h2, h3,
.project-title,
.brand {
  font-family: var(--font-title);
}

body.is-loading {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

/* ─── Loader ─────────────────────────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  place-items: center;
  background: var(--ink);
  color: var(--white);
  --load-progress: 0%;
  --loader-line-color: rgba(248, 248, 246, 0.58);
  --loader-count-color: rgba(248, 248, 246, 0.46);
  transition: transform 820ms cubic-bezier(0.76, 0, 0.24, 1), visibility 820ms ease;
}

[data-theme="light"] .loader {
  --loader-line-color: rgba(26, 26, 26, 0.58);
  --loader-count-color: rgba(26, 26, 26, 0.46);
}

.loader.is-hidden {
  transform: translateY(-100%);
  visibility: hidden;
  pointer-events: none;
}

.loader-mark {
  position: relative;
  grid-row: 2;
  width: min(76vw, 760px);
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 6.7vw, 96px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.loader-word {
  display: block;
  width: 100%;
  text-align: center;
}

.loader-word--base {
  color: var(--white);
  opacity: 0.28;
}

.loader-word--progress {
  position: absolute;
  inset: 0;
  color: var(--white);
  opacity: 1;
  clip-path: inset(0 calc(100% - var(--load-progress)) 0 0);
}

.loader-line {
  position: absolute;
  left: 50%;
  top: calc(50% + clamp(46px, 6.8vw, 92px));
  max-width: min(640px, calc(100vw - 48px));
  margin: 0;
  color: var(--loader-line-color);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  transform: translateX(-50%);
}

.loader-count {
  position: absolute;
  bottom: 16vh;
  margin: 0;
  color: var(--loader-count-color);
}

/* ─── Site Shell ─────────────────────────────────────────────────────────── */
.site-shell {
  min-height: 100vh;
  opacity: 1;
}

.site-shell::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background: var(--ink);
  transition: background 400ms ease;
}

/* ─── Scroll Reveal ─────────────────────────────────────────────────────── */
.reveal-section {
  opacity: 1;
  --title-offset: -108%;
  --content-progress: 0;
  --content-y: 18px;
}

.blind-title {
  overflow: hidden;
}

.blind-title > span,
.blind-title > .title-mask {
  display: block;
  transform: translate3d(0, var(--title-offset), 0);
  will-change: transform;
}

.reveal-section.is-visible .blind-title > span,
.reveal-section.is-visible .blind-title > .title-mask {
  --title-offset: 0%;
  animation: blind-title-down 650ms cubic-bezier(0.76, 0, 0.24, 1) 30ms both;
}

.reveal-section.is-visible .preview-copy .blind-title > span {
  animation-delay: 70ms;
}

.reveal-content {
  opacity: var(--content-progress);
  transform: translate3d(0, var(--content-y), 0);
  transition:
    opacity 380ms ease,
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0ms;
  will-change: opacity, transform;
}

.reveal-section.is-visible .reveal-content {
  --content-progress: 1;
  --content-y: 0px;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 390ms;
}

.reveal-section.is-visible .preview.reveal-content {
  transition-delay: 440ms;
}

.reveal-section.is-visible .about-content.reveal-content,
.reveal-section.is-visible .contact-bottom.reveal-content {
  transition-delay: 470ms;
}

@keyframes blind-title-down {
  from {
    transform: translate3d(0, -108%, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

/* ─── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(24px, 4vw, 72px);
  color: var(--white);
  font-size: 15px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

[data-theme="light"] .topbar {
  background: var(--nav-bg);
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.brand-text {
  display: block;
}

.brand::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  content: "";
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.52);
  transform-origin: left;
  transition: opacity 180ms ease, transform 180ms ease;
}

.brand:hover::after,
.brand:focus-visible::after {
  opacity: 0.42;
  transform: scaleX(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.nav-menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-menu-toggle i {
  position: relative;
  width: 22px;
  height: 9px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transition: transform 180ms ease, height 180ms ease;
}

.topbar.is-nav-open .nav-menu-toggle {
  color: var(--accent);
}

.topbar.is-nav-open .nav-menu-toggle i {
  height: 1px;
  transform: rotate(-18deg);
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  opacity: 0.78;
  transition: color 180ms ease, opacity 180ms ease;
}

.nav-links a::before {
  content: attr(data-nav-index);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  transition: color 180ms ease;
}

.nav-links a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  content: "";
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.72);
  transform-origin: left;
  transition: opacity 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
}

.nav-links a:hover::before,
.nav-links a:focus-visible::before {
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  opacity: 0.42;
  transform: scaleX(1);
}

.theme-toggle,
.lang-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease;
}

.theme-toggle::before,
.lang-toggle::before {
  content: "[";
  margin-right: 4px;
  color: var(--muted);
  transition: color 180ms ease;
}

.theme-toggle::after,
.lang-toggle::after {
  content: "]";
  margin-left: 4px;
  color: var(--muted);
  transition: color 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.lang-toggle:hover,
.lang-toggle:focus-visible {
  color: var(--accent);
}

.theme-toggle:hover::before,
.theme-toggle:hover::after,
.theme-toggle:focus-visible::before,
.theme-toggle:focus-visible::after,
.lang-toggle:hover::before,
.lang-toggle:hover::after,
.lang-toggle:focus-visible::before,
.lang-toggle:focus-visible::after {
  color: var(--accent);
}

.theme-toggle + .lang-toggle {
  margin-left: -10px;
}

/* ─── Hero About ─────────────────────────────────────────────────────────── */
.hero-about {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 clamp(24px, 4vw, 72px);
  padding-top: 96px;
}

.hero-kicker {
  margin: 0 0 32px;
  font-size: 13px;
  letter-spacing: 0.18em;
  font-weight: 500;
  color: var(--soft);
}

.hero-name {
  margin: 0 0 40px;
  font-family: var(--font-display);
  font-size: clamp(64px, 13vw, 220px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.035em;
  color: var(--white);
  text-wrap: balance;
}

.hero-intro {
  max-width: 640px;
  margin: 0;
  color: var(--soft);
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.6;
}

.hero-intro + .hero-intro {
  margin-top: 12px;
}

.hero-tags {
  position: absolute;
  right: clamp(24px, 4vw, 72px);
  bottom: clamp(40px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--soft);
  text-transform: uppercase;
}

.hero-tag--available {
  color: var(--white);
  border-color: var(--white);
}

.hero-tag--available::first-letter {
  color: var(--accent);
}

/* ─── Work Stage ─────────────────────────────────────────────────────────── */
.work-stage {
  width: min(var(--max), 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 72px clamp(24px, 4vw, 72px) 86px;
  display: grid;
  grid-template-columns: minmax(420px, 0.72fr) minmax(620px, 1.28fr);
  gap: clamp(44px, 5.2vw, 88px);
  align-items: center;
}

.work-stage--featured {
  grid-template-columns: 1fr;
  align-items: start;
}

.work-heading {
  grid-column: 1 / -1;
  align-self: end;
  margin-bottom: clamp(10px, 2vw, 28px);
}

.work-heading h2 {
  margin: 0;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(68px, 11vw, 188px);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.045em;
  color: var(--white);
}

.section-kicker {
  margin: 0 0 26px;
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.featured-case,
.preview {
  display: grid;
  grid-template-columns: minmax(340px, 0.64fr) minmax(0, 1fr);
  gap: clamp(34px, 4.2vw, 70px);
  align-items: start;
  min-width: 0;
  padding-bottom: clamp(34px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.featured-case + .featured-case {
  margin-top: clamp(52px, 7vw, 108px);
}

.featured-case-copy {
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
  padding-top: 12px;
}

.preview-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  isolation: isolate;
}

.featured-cover {
  align-self: center;
}

[data-theme="light"] .preview-media {
  background: rgba(20, 20, 20, 0.05);
  box-shadow: inset 0 0 0 1px rgba(20, 20, 20, 0.1);
}

.preview-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 78% 72%, rgba(255, 255, 255, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.22));
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}

.preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.88) contrast(1.02) brightness(0.94);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, filter 260ms ease;
}

.preview-media:hover img,
.preview-media:focus-visible img {
  filter: saturate(0.95) contrast(1.04) brightness(1.02);
  transform: scale(1.035);
}

.preview-media:hover::after,
.preview-media:focus-visible::after {
  opacity: 1;
}

.preview-cta {
  position: absolute;
  right: clamp(16px, 2.2vw, 26px);
  bottom: clamp(16px, 2.2vw, 26px);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(38px, 3.2vw, 48px);
  height: clamp(38px, 3.2vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.preview-cta::before,
.preview-cta::after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(20px, 1.65vw, 25px);
  font-weight: 400;
  line-height: 1;
  transition:
    opacity 180ms ease,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
}

.preview-cta::before {
  content: "↗";
  opacity: 1;
  color: #fff;
  transform: translate3d(0, -1px, 0) rotate(0deg);
}

.preview-cta::after {
  content: "→";
  opacity: 0;
  color: #6f6f6f;
  transform: translate3d(0, -1px, 0) rotate(-90deg);
}

.preview-media:hover .preview-cta,
.preview-media:focus-visible .preview-cta {
  border-color: #fff;
  background: #fff;
  transform: translate3d(0, 0, 0) scale(1.08);
}

.preview-media:hover .preview-cta::before,
.preview-media:focus-visible .preview-cta::before {
  opacity: 0;
  transform: translate3d(0, -1px, 0) rotate(90deg);
}

.preview-media:hover .preview-cta::after,
.preview-media:focus-visible .preview-cta::after {
  opacity: 1;
  transform: translate3d(0, -1px, 0) rotate(0deg);
}

.preview.is-changing img {
  opacity: 0.18;
  transform: translateY(8px);
}

.featured-case-copy p {
  margin: 0;
  color: var(--soft);
}

.featured-meta,
#previewMeta {
  max-width: 520px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.featured-meta {
  color: color-mix(in srgb, var(--white) 58%, transparent);
}

.featured-case-copy h2 {
  max-width: 720px;
  margin: 28px 0 0;
  font-family: var(--font-title);
  font-size: clamp(34px, 3.35vw, 56px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--white);
}

.featured-title--dense-zh {
  line-height: 1.08;
  margin-bottom: 4px;
}

.featured-title--dense-zh + p {
  margin-top: 24px;
}

.featured-case-copy #previewText {
  max-width: 520px;
  margin-top: 32px;
  color: color-mix(in srgb, var(--white) 68%, transparent);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.62;
}

.featured-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 42px;
}

.featured-metrics span {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
}

.featured-metrics span + span::before {
  content: "·";
  margin-right: 8px;
  color: color-mix(in srgb, var(--white) 34%, transparent);
}

.featured-metrics strong {
  display: inline-block;
  color: var(--white);
  font-family: var(--font-title);
  font-size: clamp(24px, 1.8vw, 32px);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.featured-metrics small {
  display: inline;
  margin-top: 0;
  color: color-mix(in srgb, var(--white) 56%, transparent);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.featured-focus-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 30px;
}

.featured-focus-list span {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.featured-focus-list span {
  display: inline-flex;
  align-items: center;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: color-mix(in srgb, var(--white) 60%, transparent);
  line-height: 1;
}

.featured-focus-list span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  margin-right: 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--white) 38%, transparent);
}

/* ─── About Panel ───────────────────────────────────────────────────────── */
.about-panel {
  width: min(var(--max), 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 112px clamp(24px, 4vw, 72px) 104px;
}

.about-panel h2 {
  margin: 0;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(68px, 11vw, 188px);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.045em;
  color: var(--white);
}

.about-content {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.72fr);
  gap: clamp(56px, 8vw, 136px);
  align-items: stretch;
  padding-top: clamp(72px, 10vh, 116px);
}

.about-copy {
  max-width: 860px;
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(22px, 2vw, 34px);
  line-height: 1.42;
  letter-spacing: -0.015em;
}

.about-copy p + p {
  margin-top: 44px;
}

.about-copy strong,
.about-lead {
  color: var(--white);
  font-weight: 500;
}

.about-resume {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  margin-top: auto;
  padding: 10px 16px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--soft);
  font-size: clamp(14px, 0.95vw, 16px);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  align-self: flex-end;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.about-resume::after {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  content: "↗";
  background: transparent;
  color: currentColor;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
  opacity: 1;
  transform: translate3d(0, -1px, 0);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.about-resume:hover,
.about-resume:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #070808;
  transform: translateX(3px);
}

.about-resume:hover::after,
.about-resume:focus-visible::after {
  transform: translate3d(2px, -2px, 0) rotate(45deg);
}

.about-timeline {
  display: flex;
  flex-direction: column;
  min-height: clamp(520px, 58vh, 680px);
  padding-top: 10px;
}

.about-timeline-kicker {
  margin: 0 0 30px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.about-role {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.about-role strong,
.about-role span {
  display: block;
}

.about-role strong {
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(18px, 1.35vw, 24px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.about-role span,
.about-role time {
  margin-top: 4px;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.35;
}

.about-role time {
  margin-top: 0;
  white-space: nowrap;
}

/* ─── Contact Footer ─────────────────────────────────────────────────────── */
.contact-footer {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(96px, 11vh, 132px) clamp(24px, 4vw, 72px) 40px;
}

.contact-kicker {
  margin: 0 0 48px;
  font-size: 13px;
  letter-spacing: 0.18em;
  font-weight: 500;
  color: var(--soft);
  text-transform: uppercase;
}

.contact-headline {
  display: block;
  margin: 0;
  width: min(100%, 1480px);
  font-family: var(--font-display);
  font-size: clamp(64px, 9.4vw, 168px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--white);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.contact-headline.blind-title {
  overflow: hidden;
}

.contact-headline .title-mask {
  transform: none !important;
  animation: none !important;
  overflow: hidden;
}

.contact-headline .contact-line1,
.contact-headline .contact-line2 {
  transform: translate3d(0, -108%, 0);
  will-change: transform;
}

.contact-headline .title-mask.is-line-visible .contact-line1,
.contact-headline .title-mask.is-line-visible .contact-line2 {
  animation: blind-title-down 650ms cubic-bezier(0.76, 0, 0.24, 1) 30ms both;
}

.contact-line1,
.contact-line2 {
  display: block;
  position: relative;
  color: var(--white);
  transition:
    color 420ms ease,
    transform 820ms cubic-bezier(0.76, 0, 0.24, 1);
}

.contact-line2 {
  padding-left: 0;
}

.contact-line2::before {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.02em;
  z-index: 1;
  height: clamp(4px, 0.42vw, 8px);
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 620ms cubic-bezier(0.76, 0, 0.24, 1);
}

.contact-line2::after {
  display: inline-block;
  margin-left: 0.16em;
  content: "↗";
  font-family: var(--font-body);
  font-size: 0.76em;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: 0.05em;
  transform: translate3d(0, 0, 0);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-headline:hover .contact-line2,
.contact-headline:focus-visible .contact-line2 {
  color: var(--accent);
}

.contact-headline:hover .contact-line2::before,
.contact-headline:focus-visible .contact-line2::before {
  transform: scaleX(1);
}

.contact-headline:hover .contact-line2::after,
.contact-headline:focus-visible .contact-line2::after {
  transform: translate3d(0.06em, -0.06em, 0);
}

[data-theme="light"] .contact-headline {
  color: var(--white);
}

[data-theme="light"] .contact-line1,
[data-theme="light"] .contact-line2 {
  color: var(--white);
}

[data-theme="light"] .contact-headline:hover .contact-line2,
[data-theme="light"] .contact-headline:focus-visible .contact-line2 {
  color: var(--accent);
}

[data-theme="light"] .contact-line2::before {
  background: var(--accent);
}

.contact-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  padding-top: clamp(28px, 4vh, 48px);
  border-top: 1px solid var(--line);
  margin-top: clamp(44px, 7vh, 84px);
  font-size: 13px;
  color: var(--soft);
  letter-spacing: 0.02em;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-info p {
  margin: 0;
}

.contact-copy {
  margin: 0;
}

/* ─── Case Study Page ────────────────────────────────────────────────────── */
.case-page h1,
.case-page h2,
.case-page h3 {
  font-family: var(--font-title);
}

.case-logo,
.floating-logo {
  font-family: var(--font-display);
}

.case-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--white);
  padding-bottom: 128px;
}

.case-page::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background: var(--ink);
  transition: background 400ms ease;
}

.case-topbar {
  border-bottom-color: var(--nav-line);
}

.detail-hero,
.detail-section {
  width: min(var(--detail), calc(100% - 112px));
  margin-left: auto;
  margin-right: auto;
}

.detail-wide-image {
  width: min(var(--detail-media), calc(100% - 112px));
  margin-left: auto;
  margin-right: auto;
}

.detail-contained-image {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  column-gap: clamp(36px, 5vw, 72px);
  width: min(var(--detail), calc(100% - 112px));
}

.detail-hero {
  padding-top: 142px;
}

.detail-hero .back-link {
  margin-bottom: 28px;
}

.detail-wide-image {
  overflow: hidden;
}

.detail-wide-image img {
  filter: saturate(0.92) contrast(0.96);
}

.case-placeholder {
  min-height: clamp(260px, 46vw, 620px);
  display: grid;
  align-content: end;
  gap: 10px;
  padding: clamp(22px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(215, 255, 47, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--ink);
  color: var(--white);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}

.case-placeholder::before {
  position: absolute;
  inset: 22px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  pointer-events: none;
}

.case-placeholder::after {
  position: absolute;
  top: 24px;
  right: 24px;
  width: min(38vw, 420px);
  height: min(26vw, 280px);
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.34;
  mask-image: linear-gradient(135deg, black, transparent 72%);
}

.detail-contained-image .case-placeholder {
  grid-column: 2;
  justify-self: start;
  width: 100%;
  max-width: var(--reading);
  min-height: clamp(240px, 34vw, 420px);
}

.case-placeholder span {
  width: fit-content;
  padding: 6px 9px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-placeholder strong {
  max-width: 620px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.case-placeholder p {
  max-width: 620px;
  margin: 0;
  color: var(--soft);
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.6;
}

[data-theme="light"] .case-placeholder {
  background:
    linear-gradient(135deg, rgba(98, 116, 0, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(20, 20, 20, 0.05), rgba(20, 20, 20, 0.01)),
    var(--paper);
}

.detail-hero h1 {
  max-width: var(--detail);
  font-size: clamp(34px, 4.2vw, 62px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--white);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.detail-intro {
  max-width: var(--detail);
  margin: 22px 0 0;
  color: color-mix(in srgb, var(--white) 72%, transparent);
  font-size: clamp(16px, 1.08vw, 18px);
  font-weight: 400;
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: var(--detail);
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.detail-meta div {
  min-width: 0;
}

.detail-meta strong {
  display: block;
  margin-bottom: 6px;
  color: var(--white);
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.detail-meta span,
.detail-section p,
.detail-section li,
.detail-wide-image figcaption,
.detail-outcomes span {
  color: color-mix(in srgb, var(--white) 70%, transparent);
  overflow-wrap: anywhere;
}

.detail-section {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  column-gap: clamp(36px, 5vw, 72px);
  margin-top: 82px;
}

.detail-section h2 {
  width: auto;
  margin: 0;
  color: var(--white);
  font-size: clamp(22px, 1.9vw, 34px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.detail-section > p,
.detail-section > ul,
.detail-section .insight-grid,
.detail-section .research-note,
.detail-section .strategy-list,
.detail-section .system-grid,
.detail-section .comparison-table,
.detail-section .detail-outcomes,
.detail-section .studio-placeholder {
  grid-column: 2;
  width: 100%;
  max-width: var(--reading);
  margin-left: 0;
  margin-right: 0;
}

.detail-section > p {
  max-width: var(--reading);
  margin: 0;
  font-size: clamp(16px, 1vw, 17px);
  font-weight: 400;
  line-height: 1.74;
}

.detail-section > p + p {
  margin-top: 14px;
}

.detail-section > ul {
  max-width: var(--reading);
  margin: 0;
  padding-left: 20px;
  font-size: clamp(16px, 1vw, 17px);
  font-weight: 400;
  line-height: 1.72;
}

.insight-grid,
.system-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.research-note {
  margin-top: 24px;
  padding: 4px 0 4px 18px;
  border-left: 1px solid var(--accent-line);
  background: transparent;
}

[data-theme="light"] .research-note {
  background: transparent;
}

.system-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  counter-reset: system-item;
}

.insight-grid div,
.strategy-list div {
  border: 0;
  background: transparent;
}

[data-theme="light"] .insight-grid div,
[data-theme="light"] .strategy-list div {
  background: transparent;
}

.system-grid div {
  counter-increment: system-item;
  border: 0;
  background: var(--ink);
}

[data-theme="light"] .system-grid div {
  background: color-mix(in srgb, var(--ink) 97%, var(--paper) 3%);
}

.insight-grid div,
.system-grid div {
  min-width: 0;
  min-height: 156px;
  padding: 24px;
  overflow-wrap: break-word;
}

.research-note strong,
.insight-grid strong,
.system-grid strong,
.strategy-list strong {
  display: block;
  margin-bottom: 10px;
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.system-grid strong::before {
  content: "0" counter(system-item);
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.research-note span,
.insight-grid span,
.system-grid span,
.strategy-list span {
  display: block;
  color: color-mix(in srgb, var(--white) 68%, transparent);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.62;
}

.strategy-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.strategy-list div {
  display: grid;
  grid-template-columns: minmax(180px, 0.24fr) minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 0;
}

.detail-wide-image img {
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: none;
  width: 100%;
  object-fit: cover;
  object-position: top center;
  background: var(--ink);
}

.detail-contained-image img {
  grid-column: 2;
  justify-self: start;
  aspect-ratio: auto;
  max-height: min(62vh, 680px);
  max-width: var(--reading);
  object-fit: cover;
  object-position: top center;
}

.detail-contained-image figcaption {
  grid-column: 2;
  justify-self: start;
  width: 100%;
  max-width: var(--reading);
}

.detail-wide-image figcaption {
  margin-top: 14px;
  color: var(--soft);
  text-align: center;
  font-size: 13px;
}

.detail-outcomes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px 34px;
  margin-top: 26px;
}

.detail-outcomes + p {
  margin-top: 30px;
}

.detail-outcomes div {
  padding: 0;
  border: 0;
}

.detail-outcomes strong {
  display: block;
  margin-bottom: 8px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}

.comparison-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 96%, var(--white) 4%);
}

[data-theme="light"] .comparison-table {
  background: color-mix(in srgb, var(--ink) 97%, var(--paper) 3%);
}

.comparison-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.comparison-table th {
  background: transparent;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

[data-theme="light"] .comparison-table th {
  background: transparent;
}

.comparison-table td {
  color: var(--soft);
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  width: 22%;
  color: var(--white);
  font-weight: 600;
}

.comparison-table th:nth-child(2),
.comparison-table td:nth-child(2) {
  width: 34%;
}

.comparison-table th:nth-child(3),
.comparison-table td:nth-child(3) {
  width: 44%;
}

.comparison-table tr:last-child td {
  border-bottom: 0;
}

.metric-strip {
  width: 100%;
  max-width: var(--detail);
  margin: 28px auto 0 0;
  padding-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  overflow-x: auto;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.metric-strip div {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  scroll-snap-align: start;
}

.metric-strip div + div::before {
  content: "·";
  margin-right: 8px;
  color: color-mix(in srgb, var(--white) 34%, transparent);
}

[data-theme="light"] .metric-strip div {
  background: transparent;
}

.metric-strip strong {
  display: inline-block;
  margin-bottom: 0;
  font-family: var(--font-display);
  color: var(--white);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.metric-strip span {
  color: color-mix(in srgb, var(--white) 56%, transparent);
  font-weight: 400;
  overflow-wrap: anywhere;
}

html[lang="zh"] body {
  text-spacing-trim: trim-start;
}

html[lang="zh"] .hero-kicker,
html[lang="zh"] .section-kicker,
html[lang="zh"] .featured-meta,
html[lang="zh"] #previewMeta,
html[lang="zh"] .featured-focus-list span,
html[lang="zh"] .featured-metrics small,
html[lang="zh"] .metric-strip span,
html[lang="zh"] .detail-meta strong,
html[lang="zh"] .case-rail a,
html[lang="zh"] .floating-case-nav a {
  letter-spacing: 0.04em;
}

html[lang="zh"] .hero-name,
html[lang="zh"] .work-heading h2,
html[lang="zh"] .about-panel h2,
html[lang="zh"] .contact-headline,
html[lang="zh"] .featured-case-copy h2,
html[lang="zh"] .detail-hero h1,
html[lang="zh"] .detail-section h2,
html[lang="zh"] .case-placeholder strong,
html[lang="zh"] .detail-outcomes strong {
  letter-spacing: 0;
}

html[lang="zh"] .featured-case-copy h2 {
  line-height: 1.16;
}

html[lang="zh"] .featured-title--dense-zh {
  line-height: 1.26;
}

html[lang="zh"] .featured-title--dense-zh + p {
  margin-top: 22px;
}

html[lang="zh"] .detail-hero h1 {
  line-height: 1.18;
}

html[lang="zh"] .detail-section h2 {
  line-height: 1.24;
}

html[lang="zh"] .detail-intro,
html[lang="zh"] .detail-section > p,
html[lang="zh"] .detail-section > ul,
html[lang="zh"] .detail-section li,
html[lang="zh"] .detail-outcomes span,
html[lang="zh"] .featured-case-copy #previewText,
html[lang="zh"] .about-copy p {
  line-height: 1.86;
}

html[lang="zh"] .featured-focus-list span + span::before {
  margin-right: 18px;
}

.floating-case-nav {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 12;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--nav-line);
  border-radius: 999px;
  background: var(--nav-bg);
  color: var(--white);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease, transform 220ms ease;
}

.floating-case-nav.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.floating-case-nav a {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--soft);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.floating-case-nav a:hover {
  border-color: var(--accent-line);
  color: var(--white);
}

.floating-case-nav a.is-active,
.floating-case-nav a[aria-current="true"] {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.floating-case-nav .floating-logo {
  min-width: 38px;
  border-color: transparent;
  border-radius: 999px;
  background: var(--white);
  font-size: 14px;
  color: var(--ink);
}

.floating-case-nav .floating-primary {
  border-color: transparent;
  background: var(--accent);
  color: #f8f8f6;
  font-weight: 700;
  min-width: 86px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-bottom: 48px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--soft);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.back-link::before {
  content: "↖";
  font-size: 16px;
  line-height: 1;
  transform: translate3d(0, -1px, 0) rotate(0deg);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.back-link:hover,
.back-link:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #070808;
  transform: translateX(-2px);
}

.back-link:hover::before,
.back-link:focus-visible::before {
  transform: translate3d(-3px, -1px, 0) rotate(-45deg);
}

.case-rail {
  position: fixed;
  top: 50%;
  right: clamp(20px, 2.6vw, 44px);
  z-index: 8;
  display: none;
  gap: 10px;
  transform: translateY(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.case-rail.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.case-rail a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 180ms ease, transform 180ms ease;
}

.case-rail a::before {
  width: 18px;
  height: 1px;
  grid-column: 1;
  content: "";
  background: currentColor;
  opacity: 0.55;
  transition: width 180ms ease, opacity 180ms ease;
}

.case-rail span {
  grid-column: 1;
  display: none;
}

.case-rail strong {
  grid-column: 2;
  font-weight: 500;
}

.case-rail a:hover,
.case-rail a.is-active,
.case-rail a[aria-current="true"] {
  color: var(--white);
  transform: translateX(-4px);
}

.case-rail a.is-active::before,
.case-rail a[aria-current="true"]::before {
  width: 28px;
  opacity: 1;
  background: var(--accent);
}

@media (min-width: 1440px) {
  .case-rail {
    display: grid;
  }
}

/* ─── Resume Page ───────────────────────────────────────────────────────── */
.resume-page main {
  padding-bottom: 80px;
}

.resume-page .detail-hero {
  padding-top: 132px;
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 26px;
  color: var(--soft);
  font-size: 14px;
}

.resume-contact a {
  color: var(--white);
}

.resume-list {
  grid-column: 2;
  display: grid;
  gap: 18px;
  max-width: var(--reading);
}

.resume-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.resume-item:first-child {
  padding-top: 0;
}

.resume-item header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 10px;
}

.resume-item h3 {
  margin: 0;
  color: var(--white);
  font-size: clamp(18px, 1.35vw, 24px);
  line-height: 1.16;
  letter-spacing: -0.01em;
}

.resume-item time,
.resume-item p,
.resume-item li {
  color: var(--soft);
}

.resume-item time {
  white-space: nowrap;
  font-size: 14px;
}

.resume-item p {
  margin: 0 0 10px;
  line-height: 1.65;
}

.resume-item ul {
  margin: 0;
  padding-left: 18px;
}

.resume-item li {
  margin-top: 6px;
  line-height: 1.62;
}

.resume-tags {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: var(--reading);
}

.resume-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--soft);
  font-size: 13px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .topbar {
    padding: 24px;
  }

  .nav-links {
    gap: 10px;
    font-size: 11px;
  }

  .nav-links a::before {
    font-size: 9px;
  }

  .nav-links a[data-i18n="nav-contact"] {
    display: none;
  }

  .theme-toggle,
  .lang-toggle {
    height: 28px;
    padding: 0 4px;
    font-size: 10px;
  }

  .theme-toggle + .lang-toggle {
    margin-left: -8px;
  }

  .hero-name {
    font-size: clamp(54px, 17vw, 120px);
  }

  .hero-tags {
    position: static;
    margin-top: 32px;
    align-items: flex-start;
  }

  .work-stage {
    grid-template-columns: 1fr;
    padding-top: 92px;
  }

  .featured-case,
  .preview {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .work-heading {
    margin-bottom: 0;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-timeline {
    min-height: auto;
  }

  .about-resume {
    align-self: flex-start;
    margin-top: 40px;
  }

  .about-copy p {
    font-size: clamp(22px, 4.2vw, 32px);
  }

  .preview-media,
  .featured-cover {
    height: auto;
  }

  .contact-headline {
    font-size: clamp(56px, 15vw, 132px);
  }

  .contact-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .detail-hero,
  .detail-section,
  .detail-wide-image {
    width: min(100% - 48px, 960px);
  }

  .detail-section {
    grid-template-columns: 1fr;
    row-gap: 22px;
  }

  .detail-contained-image {
    display: block;
  }

  .detail-section > p,
  .detail-section > ul,
  .detail-section .insight-grid,
  .detail-section .research-note,
  .detail-section .strategy-list,
  .detail-section .system-grid,
  .detail-section .comparison-table,
  .detail-section .detail-outcomes,
  .resume-list,
  .resume-tags {
    grid-column: 1;
  }

  .detail-meta,
  .detail-outcomes {
    grid-template-columns: 1fr 1fr;
  }

  .insight-grid,
  .system-grid {
    grid-template-columns: 1fr 1fr;
  }

  .strategy-list div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .floating-case-nav {
    max-width: calc(100% - 28px);
    overflow-x: auto;
    bottom: 14px;
  }

  .case-rail {
    display: none;
  }
}

@media (max-width: 760px) {
  #home,
  #works,
  #about,
  #contact,
  .detail-hero,
  .detail-section {
    scroll-margin-top: 84px;
  }

  body.nav-open {
    overflow: hidden;
  }

  .topbar {
    z-index: 30;
    padding: 20px 24px;
  }

  .brand {
    font-size: clamp(17px, 5vw, 22px);
  }

  .nav-menu-toggle {
    display: inline-flex;
  }

  .nav-links,
  .case-links {
    position: fixed;
    top: 78px;
    left: 16px;
    right: 16px;
    display: grid;
    gap: 0;
    padding: 8px 0;
    border: 1px solid var(--nav-line);
    background: var(--ink);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -10px, 0) scale(0.985);
    transform-origin: top center;
    transition:
      opacity 180ms ease,
      visibility 180ms ease,
      transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  [data-theme="light"] .nav-links,
  [data-theme="light"] .case-links {
    background: var(--ink);
    box-shadow: 0 24px 80px rgba(20, 20, 20, 0.14);
  }

  .topbar.is-nav-open .nav-links,
  .topbar.is-nav-open .case-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
  }

  .nav-links a,
  .nav-links a[data-i18n="nav-contact"] {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    min-height: 54px;
    padding: 0 18px;
    border-bottom: 1px solid var(--nav-line);
    font-size: 15px;
    letter-spacing: 0.08em;
    opacity: 1;
  }

  .nav-links a::before {
    font-size: 11px;
  }

  .nav-links a::after {
    display: none;
  }

  .theme-toggle,
  .lang-toggle {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-content: stretch;
    min-height: 54px;
    width: 100%;
    padding: 0 18px;
    border-bottom: 1px solid var(--nav-line);
    color: var(--soft);
    font-size: 15px;
    letter-spacing: 0.08em;
    text-align: left;
  }

  .theme-toggle + .lang-toggle {
    margin-left: 0;
  }

  .theme-toggle::before,
  .lang-toggle::before {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .theme-toggle::before {
    content: "THEME";
  }

  .lang-toggle::before {
    content: "LANG";
  }

  .theme-toggle::after,
  .lang-toggle::after {
    content: "";
    margin: 0;
  }

  .theme-label,
  .lang-text {
    color: var(--white);
  }

  .lang-toggle {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .loader-mark {
    width: calc(100% - 40px);
    font-size: clamp(34px, 10.4vw, 66px);
  }

  .hero-name {
    font-size: clamp(48px, 18vw, 96px);
  }

  .about-panel {
    padding-top: 96px;
  }

  .about-panel h2 {
    font-size: clamp(52px, 18vw, 92px);
  }

  .work-heading h2 {
    font-size: clamp(52px, 19vw, 96px);
  }

  .about-content {
    padding-top: 52px;
  }

  .about-copy p {
    font-size: clamp(20px, 6vw, 30px);
  }

  .about-role {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .project-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .project-type {
    grid-column: 2;
    padding-bottom: 0;
  }

  .preview-media,
  .featured-cover {
    height: auto;
  }

  .preview-cta {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  .featured-metrics {
    gap: 12px 18px;
  }

  .featured-case-copy h2 {
    font-size: clamp(32px, 9vw, 48px);
  }

  .contact-headline {
    font-size: clamp(42px, 16vw, 78px);
  }

  .contact-line2 {
    padding-left: 0;
  }

  .detail-hero {
    padding-top: 104px;
  }

  .detail-hero,
  .detail-section,
  .detail-wide-image {
    width: min(calc(100vw - 48px), 920px);
  }

  .detail-meta,
  .detail-outcomes {
    grid-template-columns: 1fr;
  }

  .insight-grid,
  .system-grid {
    grid-template-columns: 1fr;
  }

  .system-grid {
    gap: 1px;
  }

  .system-grid div {
    min-height: auto;
    padding: 20px;
  }

  .comparison-table {
    overflow: visible;
    border-radius: 8px;
    background: transparent;
  }

  .comparison-table table,
  .comparison-table thead,
  .comparison-table tbody,
  .comparison-table tr,
  .comparison-table th,
  .comparison-table td {
    display: block;
  }

  .comparison-table table {
    min-width: 0;
  }

  .comparison-table thead {
    display: none;
  }

  .comparison-table tr {
    padding: 20px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--ink) 96%, var(--white) 4%);
  }

  [data-theme="light"] .comparison-table tr {
    background: color-mix(in srgb, var(--ink) 97%, var(--paper) 3%);
  }

  .comparison-table tr + tr {
    border-top: 0;
  }

  .comparison-table td {
    width: auto;
    padding: 0;
    border: 0;
    font-size: 15px;
    line-height: 1.58;
  }

  .comparison-table td + td {
    margin-top: 14px;
  }

  .comparison-table td:first-child {
    width: auto;
    margin-bottom: 16px;
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
  }

  .comparison-table td:nth-child(2),
  .comparison-table td:nth-child(3) {
    width: auto;
  }

  .comparison-table td:nth-child(2)::before {
    content: "Before";
  }

  .comparison-table td:nth-child(3)::before {
    content: "After";
  }

  .comparison-table td:nth-child(2)::before,
  .comparison-table td:nth-child(3)::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .detail-hero h1 {
    font-size: clamp(30px, 8.4vw, 42px);
    line-height: 1.08;
  }

  .detail-section {
    margin-top: 68px;
  }

  .detail-contained-image img,
  .detail-contained-image figcaption,
  .detail-contained-image .case-placeholder {
    max-width: none;
  }

  .detail-section h2 {
    font-size: clamp(21px, 7vw, 30px);
  }

  .case-placeholder {
    min-height: 260px;
    padding: 22px;
  }

  .case-placeholder::before {
    inset: 12px;
  }

  .case-placeholder strong {
    font-size: clamp(22px, 7vw, 34px);
  }

  .metric-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    overflow: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .metric-strip div {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
    min-width: 0;
    padding: 0;
  }

  .metric-strip div + div::before {
    content: none;
    display: none;
  }

  .metric-strip strong {
    font-size: 27px;
    line-height: 1.05;
  }

  .metric-strip span {
    font-size: 17px;
    line-height: 1.48;
    max-width: 240px;
    overflow-wrap: break-word;
  }

  html[lang="zh"] .metric-strip span {
    letter-spacing: 0;
  }

  html[lang="zh"] .detail-intro,
  html[lang="zh"] .detail-meta span,
  html[lang="zh"] .metric-strip span {
    word-break: break-all;
  }

  .floating-case-nav a {
    min-height: 38px;
    padding: 0 11px;
    white-space: nowrap;
  }

  .floating-case-nav .floating-logo {
    min-width: 42px;
  }

  .floating-case-nav .floating-primary {
    min-width: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
