:root {
  --bg: #f8f8f8;
  --bg-alt: #f4f3f8;
  --ink: #202020;
  --ink-2: oklch(42% 0.012 255);
  --ink-3: oklch(60% 0.01 255);
  --accent: #f09d4d;
  --rule: oklch(88% 0.006 260);
  --surface-dark: #202020;
  --surface-beli: #f09d4d;
  --text-on-dark: #ffffff;
  --text-on-beli: #f8f8f8;

  --font-display: "Instrument Sans", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;

  --fs-sm: 13px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-24: 96px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

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

img,
video {
  display: block;
  max-width: 100%;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--accent) 72%, white);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 300;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
}

.skip-link:focus {
  top: 16px;
}

.shell {
  width: min(100% - 48px, 860px);
  margin: 0 auto;
}

.shell--narrow {
  width: min(100% - 48px, 820px);
}

.shell--projects {
  width: min(100% - 48px, 860px);
}

.shell--content {
  width: min(100% - 48px, 680px);
}

nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: oklch(99% 0.004 75 / 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--rule);
  border-radius: 100px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 2px;
  box-shadow: 0 4px 24px oklch(0% 0 0 / 0.07), 0 1px 4px oklch(0% 0 0 / 0.04);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  padding: 7px 16px;
  border-radius: 100px;
  transition: color 0.18s, background 0.18s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
}

.nav-link:hover {
  background: oklch(93% 0.008 75 / 0.6);
}

.nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.nav-link.active .nav-dot {
  opacity: 1;
  transform: scale(1);
}

.nav-hamburger {
  display: none;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  align-items: center;
  margin: 0 auto;
  padding: 140px 0 40px;
}

.hero-left {
  min-width: 0;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 54px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 12px;
  overflow-wrap: break-word;
}

.hero-chinese {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0 0 var(--sp-6);
  line-height: 1.5;
}

.hero-body {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 660px;
}

.hero-cta-row {
  margin-top: var(--sp-12);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

.btn-primary,
.btn-ghost {
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: var(--sp-3) var(--sp-6);
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  font-weight: 600;
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-ghost {
  font-weight: 500;
  background: transparent;
  color: var(--ink-2);
  border-color: var(--rule);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

.projects-inner {
  padding-top: 40px;
  padding-bottom: 80px;
}

.projects-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--sp-12);
}

.projects-title,
.origin-title,
.about-right-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 32px;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  height: 100%;
}

.project-card:hover {
  box-shadow: 0 8px 32px oklch(0% 0 0 / 0.08);
  transform: translateY(-2px);
}

.project-card-left {
  grid-column: 1 / 3;
  flex-direction: row;
  min-height: 280px;
}

.project-card-left .project-card-visual {
  width: 55%;
  aspect-ratio: auto;
  flex-shrink: 0;
  order: 2;
}

.project-card-left .project-card-body {
  width: 45%;
  order: 1;
  padding: var(--sp-8);
}

.project-card-visual {
  width: 100%;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-radius: 12px 12px 0 0;
}

.project-card-visual video {
  width: 100%;
  height: 100%;
}

.project-card-left .project-card-visual {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}

.project-card-right .project-card-visual {
  aspect-ratio: 16 / 9;
}

.project-card-body {
  padding: var(--sp-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.project-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.project-card-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink-3);
  padding: 4px 8px;
  border-radius: 100px;
  width: fit-content;
}

.project-card-badge.coming-soon {
  background: oklch(55% 0.12 160);
}

.project-card-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.project-card-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-3);
}

.project-card-tags {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.project-card-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  padding: 3px 8px;
  border-radius: 4px;
}

.project-card-arrow {
  font-size: 12px;
  color: var(--ink-3);
  transition: transform 0.15s, color 0.15s;
}

.project-card:hover .project-card-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.visual-lumiere {
  background: linear-gradient(135deg, oklch(75% 0.12 55) 0%, oklch(65% 0.14 35) 50%, oklch(55% 0.1 20) 100%);
}

.visual-lumiere video {
  object-fit: cover;
}

.visual-zeitro {
  background: linear-gradient(135deg, oklch(72% 0.1 230) 0%, oklch(60% 0.14 255) 60%, oklch(50% 0.12 280) 100%);
  padding: var(--sp-4);
}

.visual-zeitro video {
  object-fit: contain;
}

.visual-apartment {
  background: linear-gradient(135deg, oklch(80% 0.08 320) 0%, oklch(68% 0.12 290) 60%, oklch(58% 0.1 260) 100%);
}

.mockup {
  width: 75%;
  max-width: 320px;
  background: oklch(100% 0 0 / 0.12);
  border-radius: 8px;
  border: 1px solid oklch(100% 0 0 / 0.2);
  backdrop-filter: blur(8px);
  padding: var(--sp-4);
}

.mockup-bar {
  height: 8px;
  background: oklch(100% 0 0 / 0.3);
  margin-bottom: var(--sp-2);
}

.mockup-bar.short {
  width: 55%;
}

.mockup-line {
  height: 6px;
  background: oklch(100% 0 0 / 0.18);
  border-radius: 3px;
  margin-bottom: var(--sp-2);
}

.mockup-line.short {
  width: 60%;
}

.mockup-dot-row {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(100% 0 0 / 0.4);
}

.origin {
  background: var(--surface-dark);
  color: var(--text-on-dark);
}

.origin-inner,
.about-left {
  padding: 60px 0;
}

.origin-title {
  color: var(--text-on-dark);
}

.origin-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  max-width: 720px;
}

.origin-body p {
  margin: 0;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  color: #fff;
}

.about {
  display: block;
  border-bottom: 1px solid var(--rule);
}

.about-right {
  background: var(--bg);
  padding: 60px 0;
}

.about-right-inner {
  padding: 0;
}

.about-right-title {
  margin-bottom: 16px;
}

.about-right-sub {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 460px;
}

.contact-links {
  display: flex;
  flex-direction: column;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--rule);
  transition: gap 0.15s;
}

.contact-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.contact-item:hover {
  gap: var(--sp-6);
}

.contact-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.contact-item:hover .contact-icon {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.contact-info {
  flex: 1;
}

.contact-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--sp-1);
}

.contact-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.contact-arrow {
  font-size: 16px;
  color: var(--ink-3);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.15s, transform 0.15s;
}

.contact-item:hover .contact-arrow {
  opacity: 1;
  transform: translateX(0);
}

.beyond-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.beyond-card {
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  overflow: hidden;
}

.beyond-card--puzzle {
  grid-column: 1 / -1;
  height: auto;
  min-height: unset;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-6);
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding: 20px;
}

.beyond-card--beli {
  background: var(--surface-beli);
  color: var(--text-on-beli);
  transition: opacity 0.15s;
  padding: 20px;
}

.beyond-card--beli:hover {
  opacity: 0.92;
}

.beyond-beli-inner {
  display: flex;
  height: 100%;
  gap: var(--sp-4);
  align-items: stretch;
}

.beyond-beli-left {
  flex: 0 0 34%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
}

.beyond-beli-right {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0;
  overflow: hidden;
}

.beyond-beli-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.beyond-card--os {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  justify-content: flex-end;
  padding: 20px;
}

.beyond-card-top {
  flex: 1;
}

.beyond-beli-icon {
  font-size: 40px;
  display: block;
  margin-bottom: var(--sp-4);
}

.beyond-beli-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.2;
}

.beyond-os-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 300;
  line-height: 1.3;
}

.beyond-os-text--lg {
  font-size: clamp(18px, 2.2vw, 22px);
}

.beyond-os-text em {
  color: var(--accent);
  font-style: italic;
}

.beyond-albums {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.beyond-album-link {
  flex: 1;
  min-width: 0;
  border-radius: 6px;
  overflow: hidden;
  transition: opacity 0.15s;
}

.beyond-album-link:hover {
  opacity: 0.8;
}

.beyond-album {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.beyond-puzzle-inner {
  display: flex;
  align-items: flex-start;
  width: 100%;
  height: auto;
  gap: var(--sp-4);
}

.beyond-puzzle-text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
  padding: 0;
  justify-content: flex-start;
}

.beyond-puzzle-photos {
  display: inline-flex;
  gap: var(--sp-4);
  flex-shrink: 0;
  padding: 0;
  align-items: flex-start;
  align-self: flex-start;
  height: auto;
}

.beyond-puzzle-photo {
  height: 220px;
  width: auto;
  object-fit: cover;
  border-radius: 8px;
}

.beyond-card--books {
  grid-column: 1 / -1;
  background: var(--surface-beli);
  color: var(--text-on-beli);
  padding: 20px;
}

.beyond-books-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-3);
}

.beyond-books-text {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 0;
}

.beyond-books-heading {
  color: var(--text-on-beli);
  white-space: nowrap;
}

.beyond-book-covers {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-2);
  align-items: start;
}

.book-cover {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.book-cover__image {
  width: 100%;
  aspect-ratio: 3 / 4.4;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 0 0 1px oklch(0% 0 0 / 0.08);
}

footer {
  border-top: 1px solid var(--rule);
  padding: var(--sp-6) 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.footer-copy {
  font-size: 14px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.footer-copy--right {
  text-align: right;
}

.back-to-top {
  position: fixed;
  bottom: var(--sp-8);
  right: var(--sp-8);
  z-index: 200;
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  font-size: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s;
  pointer-events: none;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent);
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 60px;
  }

  nav {
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    border-radius: 0;
    height: 56px;
    max-width: 100%;
    width: 100%;
    padding: 0 16px;
    justify-content: flex-end;
    border: none;
    box-shadow: none;
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: border-color 0.2s;
  }

  nav.nav-scrolled {
    border-bottom: 1px solid var(--rule);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: oklch(99% 0.004 75 / 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--rule);
    padding: 8px 0;
  }

  nav.nav-open .nav-links {
    display: flex;
  }

  .nav-hamburger {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
  }

  .nav-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
  }

  nav.nav-open .nav-hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  nav.nav-open .nav-hamburger span:nth-child(2) {
    opacity: 0;
  }

  nav.nav-open .nav-hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-link {
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 0;
    letter-spacing: normal;
  }

  .nav-dot {
    width: 6px;
    height: 6px;
  }

  .hero {
    gap: 16px;
    padding: 120px 0 40px;
    min-height: auto;
  }

  .shell,
  .shell--narrow,
  .shell--projects,
  .shell--content {
    width: min(100% - 48px, 860px);
  }

  .projects-inner {
    padding-top: 40px;
    padding-bottom: 60px;
  }

  .projects-header {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  .project-card-left {
    grid-column: 1;
    flex-direction: column;
    min-height: auto;
  }

  .project-card-left .project-card-visual,
  .project-card-left .project-card-body {
    width: 100%;
    order: initial;
  }

  .project-card-left .project-card-visual {
    aspect-ratio: 16 / 9;
  }

  .project-card-left .project-card-body {
    padding: var(--sp-6);
  }

  .origin-inner {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .about-left {
    padding-top: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--rule);
  }

  .about-right {
    padding: 60px 0;
  }

  .about-right-inner {
    padding: 0 24px;
  }

  .beyond-bento {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .beyond-card {
    min-height: unset;
  }

  .beyond-card--puzzle {
    grid-column: 1;
    height: auto;
    padding: 20px;
    gap: var(--sp-3);
  }

  .beyond-card--books {
    grid-column: 1;
    padding: 20px;
  }

  .beyond-puzzle-inner {
    flex-direction: column;
    gap: var(--sp-3);
  }

  .beyond-puzzle-text {
    padding: 0;
    height: auto;
  }

  .beyond-puzzle-photos {
    width: 100%;
    padding: 0;
    gap: var(--sp-2);
  }

  .beyond-puzzle-photo {
    flex: 1;
    height: 160px;
  }

  .beyond-books-inner {
    gap: var(--sp-4);
  }

  .beyond-books-text {
    justify-content: flex-start;
  }

  .beyond-book-covers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .book-cover {
    min-height: auto;
  }

  .beyond-card--beli {
    padding: 20px;
  }

  .beyond-beli-inner {
    flex-direction: row;
  }

  .beyond-beli-left {
    padding: 0;
  }

  .beyond-beli-right {
    width: 45%;
    padding: 0;
    overflow: hidden;
  }

  .beyond-beli-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
  }

  .beyond-card--os {
    overflow: hidden;
  }

  .beyond-albums {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
    margin-top: var(--sp-3);
  }

  .beyond-album-link {
    flex: none;
  }

  .beyond-os-text--lg,
  .beyond-os-text {
    font-size: 16px;
  }

  .beyond-beli-text {
    font-size: 14px;
  }

  .hero-body,
  .origin-body p,
  .about-right-sub {
    font-size: 14px;
  }

  .contact-arrow {
    font-size: 14px;
  }

  .projects-title,
  .origin-title,
  .about-right-title {
    margin-bottom: 24px;
    font-size: 24px;
  }

  .hero-cta-row {
    margin-top: 16px;
  }

  footer {
    padding: var(--sp-6) 0;
  }

  .footer-copy {
    font-size: 12px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-copy--right {
    text-align: left;
  }

  .footer-inner {
    padding: 0;
  }

  .desktop-br {
    display: none;
  }
}

@media (max-width: 480px) {
  .shell,
  .shell--narrow,
  .shell--projects,
  .shell--content {
    width: min(100% - 32px, 860px);
  }

  .beyond-book-covers {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .beyond-books-heading {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
