:root {
  --paper: #e8e7e1;
  --ink: #20201e;
  --rule: rgba(32, 32, 30, 0.5);
  --spine-width: clamp(20rem, 27vw, 32rem);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  color-scheme: light;
}

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

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid currentColor;
  background: var(--paper);
  font-size: 0.82rem;
  text-decoration: none;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.spine {
  position: fixed;
  z-index: 10;
  inset: 0 auto 0 0;
  display: grid;
  width: var(--spine-width);
  padding: clamp(1.5rem, 3.2vw, 3.75rem) clamp(1.5rem, 3vw, 3.4rem) clamp(1.4rem, 2.4vw, 2.7rem);
  grid-template-rows: auto 1fr auto;
  border-right: 1px solid var(--ink);
  background: var(--paper);
}

.spine-title h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", var(--serif);
  font-size: clamp(3.2rem, 6.1vw, 7.5rem);
  font-weight: 500;
  letter-spacing: -0.085em;
  line-height: 0.84;
  text-transform: uppercase;
}

.spine-title h1 span {
  display: block;
}

.spine-statement {
  align-self: center;
  max-width: 19rem;
  padding-top: 2rem;
}

.spine-headline {
  margin: 0 0 clamp(1.6rem, 3vh, 3rem);
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.28;
}

.spine-description {
  max-width: 16rem;
  margin: 0;
  padding-top: 1.7rem;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: clamp(1rem, 1.2vw, 1.3rem);
  line-height: 1.75;
}

.spine-utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.spine-utility a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.spine-utility svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.2;
}

.showcase {
  display: flex;
  width: calc(100% - var(--spine-width));
  height: 100svh;
  margin-left: var(--spine-width);
  flex-direction: column;
  background: var(--paper);
}

.project-leaf {
  --accent: #e6502e;
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  flex: 1 1 0;
  border-bottom: 1px solid var(--ink);
  background: var(--leaf-bg, var(--paper));
  color: var(--ink);
  text-decoration: none;
  transition: flex-grow 650ms cubic-bezier(0.22, 1, 0.36, 1), background-color 250ms ease;
}

.project-leaf:last-child {
  border-bottom: 0;
}

.project-leaf.is-active {
  flex-grow: 2.25;
}

.project-leaf--tea {
  --accent: #ee4b25;
  --leaf-bg: #f3eee4;
}

.project-leaf--curry {
  --accent: #9b5b18;
  --leaf-bg: #eee8de;
}

.project-leaf--marriage {
  --accent: #4f615f;
  --leaf-bg: #e8e7e1;
}

.hinge-dot {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 0;
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.leaf-copy {
  position: relative;
  z-index: 3;
  display: grid;
  width: 52%;
  height: 100%;
  min-height: 0;
  padding: clamp(1.25rem, 3vw, 3.5rem) clamp(1.2rem, 3vw, 3.6rem);
  grid-template-columns: clamp(3.6rem, 7vw, 7.5rem) 1fr;
  grid-template-rows: 1fr auto;
  gap: 0 clamp(1rem, 2vw, 2.4rem);
}

.leaf-number {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", var(--serif);
  font-size: clamp(2.8rem, 5.8vw, 7rem);
  font-variant-numeric: lining-nums;
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.82;
  transition: font-size 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.leaf-text {
  align-self: start;
  min-width: 0;
}

.leaf-rule {
  display: block;
  width: 2rem;
  height: 2px;
  margin: 0.25rem 0 clamp(0.7rem, 2vh, 1.8rem);
  background: var(--accent);
}

.leaf-title {
  display: block;
  max-width: 24rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.1vw, 2.65rem);
  font-weight: 400;
  line-height: 1.22;
}

.leaf-description {
  display: block;
  max-width: 20rem;
  margin-top: clamp(0.65rem, 2vh, 1.5rem);
  font-family: var(--serif);
  font-size: clamp(0.82rem, 1vw, 1.08rem);
  line-height: 1.7;
  opacity: 0.82;
}

.leaf-action {
  display: inline-flex;
  align-self: end;
  align-items: center;
  grid-column: 2;
  gap: 0.9rem;
  padding-bottom: 0.1rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.leaf-action svg {
  width: 2.6rem;
  height: 1.1rem;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.3;
  transition: transform 240ms ease;
}

.leaf-image {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 52%;
  overflow: hidden;
  background: #d8d6cf;
}

.leaf-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.035);
  transition: transform 850ms cubic-bezier(0.22, 1, 0.36, 1), filter 350ms ease;
}

.project-leaf--tea .leaf-image img {
  object-position: 53% 53%;
}

.project-leaf--curry .leaf-image img {
  object-position: 52% 57%;
}

.project-leaf--marriage .leaf-image img {
  object-position: 61% 48%;
}

.project-leaf:not(.is-active) .leaf-image img {
  filter: saturate(0.84) brightness(0.94);
}

.project-leaf:hover .leaf-action svg,
.project-leaf:focus-visible .leaf-action svg,
.project-leaf.is-active .leaf-action svg {
  transform: translateX(0.38rem);
}

.project-leaf.is-active .leaf-image img {
  transform: scale(1);
}

.project-leaf:focus-visible,
.spine-utility a:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid #1e55d6;
  outline-offset: -4px;
}

@media (max-height: 760px) and (min-width: 901px) {
  .spine {
    padding-top: 1.7rem;
    padding-bottom: 1.5rem;
  }

  .spine-title h1 {
    font-size: clamp(3rem, 5vw, 5.4rem);
  }

  .spine-headline {
    margin-bottom: 1.25rem;
    font-size: clamp(2rem, 3.4vw, 3.4rem);
  }

  .spine-description {
    padding-top: 1rem;
    font-size: 0.92rem;
  }

  .leaf-copy {
    padding-top: 1.3rem;
    padding-bottom: 1.3rem;
  }

  .leaf-description {
    margin-top: 0.55rem;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .spine {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 84svh;
    padding: 1.4rem 1.25rem 1.25rem;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .spine-title h1 {
    max-width: 100%;
    font-size: clamp(3.6rem, 20vw, 7.6rem);
    line-height: 0.82;
  }

  .spine-statement {
    align-self: end;
    padding: 4rem 0 2.5rem;
  }

  .spine-headline {
    font-size: clamp(2.7rem, 12vw, 5.3rem);
  }

  .spine-description {
    max-width: 18rem;
  }

  .showcase {
    display: block;
    width: 100%;
    height: auto;
    margin-left: 0;
  }

  .project-leaf,
  .project-leaf.is-active {
    min-height: 78svh;
    border-bottom: 1px solid var(--ink);
  }

  .hinge-dot {
    top: 0;
    left: 1.25rem;
    transform: translate(-50%, -50%);
  }

  .leaf-copy {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 48%;
    padding: 1.45rem 1.25rem;
    grid-template-columns: minmax(3.3rem, 19vw) 1fr;
    background: var(--leaf-bg);
  }

  .leaf-number {
    font-size: clamp(3.6rem, 17vw, 6.5rem);
  }

  .leaf-title {
    font-size: clamp(1.5rem, 7vw, 2.55rem);
  }

  .leaf-description {
    font-size: 0.92rem;
  }

  .leaf-image {
    inset: 48% 0 0;
  }

  .project-leaf:not(.is-active) .leaf-image img {
    filter: none;
  }
}

@media (max-width: 430px) {
  .spine-title h1 {
    font-size: clamp(3.1rem, 18vw, 5.2rem);
  }

  .spine-utility {
    font-size: 0.72rem;
  }

  .leaf-copy {
    grid-template-columns: 3.7rem 1fr;
    gap: 0 0.8rem;
  }

  .leaf-number {
    font-size: 3.6rem;
  }

  .leaf-title {
    font-size: clamp(1.35rem, 6.5vw, 2rem);
  }
}

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