:root {
  color-scheme: light;
  --paper: #d9ddde;
  --paper-soft: #eef1f1;
  --paper-deep: #c1c8ca;
  --ink: #1b2023;
  --ink-soft: #4c565c;
  --ink-faint: #657077;
  --line: rgba(27, 32, 35, 0.14);
  --line-strong: rgba(27, 32, 35, 0.28);
  --accent: #c64b2f;
  --accent-hover: #9e351f;
  --accent-soft: rgba(198, 75, 47, 0.12);
  --green: #2f8062;
  --dark: #1d2328;
  --dark-raised: #293036;
  --dark-line: rgba(255, 255, 255, 0.12);
  --dark-text: rgba(255, 255, 255, 0.93);
  --dark-muted: rgba(255, 255, 255, 0.63);
  --serif: "Iowan Old Style", "Songti SC", STSong, "Noto Serif CJK SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  --page: 1180px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 8px 28px rgba(25, 31, 34, 0.08);
  --shadow-lg: 0 32px 90px rgba(18, 23, 27, 0.16);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(27, 32, 35, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 32, 35, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000 0, rgba(0, 0, 0, 0.72) 58%, transparent 100%);
}

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

button,
input,
textarea {
  font: inherit;
}

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

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

h1,
h2,
h3,
p,
figure,
dl,
dd,
ol,
ul {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  text-wrap: balance;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

::selection {
  color: var(--ink);
  background: rgba(168, 66, 44, 0.2);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 4px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

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

.page-shell {
  width: min(calc(100% - 48px), var(--page));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 112px 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: 14px 0;
  transition: padding 220ms ease, background 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  padding: 8px 0;
  color: var(--ink);
  background: rgba(217, 221, 222, 0.9);
  border-color: var(--line);
  box-shadow: 0 10px 40px rgba(33, 29, 22, 0.06);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 48px), var(--page));
  min-height: 50px;
  margin-inline: auto;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 11px;
  letter-spacing: 0;
  background: rgba(255, 255, 255, 0.45);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 4px;
  color: inherit;
  font-size: 13px;
  font-weight: 650;
  transition: color 180ms ease, background 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
}

.site-header:not(.is-scrolled) {
  color: rgba(248, 251, 252, 0.94);
  text-shadow: 0 1px 20px rgba(9, 13, 16, 0.34);
}

.site-header.is-scrolled .site-nav a:hover,
.site-header.is-scrolled .site-nav a[aria-current="true"] {
  background: rgba(27, 32, 35, 0.07);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: inherit;
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  height: max(620px, calc(100svh - 28px));
  min-height: calc(100svh - 28px);
  overflow: hidden;
  color: rgba(248, 251, 252, 0.96);
  background: #363e43;
  align-items: end;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(13, 18, 22, 0.7) 0%, rgba(13, 18, 22, 0.46) 34%, rgba(13, 18, 22, 0.08) 64%, rgba(13, 18, 22, 0.12) 100%);
}

.hero-scene,
.hero-scene-fallback,
#homeScene,
.hero-scene-fade,
.hero-scene-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-scene {
  z-index: 0;
  overflow: hidden;
  background: #cfd5d8;
}

.hero-scene-fallback {
  object-fit: cover;
  object-position: center 34%;
  opacity: 1;
  transition: opacity 500ms ease;
}

#homeScene {
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
}

.scene-ready #homeScene {
  opacity: 1;
}

.scene-ready .hero-scene-fallback {
  opacity: 0;
}

.scene-webgl-failed #homeScene {
  display: none;
}

.scene-webgl-failed .hero-scene-fallback {
  opacity: 1;
}

.hero-scene-fade {
  z-index: 2;
  pointer-events: none;
  background: #e6ecee;
  opacity: 0;
}

.hero-scene-grain {
  z-index: 3;
  pointer-events: none;
  opacity: 0.035;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.16) 0, rgba(255, 255, 255, 0.16) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(12, 17, 20, 0.08) 0, rgba(12, 17, 20, 0.08) 1px, transparent 1px, transparent 5px);
  mix-blend-mode: soft-light;
}

.hero-grid {
  position: relative;
  z-index: 4;
  min-height: 100%;
  padding-top: 132px;
  padding-bottom: 68px;
  display: flex;
  align-items: flex-end;
}

.hero-copy {
  width: min(100%, 590px);
  padding: 28px 30px 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(19, 25, 29, 0.48);
  backdrop-filter: blur(18px) saturate(0.8);
  -webkit-backdrop-filter: blur(18px) saturate(0.8);
}

.hero-copy .eyebrow {
  color: #bceae0;
  font-family: var(--mono);
}

.hero-copy h1 {
  margin-top: 16px;
  color: #f7fafb;
  font-family: var(--sans);
  font-size: clamp(72px, 11vw, 154px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0;
  text-wrap: nowrap;
}

.hero-lead {
  max-width: 540px;
  margin-top: 22px;
  color: rgba(248, 251, 252, 0.8);
  font-family: var(--sans);
  font-size: clamp(16px, 1.45vw, 20px);
  font-weight: 560;
  line-height: 1.75;
}

.hero-actions,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 740;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms var(--ease), background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(132, 48, 31, 0.2);
}

.button-primary:hover {
  color: #fff;
  background: var(--accent-hover);
  box-shadow: 0 16px 34px rgba(132, 48, 31, 0.24);
}

.button-secondary,
.button-quiet {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.48);
  border-color: var(--line);
}

.hero .button-secondary {
  color: #f7fafb;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.34);
}

.hero .button-secondary:hover {
  color: #11171b;
  background: rgba(247, 250, 251, 0.92);
  border-color: transparent;
}

.button-secondary:hover,
.button-quiet:hover {
  background: var(--paper-soft);
  border-color: var(--line-strong);
}

.text-link,
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
}

.text-link {
  min-height: 44px;
  padding: 0 8px;
}

.hero .text-link {
  color: #bceae0;
}

.text-link span,
.card-link span {
  transition: transform 180ms ease;
}

.text-link:hover span,
.card-link:hover span {
  transform: translateX(3px);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 560px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-facts div {
  padding: 18px 18px 18px 0;
}

.hero-facts div + div {
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-facts dt {
  color: rgba(248, 251, 252, 0.58);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-facts dd {
  margin-top: 6px;
  color: #f7fafb;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
}

.hero-hud {
  position: absolute;
  z-index: 5;
  top: 96px;
  display: grid;
  gap: 2px;
  color: rgba(248, 251, 252, 0.62);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
  pointer-events: none;
}

.hero-hud strong {
  color: rgba(248, 251, 252, 0.94);
  font-size: 12px;
}

.hero-hud-left {
  left: max(24px, calc((100vw - var(--page)) / 2));
}

.hero-hud-right {
  right: max(24px, calc((100vw - var(--page)) / 2));
  justify-items: end;
  text-align: right;
}

.hero-controls {
  position: absolute;
  z-index: 6;
  left: max(24px, calc((100vw - var(--page)) / 2));
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(248, 251, 252, 0.68);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.scene-motion-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  color: #f7fafb;
  background: rgba(13, 18, 22, 0.36);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.scene-motion-toggle:hover,
.scene-motion-toggle.is-paused {
  color: #16201e;
  background: #bceae0;
  border-color: #bceae0;
}

.scroll-cue {
  position: absolute;
  z-index: 6;
  bottom: 28px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  color: #f7fafb;
  font-size: 18px;
  transform: translateX(-50%);
  transition: color 180ms ease, background 180ms ease;
}

.scroll-cue:hover {
  color: #16201e;
  background: #f7fafb;
}

.section-heading {
  display: grid;
  gap: 20px;
  max-width: 820px;
  margin-bottom: 48px;
}

.section-heading h2,
.notes-heading h2,
.contact-card h2,
.guestbook-copy h2 {
  font-size: clamp(38px, 5.5vw, 64px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading > p:last-child,
.notes-heading > p,
.guestbook-copy > p {
  max-width: 720px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
}

.projects-section {
  background: var(--paper-soft);
}

.qiao-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.8fr);
  gap: 60px;
  overflow: hidden;
  padding: clamp(30px, 5vw, 64px);
  border-radius: var(--radius-lg);
  color: var(--dark-text);
  background: var(--dark);
  box-shadow: var(--shadow-lg);
}

.qiao-copy {
  align-self: center;
}

.project-label-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.project-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 9px;
  border-radius: 8px;
  background: #fff;
}

.project-icon img {
  width: 100%;
  height: 100%;
}

.project-kicker {
  color: var(--dark-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-label-row h3 {
  margin-top: 3px;
  color: #fff;
  font-size: 42px;
  letter-spacing: 0;
}

.project-description {
  max-width: 660px;
  margin-top: 28px;
  color: var(--dark-muted);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 34px;
  list-style: none;
  border-top: 1px solid var(--dark-line);
  border-bottom: 1px solid var(--dark-line);
}

.project-meta li {
  padding: 16px 14px 16px 0;
}

.project-meta li + li {
  padding-left: 14px;
  border-left: 1px solid var(--dark-line);
}

.project-meta span,
.project-meta strong {
  display: block;
}

.project-meta span {
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-meta strong {
  margin-top: 5px;
  color: #fff;
  font-size: 14px;
}

.qiao-feature .button-quiet {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--dark-line);
}

.qiao-feature .button-quiet:hover {
  background: rgba(255, 255, 255, 0.12);
}

.qiao-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 500px;
}

.qiao-preview::before {
  content: none;
}

.qiao-release-card {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  padding: 30px;
  border: 1px solid rgba(25, 24, 21, 0.12);
  border-radius: 8px;
  color: #171714;
  background: #e8eced;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
  transform: none;
}

.release-card-label {
  color: #625c52;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.release-product {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
}

.release-product img {
  flex: 0 0 auto;
  padding: 10px;
  border: 1px solid rgba(25, 24, 21, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(25, 24, 21, 0.1);
}

.release-product strong,
.release-product span {
  display: block;
}

.release-product strong {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: 0;
}

.release-product span {
  margin-top: 5px;
  color: #625c52;
  font-family: var(--mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.release-facts {
  display: grid;
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid rgba(25, 24, 21, 0.12);
  border-bottom: 1px solid rgba(25, 24, 21, 0.12);
}

.release-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
}

.release-facts div + div {
  border-top: 1px solid rgba(25, 24, 21, 0.08);
}

.release-facts dt {
  color: #625c52;
  font-size: 11px;
}

.release-facts dd {
  font-size: 12px;
  font-weight: 760;
}

.release-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.release-features span {
  padding: 7px 10px;
  border: 1px solid rgba(25, 24, 21, 0.1);
  border-radius: 4px;
  color: #4f4a43;
  background: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  font-weight: 700;
}

.release-card-note {
  margin-top: 22px;
  color: #625c52;
  font-size: 11px;
  line-height: 1.7;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  transition: transform 220ms var(--ease), border-color 220ms ease, box-shadow 220ms ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-number {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
}

.project-type {
  padding: 5px 9px;
  border-radius: 4px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-card h3 {
  margin-top: 52px;
  font-size: 30px;
  letter-spacing: 0;
}

.project-card p {
  margin-top: 16px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.85;
}

.project-card .card-link {
  margin-top: auto;
  padding-top: 24px;
}

.project-availability {
  margin-top: auto;
  padding-top: 24px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0;
}

.card-link-button {
  width: fit-content;
  padding-inline: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.section-heading-split {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  max-width: none;
  align-items: end;
}

.section-heading-split h2 {
  margin-top: 20px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tool-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 20px;
  align-items: start;
  min-height: 150px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.35);
  transition: transform 200ms var(--ease), background 200ms ease, border-color 200ms ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
}

.tool-index {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
}

.tool-card h3 {
  font-size: 23px;
  letter-spacing: 0;
}

.tool-card p {
  margin-top: 9px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.75;
}

.tool-card > span:last-child {
  color: var(--accent);
  transition: transform 180ms ease;
}

.tool-card:hover > span:last-child {
  transform: translateX(4px);
}

.notes-section {
  background: var(--paper-deep);
}

.notes-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1.22fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: center;
}

.notes-heading h2 {
  margin-top: 22px;
}

.notes-heading > p {
  margin-top: 24px;
}

.notes-heading .text-link {
  margin-top: 20px;
  padding-left: 0;
}

.latest-note {
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-soft);
  box-shadow: var(--shadow-sm);
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.latest-note h3 {
  margin-top: 28px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
  letter-spacing: 0;
}

.latest-note p {
  margin-top: 22px;
  color: var(--ink-soft);
  font-family: var(--serif);
  line-height: 1.9;
}

.latest-note code {
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--accent-hover);
  background: var(--accent-soft);
}

.latest-note .button {
  margin-top: 26px;
}

.guestbook-section {
  background: var(--paper-soft);
}

.guestbook-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(42px, 7vw, 92px);
  align-items: start;
}

.guestbook-copy {
  position: sticky;
  top: 118px;
}

.guestbook-copy h2 {
  margin-top: 22px;
}

.guestbook-copy > p {
  margin-top: 22px;
}

.refresh-button {
  min-height: 44px;
  margin-top: 22px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--accent);
  background: transparent;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.guestbook-panel {
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.message-form {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.form-field + .form-field {
  margin-top: 18px;
}

.form-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 720;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #fbfaf6;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-field input {
  min-height: 48px;
  padding: 0 14px;
}

.form-field textarea {
  min-height: 112px;
  padding: 12px 14px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.character-count {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: right;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}

.form-status {
  min-height: 24px;
  color: var(--ink-soft);
  font-size: 12px;
}

.form-status.is-error {
  color: #a2352c;
}

.message-list {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.message-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-soft);
}

.message-item.is-reply {
  margin-left: 28px;
  border-left: 3px solid rgba(168, 66, 44, 0.32);
}

.message-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.message-name {
  font-size: 13px;
  font-weight: 760;
}

.message-time {
  color: var(--ink-faint);
  font-size: 10px;
  white-space: nowrap;
}

.message-body {
  margin-top: 8px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-empty,
.message-loading {
  padding: 28px 12px;
  color: var(--ink-faint);
  font-size: 13px;
  text-align: center;
}

.contact-section {
  padding-bottom: 72px;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 80px;
  padding: clamp(32px, 6vw, 68px);
  border-radius: var(--radius-lg);
  color: var(--dark-text);
  background: var(--dark);
}

.contact-card h2 {
  margin-top: 22px;
  color: #fff;
  font-size: clamp(34px, 4.5vw, 52px);
}

.contact-links {
  border-top: 1px solid var(--dark-line);
}

.contact-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  border-bottom: 1px solid var(--dark-line);
  color: #fff;
  font-size: 13px;
  font-weight: 720;
  transition: padding 180ms ease, color 180ms ease;
}

.contact-links a:hover {
  padding-inline: 6px;
  color: #f0a78f;
}

.contact-links span {
  color: var(--dark-muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  overflow-wrap: anywhere;
  text-align: right;
}

.site-footer {
  padding: 26px 0 34px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 11px;
}

.footer-inner a {
  color: var(--ink-soft);
  font-weight: 700;
}

.media-dialog {
  width: min(calc(100% - 32px), 980px);
  max-height: calc(100dvh - 32px);
  padding: 20px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
  background: #111;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.52);
}

.media-dialog::backdrop {
  background: rgba(12, 11, 10, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.dialog-header h2 {
  margin-top: 8px;
  color: #fff;
  font-size: 24px;
}

.dialog-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 26px;
  cursor: pointer;
}

.media-dialog video {
  width: 100%;
  max-height: calc(100dvh - 160px);
  border-radius: 4px;
  background: #000;
}

.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 680ms var(--ease), transform 680ms var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .qiao-feature,
  .notes-layout,
  .guestbook-layout,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .qiao-feature {
    gap: 28px;
  }

  .qiao-preview {
    min-height: 460px;
  }

  .project-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-card:first-child {
    grid-column: 1 / -1;
  }

  .guestbook-copy {
    position: static;
  }

  .section-heading-split {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .contact-card {
    gap: 40px;
  }
}

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

  .page-shell,
  .header-inner {
    width: min(calc(100% - 28px), var(--page));
  }

  .section {
    padding: 78px 0;
  }

  .site-header {
    padding: 8px 0;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .site-nav {
    flex: 1 1 100%;
    justify-content: space-between;
    gap: 2px;
    margin-top: 6px;
    overflow-x: auto;
  }

  .site-nav a {
    flex: 0 0 auto;
    min-height: 42px;
    padding-inline: 10px;
    white-space: nowrap;
  }

  .js .header-inner {
    flex-wrap: nowrap;
  }

  .js .nav-toggle {
    display: block;
  }

  .js .site-nav {
    position: absolute;
    top: calc(100% + 4px);
    right: 14px;
    left: 14px;
    display: grid;
    width: auto;
    gap: 2px;
    margin-top: 0;
    padding: 10px;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: rgba(217, 221, 222, 0.98);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
  }

  .js .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .js .site-nav a {
    min-height: 46px;
    padding-inline: 14px;
  }

  .hero {
    height: max(540px, calc(100svh - 24px));
    min-height: calc(100svh - 24px);
  }

  .hero::before {
    background:
      linear-gradient(0deg, rgba(13, 18, 22, 0.82) 0%, rgba(13, 18, 22, 0.42) 50%, rgba(13, 18, 22, 0.08) 78%),
      linear-gradient(180deg, rgba(13, 18, 22, 0.34) 0%, transparent 28%);
  }

  .hero-scene-grain {
    opacity: 0.012;
  }

  .hero-grid {
    min-height: 100%;
    padding: 106px 14px 58px;
  }

  .hero-copy {
    width: 100%;
    padding: 18px 18px 16px;
    background: rgba(19, 25, 29, 0.56);
  }

  .hero-copy h1 {
    font-size: clamp(66px, 22vw, 98px);
    line-height: 0.88;
  }

  .hero-lead {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.55;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .hero-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
  }

  .hero-facts div {
    padding: 11px 8px 11px 0;
  }

  .hero-facts div + div {
    padding-left: 8px;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
  }

  .hero-facts dt {
    font-size: 9px;
  }

  .hero-facts dd {
    font-size: 11px;
  }

  .hero-hud {
    top: 78px;
    font-size: 9px;
  }

  .hero-hud-left,
  .hero-controls {
    left: 14px;
  }

  .hero-hud-right {
    right: 14px;
  }

  .hero-controls {
    bottom: 16px;
  }

  .scroll-cue {
    display: none;
  }

  .section-heading {
    gap: 16px;
    margin-bottom: 34px;
  }

  .section-heading h2,
  .notes-heading h2,
  .guestbook-copy h2 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .qiao-feature {
    padding: 28px 18px;
    border-radius: 8px;
  }

  .project-label-row h3 {
    font-size: 34px;
  }

  .project-description {
    font-size: 15px;
  }

  .project-meta {
    grid-template-columns: 1fr;
  }

  .project-meta li {
    padding: 12px 0;
  }

  .project-meta li + li {
    padding-left: 0;
    border-top: 1px solid var(--dark-line);
    border-left: 0;
  }

  .qiao-preview {
    min-height: auto;
    padding: 22px 0 6px;
  }

  .qiao-release-card {
    width: min(100%, 380px);
    transform: none;
  }

  .project-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .project-card:first-child {
    grid-column: auto;
  }

  .project-card {
    min-height: 290px;
    padding: 24px;
  }

  .project-card h3 {
    margin-top: 40px;
  }

  .tool-card {
    grid-template-columns: 34px 1fr auto;
    gap: 12px;
    min-height: 138px;
    padding: 20px;
  }

  .latest-note {
    border-radius: 8px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .button {
    width: 100%;
  }

  .message-item.is-reply {
    margin-left: 14px;
  }

  .contact-card {
    padding: 30px 20px;
    border-radius: 8px;
  }

  .contact-links a {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 12px 0;
  }

  .contact-links span {
    text-align: left;
  }

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

  .media-dialog {
    padding: 14px;
    border-radius: 6px;
  }
}

@media (max-width: 430px) {
  .hero-actions .button {
    flex: 1 1 calc(50% - 6px);
    padding-inline: 14px;
  }

  .hero-actions .text-link {
    flex-basis: 100%;
    padding-left: 0;
  }

  .hero-hud-right {
    display: none;
  }

  .qiao-preview {
    min-height: auto;
  }

  .qiao-release-card {
    padding: 24px 20px;
    border-radius: 8px;
  }

  .project-actions .button {
    width: 100%;
  }

  .guestbook-panel {
    padding: 18px 14px;
    border-radius: 6px;
  }

  .message-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

@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;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .scroll-cue,
  .message-form,
  .refresh-button,
  .media-dialog {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .section {
    padding: 32px 0;
    break-inside: avoid;
  }
}
