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

html {
  --bg: #f3f2f9;
  --ink: #454a66;
  --ink-soft: #676d86;
  --ink-strong: #2f344a;
  --line: rgba(86, 92, 120, 0.3);
  --line-strong: rgba(86, 92, 120, 0.55);
  /* One type scale for the whole site. Display sizes stay fluid. */
  --fs-xs: 13px;
  --fs-sm: 15px;
  --fs-md: 17px;
  --fs-lg: 22px;
  --fs-xl: clamp(28px, 2.4vw, 36px);
  --fs-display: clamp(48px, 5.2vw, 72px);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #2e3245;
  --ink: #e7ebf6;
  --ink-soft: #a3aac2;
  --ink-strong: #f8f9fd;
  --line: rgba(231, 235, 246, 0.2);
  --line-strong: rgba(231, 235, 246, 0.45);
  color-scheme: dark;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: "Noto Sans SC", Outfit, sans-serif;
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background 0.45s ease, color 0.45s ease;
}

h1,
h2,
p,
ul,
ol {
  margin: 0;
}

button,
a {
  font: inherit;
  color: inherit;
  touch-action: manipulation;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  text-decoration: none;
}

::selection {
  background: #d7f3c4;
  color: #2c3148;
}

html[data-theme="dark"] ::selection {
  background: #3c4d62;
  color: #f4f5fc;
}

:focus-visible {
  outline: 1.5px solid var(--ink-strong);
  outline-offset: 4px;
  border-radius: 2px;
}

#scene,
.fallback,
.wash {
  position: fixed;
  inset: 0;
}

#scene {
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  transition: filter 0.45s ease;
}

/* The pastel pigment glows too hard on a dark ground, so tone it down. */
html[data-theme="dark"] #scene,
html[data-theme="dark"] .fallback {
  filter: saturate(0.8) brightness(0.9);
}

.fallback {
  z-index: 0;
  display: none;
  pointer-events: none;
}

html.no-scene .fallback {
  display: block;
}

.orb {
  position: absolute;
  filter: blur(2px);
}

.orb-a {
  width: 42vw;
  height: 28vw;
  left: -8vw;
  top: -6vh;
  background: linear-gradient(120deg, #e7f3a6, #9ee6c6 70%, #f7e7a4);
  border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
}

.orb-b {
  width: 18vw;
  height: 18vw;
  left: 42vw;
  top: -8vh;
  background: radial-gradient(circle at 40% 40%, #f8d5e0, #f3c2d0);
  border-radius: 50%;
}

.orb-c {
  width: 38vw;
  height: 26vw;
  right: -8vw;
  top: 4vh;
  background: linear-gradient(100deg, #f8e3a8, #f6c6c4);
  border-radius: 48% 52% 40% 60% / 55% 40% 60% 45%;
}

.orb-d {
  width: 36vw;
  height: 32vw;
  left: -6vw;
  bottom: -10vh;
  background: linear-gradient(160deg, #d9d6f8, #f3c4d6 55%, #c9d6f8);
  border-radius: 46% 54% 60% 40% / 50% 42% 58% 50%;
}

.orb-e {
  width: 34vw;
  height: 34vw;
  right: -4vw;
  bottom: -12vh;
  background: linear-gradient(140deg, #c9f3e6, #b5def6 60%, #e5f6cc);
  border-radius: 60% 40% 46% 54% / 46% 58% 42% 54%;
}

.wash {
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
  filter: blur(18px);
}

.wash-work {
  inset: auto -16vw 4vh auto;
  width: 32vw;
  height: 58vh;
  background: radial-gradient(closest-side, rgba(186, 230, 168, 0.95), rgba(186, 230, 168, 0.15) 62%, transparent 74%);
}

.wash-about {
  inset: auto auto -16vh -4vw;
  width: 42vw;
  height: 36vh;
  background: radial-gradient(closest-side, rgba(156, 220, 228, 0.9), rgba(198, 186, 242, 0.28) 60%, transparent 74%);
}

.wash-contact {
  inset: 16vh auto auto 30vw;
  width: 40vw;
  height: 68vh;
  background: radial-gradient(closest-side, rgba(214, 198, 246, 0.92), rgba(246, 214, 168, 0.5) 46%, transparent 72%);
}

.wash-boards {
  inset: 10vh auto auto -10vw;
  width: 34vw;
  height: 50vh;
  background: radial-gradient(closest-side, rgba(186, 224, 214, 0.95), rgba(246, 214, 168, 0.4) 56%, transparent 74%);
}

html[data-page="work"] .wash-work {
  opacity: 0.42;
}

html[data-page="boards"] .wash-boards {
  opacity: 0.55;
}

html[data-page="about"] .wash-about,
html[data-page="contact"] .wash-contact {
  opacity: 1;
}

html[data-theme="dark"][data-page="work"] .wash-work {
  opacity: 0.28;
}

html[data-theme="dark"][data-page="boards"] .wash-boards {
  opacity: 0.34;
}

html[data-theme="dark"][data-page="about"] .wash-about,
html[data-theme="dark"][data-page="contact"] .wash-contact {
  opacity: 0.55;
}

html.menu-open .wash,
html[data-theme="dark"].menu-open .wash {
  opacity: 0;
}

.topbar {
  position: fixed;
  z-index: 8;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 30px;
  pointer-events: none;
  background: transparent;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

/* The bar stays clear over the painting and frosts only once content scrolls under it. */
html.scrolled:not(.menu-open) .topbar {
  padding-top: 14px;
  padding-bottom: 14px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}

.topbar a,
.topbar button {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.mark {
  width: 28px;
  height: 28px;
  display: block;
}

.brand-name {
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

html.menu-open .brand-name {
  opacity: 1;
  transform: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.text-btn,
.icon-btn {
  min-width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.text-btn {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  padding: 0 6px;
}

.icon-sun {
  display: none;
}

html[data-theme="dark"] .icon-moon {
  display: none;
}

html[data-theme="dark"] .icon-sun {
  display: block;
}

.dots {
  width: 18px;
  height: 18px;
  background-image: radial-gradient(currentColor 1.15px, transparent 1.3px);
  background-size: 6px 6px;
}

.close-x {
  display: none;
  width: 34px;
  height: 34px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.close-x::before,
.close-x::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 50%;
  height: 1.5px;
  background: currentColor;
}

.close-x::before {
  transform: rotate(45deg);
}

.close-x::after {
  transform: rotate(-45deg);
}

html.menu-open .dots {
  display: none;
}

html.menu-open .close-x {
  display: block;
}

.menu {
  position: fixed;
  z-index: 6;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  padding: 12vh 7vw 10vh 46vw;
  overflow: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

html.menu-open .menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.menu-list {
  list-style: none;
  padding: 0;
}

.menu-list a {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 10px;
  align-items: baseline;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(44px, 5.4vw, 72px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: 0.04em;
  color: var(--ink);
}

html[lang="en"] .menu-list a {
  font-family: Outfit, sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  line-height: 0.96;
}

.menu-list .num {
  font-family: Outfit, sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.menu-list a:hover,
.menu-list a[aria-current="page"] {
  color: var(--ink-strong);
}

html.menu-open .menu-list li {
  animation: menu-in 0.6s cubic-bezier(0.16, 0.8, 0.24, 1) both;
}

.menu-list li:nth-child(2) {
  animation-delay: 0.04s;
}

.menu-list li:nth-child(3) {
  animation-delay: 0.08s;
}

.menu-list li:nth-child(4) {
  animation-delay: 0.12s;
}

.menu-list li:nth-child(5) {
  animation-delay: 0.16s;
}

.menu-social,
.legal {
  padding-left: 52px;
}

.menu-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 26px;
}

.menu-social a,
.legal {
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
}

.menu-social a:hover {
  color: var(--ink-strong);
}

/* Links inside content carry a quiet underline so they read as links. */
main a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.28em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

main a:hover {
  color: var(--ink-strong);
  text-decoration-color: currentColor;
}

/* Rows and headings that are whole blocks keep their clean shape. */
main .contact-row,
main .piece-name a {
  text-decoration: none;
}

.legal {
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
}

.legal a {
  letter-spacing: 0.02em;
}

/* Inner pages: the footer sits at the end of the content, in normal flow. */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 0 20px 28px;
  text-align: center;
}

/* Home fills one screen, so the footer rests on the painting with no band behind it. */
html[data-page="home"] .site-footer {
  position: fixed;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 20px 16px;
  pointer-events: none;
}

.site-footer a {
  pointer-events: auto;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--ink-strong);
}

html.menu-open .site-footer {
  visibility: hidden;
}

#view {
  position: relative;
  z-index: 2;
  transition: opacity 0.4s ease;
}

html.menu-open #view {
  opacity: 0;
  pointer-events: none;
}

.panel {
  animation: rise 0.7s cubic-bezier(0.16, 0.84, 0.28, 1) both;
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 14vh 8vw;
  text-align: center;
}

.hero-inner {
  max-width: 920px;
}

.hero-kicker {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
  color: var(--ink-soft);
}

html[lang="en"] .hero-kicker {
  font-family: Outfit, sans-serif;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero-name {
  margin: 12px 0 0;
  font-family: Outfit, sans-serif;
  font-size: clamp(56px, 7vw, 92px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--ink-strong);
}

.hero-role {
  margin: 16px 0 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(22px, 2.15vw, 30px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: var(--ink);
}

html[lang="en"] .hero-role {
  font-family: Outfit, sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.hero-role em {
  font-style: normal;
  color: var(--ink-strong);
}

.lede {
  margin-top: 28px;
  font-size: var(--fs-sm);
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.ctas {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 32px;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
}

main .ctas .cta-primary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--ink-strong);
  border-radius: 999px;
  color: var(--ink-strong);
  font-size: var(--fs-md);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

main .ctas .cta-primary:hover {
  background: var(--ink-strong);
  color: var(--bg);
}

.work,
.contact,
.project {
  min-height: 100vh;
}

.work {
  display: block;
  padding: 16vh 6vw 10vh;
}

.work-board {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.piece {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.82fr);
  gap: 36px 56px;
  align-items: center;
  padding: 46px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 96px;
}

.piece:nth-child(even) .piece-media {
  order: 2;
}

.piece-media {
  position: relative;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(86, 92, 120, 0.12);
}

html[data-theme="dark"] .piece-media {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(231, 235, 246, 0.16);
}

.piece-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.media-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-strong);
  font-size: var(--fs-xs);
  box-shadow: 0 0 0 1px rgba(86, 92, 120, 0.22);
  transition: opacity 0.2s ease;
}

/* On pointer devices the control waits for hover or focus; a paused clip keeps it visible. */
@media (hover: hover) {
  .media-toggle[aria-pressed="false"] {
    opacity: 0;
  }

  .piece-media:hover .media-toggle,
  .media-toggle:focus-visible {
    opacity: 1;
  }
}

.piece-name {
  margin: 0;
  font-family: Outfit, sans-serif;
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink-strong);
}

.piece-cat {
  margin-top: 12px;
  color: var(--ink-soft);
  font-family: Outfit, "Noto Sans SC", sans-serif;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.piece-body {
  margin-top: 16px;
  font-size: var(--fs-md);
  line-height: 1.8;
}

.piece .linklist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding-top: 12px;
}

.work-head,
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.display {
  font-family: "Noto Serif SC", serif;
  font-size: var(--fs-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.15;
  color: var(--ink-strong);
  scroll-margin-top: 96px;
}

html[lang="en"] .display {
  font-family: Outfit, sans-serif;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.display-latin,
html[lang="en"] .display-latin {
  font-family: Outfit, sans-serif;
  font-weight: 500;
  font-size: clamp(44px, 4.4vw, 64px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-transform: none;
}

.count {
  font-family: Outfit, sans-serif;
  font-size: var(--fs-md);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.boards {
  min-height: 100vh;
  padding: 16vh 6vw 10vh;
}

.boards-board {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px 36px;
  padding-top: 28px;
}

.board-frame {
  position: relative;
  height: 340px;
  border-radius: 22px;
  overflow: hidden;
  background: #121316;
  box-shadow: inset 0 0 0 1px rgba(86, 92, 120, 0.12);
}

.board-frame[data-tone="light"] {
  background: #f7f6f3;
}

html[data-theme="dark"] .board-frame {
  box-shadow: inset 0 0 0 1px rgba(231, 235, 246, 0.16);
}

.board-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1200px;
  height: 1680px;
  border: 0;
  transform-origin: top left;
  pointer-events: none;
}

.board-frame:focus-within {
  box-shadow: inset 0 0 0 1.5px var(--ink-strong);
}

.board-hit {
  position: absolute;
  inset: 0;
}

.board-hit:focus-visible {
  outline: none;
}

.board-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-strong);
  font-size: var(--fs-xs);
  line-height: 1.4;
  box-shadow: 0 0 0 1px rgba(86, 92, 120, 0.22);
}

@media (hover: hover) {
  .board-zoom {
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .board-frame:hover .board-zoom,
  .board-hit:focus-visible .board-zoom {
    opacity: 1;
  }
}

.board-card .piece-name {
  margin-top: 18px;
}

.board-run {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
}

.board-stage {
  width: min(1120px, calc(100vw - 28px));
  height: min(880px, calc(100vh - 28px));
  max-height: calc(100vh - 28px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(47, 52, 74, 0.2);
  overflow: hidden;
}

.board-stage::backdrop {
  background: rgba(47, 52, 74, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.board-stage[open] {
  display: flex;
  flex-direction: column;
}

.board-stage-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.board-stage-bar h2 {
  flex: 1 1 12em;
  min-width: 0;
  font-family: "Noto Serif SC", serif;
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--ink-strong);
}

html[lang="en"] .board-stage-bar h2 {
  font-family: Outfit, sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.board-panes {
  display: flex;
  gap: 8px;
}

.board-panes button,
.board-close {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  color: var(--ink-strong);
}

.board-panes button {
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px transparent;
}

.board-panes button[aria-current="true"] {
  color: var(--bg);
  background: var(--ink-strong);
}

.board-close {
  margin-left: auto;
  box-shadow: inset 0 0 0 1px var(--ink-strong);
}

.board-stage iframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #0a0b0d;
}

.board-stage[data-tone="light"] iframe {
  background: #fff;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.row-name {
  font-family: Outfit, sans-serif;
  font-size: var(--fs-lg);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: transform 0.25s ease, color 0.25s ease;
}

.row:hover .row-name {
  transform: translateX(6px);
  color: var(--ink-strong);
}

.row-cat {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-align: right;
  flex: none;
}

.about {
  min-height: 100vh;
  display: block;
  padding: 18vh 7vw 12vh;
}

.about-board {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px 72px;
  align-items: start;
}

.about-side .block:first-child {
  margin-top: 0;
}

.about-side .prose {
  font-size: var(--fs-md);
  line-height: 1.85;
}

.rule {
  height: 1px;
  background: var(--line);
  margin: 14px 0 18px;
  border: 0;
}

.prose {
  max-width: 38em;
  font-size: var(--fs-md);
  line-height: 1.9;
  letter-spacing: 0.01em;
}

.prose p + p {
  margin-top: 1.05em;
}

.block {
  margin-top: 42px;
}

.block h2 {
  font-family: "Noto Serif SC", serif;
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  margin-bottom: 14px;
  color: var(--ink-strong);
}

html[lang="en"] .block h2 {
  font-family: Outfit, sans-serif;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.quiet-list {
  list-style: none;
  padding: 0;
}

.quiet-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-md);
  line-height: 1.65;
}

.more {
  margin-top: 36px;
  font-size: var(--fs-md);
  letter-spacing: 0.02em;
}

.contact {
  display: grid;
  align-content: center;
  padding: 22vh 10vw 12vh;
}

.contact-panel {
  width: min(640px, 100%);
}

.contact-note {
  margin-top: 22px;
  font-size: var(--fs-md);
  line-height: 1.7;
}

.contact-links {
  margin-top: 6px;
}

.contact-row {
  display: grid;
  grid-template-columns: 7em 1fr;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-md);
}

.contact-label {
  font-family: "Noto Serif SC", serif;
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-strong);
}

html[lang="en"] .contact-label {
  font-family: Outfit, sans-serif;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wechat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 32px;
  margin-top: 36px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
}

.wechat h2 {
  font-family: "Noto Serif SC", serif;
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-strong);
}

html[lang="en"] .wechat h2 {
  font-family: Outfit, sans-serif;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wechat-name {
  margin-top: 6px;
  font-size: var(--fs-lg);
  line-height: 1.4;
  color: var(--ink-strong);
}

.wechat-actions {
  margin-top: 14px;
}

.copy-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-strong);
  font-size: var(--fs-xs);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.copy-btn:hover {
  background: var(--ink-strong);
  color: var(--bg);
}

.wechat-hint,
.copy-status {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  line-height: 1.6;
}

.copy-status {
  color: var(--ink);
}

.copy-status:empty {
  margin: 0;
}

.wechat-qr {
  margin: 0;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.wechat-qr img {
  display: block;
  width: 132px;
  height: 132px;
  border-radius: 6px;
}

.linklist {
  list-style: none;
  padding: 18px 0 0;
}

.linklist a {
  display: inline-flex;
  padding: 8px 0;
  font-size: var(--fs-md);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

html[data-theme="dark"] .grain {
  mix-blend-mode: soft-light;
  opacity: 0.28;
}

.only-en {
  display: none;
}

html[lang="en"] .only-zh {
  display: none;
}

html[lang="en"] .only-en {
  display: inline;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .menu {
    padding-left: 7vw;
  }

  .work,
  .boards {
    padding: 16vh 6vw 8vh;
  }

  .board-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .board-frame {
    height: 280px;
  }

  .piece {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .piece:nth-child(even) .piece-media {
    order: 0;
  }

  .about {
    padding: 16vh 6vw 10vh;
  }

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

  .contact {
    padding: 18vh 6vw 10vh;
  }

  .contact-row {
    grid-template-columns: 6em 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 16px;
  }

  .brand-name {
    display: none;
  }

  .hero {
    padding: 20vh 6vw;
  }

  .hero-name {
    font-size: clamp(46px, 14vw, 64px);
  }

  .hero-role {
    font-size: var(--fs-lg);
  }

  .menu-list a {
    font-size: clamp(40px, 11vw, 52px);
    line-height: 1.28;
  }

  html[lang="en"] .menu-list a {
    font-size: clamp(22px, 7.4vw, 32px);
    letter-spacing: 0.015em;
    line-height: 1.12;
    grid-template-columns: 28px 1fr;
    column-gap: 8px;
  }

  html[lang="en"] .menu-social,
  html[lang="en"] .legal {
    padding-left: 36px;
  }

  .wash-work,
  .wash-about,
  .wash-contact,
  .wash-boards {
    width: 80vw;
  }

  .board-stage {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    border-radius: 16px;
  }

  /* Primary action on its own row, the two quiet links paired beneath it. */
  .ctas {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 14px 28px;
  }

  main .ctas .cta-primary {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .wechat {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .wechat-qr {
    justify-self: start;
  }
}

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