/* =========================================================
   殷书涵 — Design Portfolio
   01. Design tokens
   02. Base
   03. Header / Navigation
   04. Hero
   05. Ticker
   06. Shared section styles
   07. Work grid
   08. About
   09. Contact / Footer
   10. Project dialog
   11. Motion / Responsive
   ========================================================= */

/* 01. Design tokens
   --------------------------------------------------------- */
:root {
  color-scheme: light;
  --paper: #f2efe7;
  --paper-2: #e8e4d8;
  --ink: #161512;
  --ink-soft: #35322c;
  --muted: #736e63;
  --line: rgba(22, 21, 18, 0.16);
  --line-strong: rgba(22, 21, 18, 0.32);
  --accent: #e9582f;
  --accent-ink: #fff8f1;
  --mint: #b7ffd2;
  --live: #1c8f50;
  --live-halo: rgba(28, 143, 80, 0.16);
  --contact-bg: #161512;
  --contact-ink: #f2efe7;
  --contact-line: rgba(242, 239, 231, 0.18);
  --contact-line-soft: rgba(242, 239, 231, 0.12);
  --contact-line-strong: rgba(242, 239, 231, 0.4);
  --contact-muted: rgba(242, 239, 231, 0.5);
  --contact-text: rgba(242, 239, 231, 0.74);
  --contact-glow: rgba(233, 88, 47, 0.14);
  --header-bg: rgba(242, 239, 231, 0.76);
  --header-bg-scrolled: rgba(242, 239, 231, 0.93);
  --glass: rgba(242, 239, 231, 0.92);
  --grain-opacity: 0.045;
  --grain-blend: multiply;
  --sheen: rgba(255, 255, 255, 0.26);
  --shadow: 0 20px 60px rgba(22, 21, 18, 0.16);
  --header-h: 78px;
  --max: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
  --sans: "Helvetica Neue", Inter, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, Georgia, serif;
  --mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 0.68, 0.28, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1d1f22;
  --paper-2: #26292d;
  --ink: #f0ede5;
  --ink-soft: #d2cec3;
  --muted: #a09b90;
  --line: rgba(240, 237, 229, 0.16);
  --line-strong: rgba(240, 237, 229, 0.34);
  --accent: #ff613a;
  --accent-ink: #17191c;
  --mint: #b7ffd2;
  --live: #b7ffd2;
  --live-halo: rgba(183, 255, 210, 0.16);
  --contact-bg: #26292e;
  --contact-ink: #f5f2e9;
  --contact-line: rgba(245, 242, 233, 0.16);
  --contact-line-soft: rgba(245, 242, 233, 0.1);
  --contact-line-strong: rgba(245, 242, 233, 0.38);
  --contact-muted: rgba(245, 242, 233, 0.5);
  --contact-text: rgba(245, 242, 233, 0.74);
  --contact-glow: rgba(255, 97, 58, 0.14);
  --header-bg: rgba(29, 31, 34, 0.78);
  --header-bg-scrolled: rgba(29, 31, 34, 0.95);
  --glass: rgba(29, 31, 34, 0.92);
  --grain-opacity: 0.05;
  --grain-blend: screen;
  --sheen: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

/* 没有 JavaScript 时也跟随系统主题。 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #1d1f22;
    --paper-2: #26292d;
    --ink: #f0ede5;
    --ink-soft: #d2cec3;
    --muted: #a09b90;
    --line: rgba(240, 237, 229, 0.16);
    --line-strong: rgba(240, 237, 229, 0.34);
    --accent: #ff613a;
    --accent-ink: #17191c;
    --mint: #b7ffd2;
    --live: #b7ffd2;
    --live-halo: rgba(183, 255, 210, 0.16);
    --contact-bg: #26292e;
    --contact-ink: #f5f2e9;
    --contact-line: rgba(245, 242, 233, 0.16);
    --contact-line-soft: rgba(245, 242, 233, 0.1);
    --contact-line-strong: rgba(245, 242, 233, 0.38);
    --contact-muted: rgba(245, 242, 233, 0.5);
    --contact-text: rgba(245, 242, 233, 0.74);
    --contact-glow: rgba(255, 97, 58, 0.14);
    --header-bg: rgba(29, 31, 34, 0.78);
    --header-bg-scrolled: rgba(29, 31, 34, 0.95);
    --glass: rgba(29, 31, 34, 0.92);
    --grain-opacity: 0.05;
    --grain-blend: screen;
    --sheen: rgba(255, 255, 255, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  }
}

/* 02. Base
   --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  scrollbar-color: var(--line-strong) var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

body.nav-open,
body.modal-open {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.scroll-meter {
  position: fixed;
  inset: 0 0 auto;
  z-index: 160;
  height: 2px;
  pointer-events: none;
}

.scroll-meter span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow,
.label {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

.outline {
  color: transparent;
  -webkit-text-stroke: 1.25px var(--ink);
}

@supports not (-webkit-text-stroke: 1px #000) {
  .outline {
    color: var(--ink);
  }
}

/* 03. Header / Navigation
   --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: var(--header-bg-scrolled);
  border-bottom-color: var(--line);
}

.header__inner {
  width: 100%;
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
  transition: transform 0.4s var(--ease), background 0.25s ease;
}

.brand:hover .brand__mark {
  transform: rotate(-10deg);
  background: var(--accent);
}

.brand__text {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.13em;
}

.brand__text span {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 42px);
}

.site-nav__links a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 0;
  font-size: 12.5px;
  text-decoration: none;
}

.site-nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.site-nav__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-nav__num {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
}

.site-nav__arrow {
  font-size: 10px;
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.25s ease, transform 0.3s var(--ease);
}

.site-nav__links a:hover .site-nav__arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.site-nav__links a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-nav__links a.is-active .site-nav__num {
  color: var(--accent);
}

.site-nav__aside {
  display: none;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.header__cta {
  position: relative;
  padding: 6px 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}

.header__cta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.header__cta:hover::after {
  transform: scaleX(0);
}

.header__cta span {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.header__cta:hover span {
  transform: translate(3px, -3px);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  background: var(--paper-2);
}

.theme-toggle__icon {
  position: relative;
  display: block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.theme-toggle__icon svg {
  position: absolute;
  inset: 0;
  width: 15px;
  height: 15px;
  transition: opacity 0.3s ease, transform 0.45s var(--ease);
}

:root[data-theme="light"] .theme-toggle__moon {
  opacity: 0;
  transform: rotate(-30deg) scale(0.7);
}

:root[data-theme="dark"] .theme-toggle__sun {
  opacity: 0;
  transform: rotate(30deg) scale(0.7);
}

:root[data-theme-mode="auto"] .theme-toggle__icon::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.theme-toggle__label {
  min-width: 4.5ch;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-align: left;
  color: var(--muted);
  transition: color 0.25s ease;
}

.theme-toggle:hover .theme-toggle__label {
  color: var(--ink);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.menu-toggle__icon {
  position: relative;
  display: block;
  width: 22px;
  height: 14px;
}

.menu-toggle__icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: top 0.3s var(--ease), transform 0.3s var(--ease);
}

.menu-toggle__icon span:first-child {
  top: 2px;
}

.menu-toggle__icon span:last-child {
  top: 10px;
}

body.nav-open .menu-toggle__icon span:first-child {
  top: 6px;
  transform: rotate(45deg);
}

body.nav-open .menu-toggle__icon span:last-child {
  top: 6px;
  transform: rotate(-45deg);
}

/* 04. Hero
   --------------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  padding: 22px 0 26px;
  overflow: hidden;
}

.hero__grid {
  position: static;
  width: 100%;
  max-width: var(--max);
  min-height: calc(100svh - var(--header-h) - 48px);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr auto;
  gap: 22px 24px;
}

.hero__aside {
  grid-column: 1 / 4;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 300px;
  padding-top: 10px;
}

.hero__location {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.9;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero__telemetry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  max-width: 280px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--live);
  letter-spacing: 0.08em;
}

.live-status i {
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px var(--live-halo);
  animation: livePulse 2.2s ease-out infinite;
}

.hero__clock {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.hero__clock span {
  color: var(--muted);
}

.hero__coords {
  flex-basis: 100%;
  color: var(--muted);
  opacity: 0.75;
}

@media (min-width: 901px) {
  .hero__aside {
    grid-column: 1 / 5;
    gap: 24px;
    max-width: 380px;
  }

  .hero__aside .eyebrow {
    font-size: 11.5px;
    letter-spacing: 0.12em;
  }

  .hero__location {
    margin-top: 14px;
    font-size: 12.5px;
    line-height: 1.9;
  }

  .hero__aside .hero__kicker {
    gap: 16px;
    font-size: 11.5px;
    letter-spacing: 0.14em;
  }

  .hero__aside .hero__kicker::before {
    width: 42px;
  }

  .hero__telemetry {
    gap: 10px 18px;
    max-width: 340px;
    padding-top: 14px;
    font-size: 10px;
    line-height: 1.5;
  }

  .live-status i {
    width: 6px;
    height: 6px;
  }

  .hero__coords {
    font-size: 9.5px;
  }
}

.hero__headline {
  grid-column: 1 / 12;
  grid-row: 2;
  align-self: center;
  padding: 28px 0 14px;
}

.hero__kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 clamp(18px, 2.5vw, 34px);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  white-space: nowrap;
}

.hero__kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--line-strong);
}

.hero__kicker span {
  color: var(--ink);
}

.hero__aside .hero__kicker {
  margin-bottom: 0;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(64px, 11.7vw, 178px);
  font-weight: 500;
  line-height: 0.87;
  letter-spacing: -0.055em;
}

.hero h1 > span {
  display: inline;
}

.hero h1 .accent {
  -webkit-text-stroke: 0;
}

.hero__orb {
  position: absolute;
  top: 50%;
  right: -23vw;
  z-index: 1;
  width: clamp(1000px, 92vw, 1800px);
  height: clamp(1000px, 92vw, 1800px);
  color: var(--ink);
  pointer-events: none;
  transform: translateY(-50%);
}

.work-rings {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.work-orbit__guide {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 7;
  opacity: 0.7;
}

.work-ring {
  transform-box: view-box;
  transform-origin: 220px 220px;
  animation: orbitSpin 42s linear infinite;
  pointer-events: auto;
  cursor: pointer;
}

.work-ring--2 {
  animation-duration: 56s;
  animation-direction: reverse;
}

.work-ring--3 {
  animation-duration: 70s;
}

.work-ring--4 {
  animation-duration: 84s;
  animation-direction: reverse;
}

.work-ring--5 {
  animation-duration: 98s;
}

.work-ring--5 .work-ring__text {
  font-size: 9.2px;
  letter-spacing: 1.1px;
}

.work-ring--5 .work-ring__line {
  stroke-width: 1.5;
}

.work-ring:hover,
.work-ring:focus {
  animation-play-state: paused;
}

.work-ring:focus {
  outline: none;
}

.work-ring__hit {
  fill: none;
  stroke: transparent;
  stroke-width: 32;
  pointer-events: stroke;
}

.work-ring__line {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  pointer-events: none;
  transition: stroke 0.25s ease;
}

.work-ring__text {
  fill: var(--ink);
  fill-opacity: 0.72;
  font-family: var(--sans);
  font-size: 8.4px;
  letter-spacing: 1px;
  pointer-events: none;
  transition: fill 0.25s ease, fill-opacity 0.25s ease;
}

.work-ring:hover .work-ring__text,
.work-ring:focus-visible .work-ring__text {
  fill: var(--accent);
  fill-opacity: 1;
}

.work-ring:hover .work-ring__line,
.work-ring:focus-visible .work-ring__line {
  stroke: var(--accent);
}

.work-orbit__center {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.35s var(--ease);
}

.work-orbit__center::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}

.work-orbit__center-name {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.work-orbit__center-en {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 6.4px;
  line-height: 1.3;
  letter-spacing: 0.07em;
  color: var(--muted);
  transition: color 0.25s ease;
}

.work-orbit__center-hint {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 6.2px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.25s ease;
}

.work-orbit__center:hover,
.work-orbit__center:focus-visible {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  transform: translate(-50%, -50%) scale(1.06);
}

.work-orbit__center:active {
  transform: translate(-50%, -50%) scale(0.97);
}

.work-orbit__center:hover::before,
.work-orbit__center:focus-visible::before {
  opacity: 0.55;
  transform: scale(1.12);
}

.work-orbit__center:hover .work-orbit__center-en,
.work-orbit__center:focus-visible .work-orbit__center-en,
.work-orbit__center:hover .work-orbit__center-hint,
.work-orbit__center:focus-visible .work-orbit__center-hint {
  color: var(--accent-ink);
}

.work-orbit__center.is-jumping::before {
  animation: centerPulse 0.7s var(--ease);
}

.hero__edge-shade {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: clamp(180px, 17vw, 240px);
  background: var(--paper);
  pointer-events: auto;
}

.hero__bottom {
  position: relative;
  z-index: 3;
  grid-column: 1 / 13;
  grid-row: 3;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
  justify-content: space-between;
  gap: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hero__bottom::before {
  content: "";
  position: absolute;
  top: 0;
  right: calc(-1 * var(--gutter));
  bottom: -26px;
  left: calc(-1 * var(--gutter));
  z-index: -1;
  background: var(--paper);
  pointer-events: none;
}

.hero__bottom a {
  pointer-events: auto;
}

.hero__intro {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--muted);
}

.hero__scroll-line {
  position: relative;
  width: 1px;
  height: 44px;
  background: var(--line);
  overflow: hidden;
}

.hero__scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: scrollLine 2.4s var(--ease) infinite;
}

/* 05. Shared section styles
   --------------------------------------------------------- */
.section {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(88px, 10vw, 140px) var(--gutter);
}

.section-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(260px, 350px);
  gap: 24px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.section-index {
  align-self: start;
  padding-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.section-head h2 {
  margin: 11px 0 0;
  font-family: var(--serif);
  font-size: clamp(44px, 5.4vw, 76px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.section-note {
  justify-self: end;
  margin: 0 0 4px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

/* 07. Work grid
   --------------------------------------------------------- */
.works__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 26px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 11.5px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.filter span {
  font-family: var(--mono);
  font-size: 8px;
  opacity: 0.55;
}

.filter:hover {
  border-color: var(--line-strong);
  background: var(--paper-2);
}

.filter.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.works__count {
  margin: 0;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.notice {
  margin: 24px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
}

.works__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(42px, 5vw, 76px) clamp(20px, 2.4vw, 32px);
  margin-top: clamp(36px, 4vw, 52px);
  align-items: start;
}

.project {
  display: block;
  min-width: 0;
  grid-column: span 4;
  color: inherit;
  text-decoration: none;
}

.project:nth-child(1) {
  grid-column: span 8;
}

.project:nth-child(2) {
  grid-column: span 4;
}

.project:nth-child(6) {
  grid-column: span 12;
}

.project--feature {
  grid-column: span 12;
}

.project--feature .project__info h3 {
  font-size: clamp(21px, 2.2vw, 30px);
}

.project__media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 3px;
  background: var(--paper-2);
  aspect-ratio: 4 / 5;
  isolation: isolate;
}

.project__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    440px circle at var(--px, 50%) var(--py, 50%),
    var(--sheen),
    transparent 56%
  );
  mix-blend-mode: soft-light;
  transition: opacity 0.4s ease;
}

.project:hover .project__media::after,
.project:focus-visible .project__media::after {
  opacity: 1;
}

.project__media--landscape {
  aspect-ratio: 45 / 31;
}

.project__media--wide {
  aspect-ratio: 5 / 2;
}

.project__media--cinema {
  aspect-ratio: 16 / 9;
}

.project__media svg,
.project__media img {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.9s var(--ease);
}

.project__media img {
  object-fit: cover;
}

.project:hover .project__media svg,
.project:hover .project__media img {
  transform: scale(1.018);
}

.project__open {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(8px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.35s ease, transform 0.4s var(--ease);
}

.project__open::before {
  content: "";
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
}

.project__open span {
  font-size: 10px;
}

.project:hover .project__open,
.project:focus-visible .project__open {
  opacity: 1;
  transform: translateY(0);
}

.project__info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.project__info h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(17px, 1.45vw, 21px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.project__info h3::before {
  content: attr(data-index);
  display: inline-block;
  margin-right: 9px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.06em;
  vertical-align: 0.18em;
  color: var(--muted);
}

.project__info p {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.project__arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 13px;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease);
}

.project:hover .project__arrow {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  transform: translate(2px, -2px);
}

@media (hover: hover) and (pointer: fine) {
  .project__media {
    transition: transform 0.5s var(--ease), box-shadow 0.5s ease;
  }

  .project:hover .project__media {
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    box-shadow: var(--shadow);
  }
}

/* Filtered state: keep the grid tidy with two even columns. */
.works__grid.is-filtered .project,
.works__grid.is-filtered .project:nth-child(1),
.works__grid.is-filtered .project:nth-child(2),
.works__grid.is-filtered .project:nth-child(6) {
  grid-column: span 6;
}

.works__grid.is-filtered .project__media {
  aspect-ratio: 16 / 10;
}

.works__grid.is-filtered .project.project--feature {
  grid-column: span 12;
}

.works__grid.is-filtered .project--feature .project__media {
  aspect-ratio: 16 / 9;
}

.works__grid .project.project--feature {
  grid-column: span 12;
}

/* 08. About
   --------------------------------------------------------- */
.about {
  padding-top: clamp(70px, 8vw, 110px);
}

.about__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(44px, 6vw, 76px) clamp(20px, 2.4vw, 32px);
  margin-top: clamp(46px, 5vw, 70px);
}

.about__statement {
  grid-column: 1 / 7;
}

.about__statement h3 {
  margin: 26px 0 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4.65vw, 66px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.about__statement .accent {
  font-family: var(--serif);
}

.about__body {
  grid-column: 8 / 12;
  padding-top: 42px;
}

.about__body p {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-soft);
}

.about__body .lead {
  margin-bottom: 26px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.text-link span {
  transition: transform 0.3s var(--ease);
}

.text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.text-link:hover span {
  transform: translate(3px, -3px);
}

.about__services {
  grid-column: 1 / 6;
}

.about__services ol {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.about__services li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.about__services li span {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
}

.about__facts {
  grid-column: 7 / 12;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: end;
  border-top: 1px solid var(--line);
}

.about__facts div {
  padding: 18px 14px 0 0;
}

.about__facts div + div {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.about__facts strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(46px, 5vw, 70px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.about__facts strong span {
  display: inline-block;
  margin-left: 2px;
  font-size: 0.45em;
  vertical-align: top;
  color: var(--accent);
}

.about__facts p {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* 09. Contact / Footer
   --------------------------------------------------------- */
.contact {
  position: relative;
  margin-top: clamp(80px, 10vw, 140px);
  padding: clamp(64px, 8vw, 96px) 0 0;
  overflow: hidden;
  background: var(--contact-bg);
  color: var(--contact-ink);
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 78% 18%, var(--contact-glow), transparent 52%);
}

.contact__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.contact__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--contact-line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--contact-muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--mint);
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(183, 255, 210, 0.1);
  animation: pulse 2.2s ease-out infinite;
}

.contact__main {
  padding: clamp(52px, 7vw, 86px) 0 clamp(56px, 7vw, 84px);
}

.contact .eyebrow {
  color: var(--contact-muted);
}

.contact h2 {
  margin: 22px 0 clamp(38px, 5vw, 56px);
  font-family: var(--serif);
  font-size: clamp(64px, 11.2vw, 164px);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.06em;
}

.contact h2 .outline {
  color: transparent;
  -webkit-text-stroke: 1.25px var(--contact-ink);
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--contact-line-strong);
  font-size: clamp(21px, 3.2vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.contact__email span {
  font-size: 0.75em;
  transition: transform 0.35s var(--ease);
}

.contact__email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact__email:hover span {
  transform: translate(5px, -5px);
}

.contact__wechat {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  width: fit-content;
  max-width: 100%;
  margin-top: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--contact-line);
}

.contact__wechat-label {
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  color: var(--contact-muted);
}

.contact__wechat-id {
  font-family: var(--mono);
  font-size: clamp(14px, 1.5vw, 19px);
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--contact-ink);
}

.copy-button {
  padding: 6px 10px;
  border: 1px solid var(--contact-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--contact-text);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.copy-button:hover {
  border-color: var(--contact-ink);
  background: var(--contact-ink);
  color: var(--contact-bg);
}

.copy-button.is-copied {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.copy-feedback {
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  color: var(--mint);
}

.copy-feedback:empty {
  display: none;
}

.contact__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding: 26px 0 46px;
  border-top: 1px solid var(--contact-line);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--contact-text);
  transition: color 0.25s ease;
}

.socials a:hover {
  color: var(--contact-ink);
}

.socials span {
  font-size: 10px;
}

.contact__note {
  margin: 0;
  text-align: right;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--contact-muted);
}

.footer {
  background: var(--contact-bg);
  color: var(--contact-ink);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter) 24px;
  border-top: 1px solid var(--contact-line-soft);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--contact-muted);
}

.footer__inner p {
  margin: 0;
}

.footer__inner a {
  text-decoration: none;
  color: var(--contact-text);
  transition: color 0.25s ease;
}

.footer__inner a:hover {
  color: var(--contact-ink);
}

/* 返回置顶 + 阅读进度 */
.home-return {
  position: fixed;
  right: clamp(16px, 2.4vw, 32px);
  bottom: clamp(16px, 2.4vw, 32px);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--header-bg-scrolled);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.45s var(--ease),
    background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.home-return.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

html:not(.js) .home-return {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.home-return__ring {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.home-return__ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.home-return__track,
.home-return__progress {
  fill: none;
  stroke-width: 1.5;
}

.home-return__track {
  stroke: var(--line-strong);
}

.home-return__progress {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.home-return__arrow {
  position: relative;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.35s var(--ease);
}

.home-return__label {
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 0.25s ease;
}

.home-return:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.home-return:hover .home-return__label {
  color: var(--paper);
}

.home-return:hover .home-return__arrow {
  transform: translateY(-3px);
}

.home-return:hover .home-return__track {
  stroke: var(--line);
}

/* 主题切换时从右上角展开，浏览器不支持时直接切换。 */
::view-transition-old(root) {
  animation: none;
}

::view-transition-new(root) {
  animation: themeReveal 0.55s var(--ease);
}

@keyframes themeReveal {
  from {
    clip-path: circle(0 at 92% 4%);
  }
  to {
    clip-path: circle(150% at 92% 4%);
  }
}

/* 10. Project dialog
   --------------------------------------------------------- */
.project-modal {
  position: fixed;
  inset: 0;
  width: min(1120px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100svh - 48px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

.project-modal::backdrop {
  background: rgba(12, 11, 9, 0.74);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.project-modal[open] {
  animation: modalIn 0.4s var(--ease);
}

.modal__shell {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  max-height: calc(100svh - 48px);
  overflow-y: auto;
}

.modal__visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: var(--paper-2);
}

.modal__visual svg,
.modal__visual img {
  display: block;
  width: 100%;
  height: 100%;
}

.modal__visual img {
  object-fit: cover;
}

.modal__visual--mori {
  background: #17352b;
}

.modal__visual--silt {
  background: #1f3ad4;
}

.modal__visual--bloom {
  background: #f1c9cf;
}

.modal__visual--archive {
  background: #ddd6c6;
}

.modal__visual--nomad {
  background: #e8f43c;
}

.modal__visual--echo {
  background: #111110;
}

.modal__content {
  display: flex;
  flex-direction: column;
  padding: clamp(48px, 5vw, 64px) clamp(28px, 4vw, 50px) clamp(30px, 4vw, 48px);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.modal__close:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.modal__close-icon {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 0.8;
}

.modal__content h2 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 56px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}

.modal__subtitle {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.modal__desc {
  margin: 28px 0 0;
  font-size: 13px;
  line-height: 1.95;
  color: var(--ink-soft);
}

.modal__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 34px 0 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.modal__meta div {
  min-width: 0;
}

.modal__meta dt {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.modal__meta dd {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.modal__tags li {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}

.modal__hint {
  margin: auto 0 0;
  padding-top: 32px;
  font-size: 11.5px;
  color: var(--muted);
}

.modal__hint a {
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
}

/* 11. Motion / Responsive
   --------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease);
  transition-delay: var(--delay, 0ms);
}

.js .reveal.is-inview {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbitSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes centerPulse {
  0% {
    opacity: 0.55;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@keyframes scrollLine {
  0% {
    transform: translateY(-100%);
  }
  55%,
  100% {
    transform: translateY(100%);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(183, 255, 210, 0.22);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(183, 255, 210, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(183, 255, 210, 0);
  }
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 var(--live-halo);
  }
  70% {
    box-shadow: 0 0 0 6px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1100px) {
  .section-head {
    grid-template-columns: 40px minmax(0, 1fr) minmax(220px, 290px);
  }

  .hero__headline {
    grid-column: 1 / 13;
  }

  .about__body {
    grid-column: 7 / 13;
  }

  .about__services {
    grid-column: 1 / 7;
  }

  .about__facts {
    grid-column: 7 / 13;
  }
}

@media (max-width: 1300px) {
  .hero__orb {
    right: -18vw;
  }
}

@media (max-width: 1100px) {
  .hero__orb,
  .hero__edge-shade {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 68px;
  }

  .header__cta {
    display: none;
  }

  .brand,
  .header__actions {
    position: relative;
    z-index: 95;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    height: 100vh;
    height: 100svh;
    padding: calc(var(--header-h) + 30px) var(--gutter) 30px;
    overflow-y: auto;
    background: var(--paper);
    visibility: hidden;
    transform: translateY(-100%);
    transition: transform 0.55s var(--ease), visibility 0.55s;
  }

  /* 移除 sticky header 的 backdrop-filter，避免它成为 fixed 导航的包含块。 */
  body.nav-open .site-header {
    background: var(--paper);
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body.nav-open .site-nav {
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .site-nav__links a {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: clamp(42px, 9vw, 64px);
    line-height: 1.15;
    letter-spacing: -0.04em;
  }

  .site-nav__num {
    order: -1;
    width: 28px;
    font-size: 9px;
    letter-spacing: 0;
  }

  .site-nav__arrow {
    margin-left: auto;
    opacity: 1;
    font-family: var(--sans);
    font-size: 26px;
    transform: none;
  }

  .site-nav__aside {
    display: block;
    padding-top: 34px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted);
  }

  .site-nav__aside p {
    margin: 0 0 8px;
  }

  .site-nav__aside > a {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
  }

  .site-nav__wechat {
    margin: 0 0 20px;
    font-family: var(--mono);
    font-size: 9px;
    line-height: 1.7;
    letter-spacing: 0.02em;
    color: var(--muted);
  }

  .site-nav__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
  }

  .site-nav__socials a {
    text-decoration: none;
    color: var(--muted);
  }

  .hero {
    min-height: auto;
    padding: 10px 0 24px;
  }

  .hero__grid {
    min-height: calc(100svh - var(--header-h) - 34px);
    grid-template-rows: auto auto 1fr auto;
    gap: 18px 18px;
  }

  .hero__aside {
    grid-column: 1 / 8;
    grid-row: 1;
    gap: 8px;
  }

  .hero__location {
    display: none;
  }

  .hero__telemetry {
    max-width: none;
    gap: 6px 12px;
    padding-top: 0;
    border-top: 0;
    font-size: 8px;
  }

  .hero__coords {
    display: none;
  }

  .hero__orb {
    display: none;
  }

  .hero {
    min-height: 0;
  }

  .hero__grid {
    min-height: 0;
  }

  .hero__headline {
    grid-column: 1 / 13;
    grid-row: 2;
    align-self: start;
    padding: 20px 0 26px;
  }

  .hero h1 {
    font-size: clamp(58px, 13.2vw, 112px);
  }

  .hero__bottom {
    grid-column: 1 / 13;
    grid-row: 4;
    align-self: end;
  }

  .section-head {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 16px;
  }

  .section-note {
    grid-column: 2;
    justify-self: start;
    margin-top: 8px;
  }

  .works__grid .project,
  .works__grid .project:nth-child(1),
  .works__grid .project:nth-child(2),
  .works__grid .project:nth-child(6) {
    grid-column: span 6;
  }

  .works__grid .project:nth-child(6) {
    grid-column: span 12;
  }

  .works__grid.is-filtered .project,
  .works__grid.is-filtered .project:nth-child(1),
  .works__grid.is-filtered .project:nth-child(2),
  .works__grid.is-filtered .project:nth-child(6) {
    grid-column: span 6;
  }

  .works__grid .project.project--feature {
    grid-column: span 12;
  }

  .about__statement {
    grid-column: 1 / 13;
  }

  .about__body {
    grid-column: 1 / 8;
    padding-top: 0;
  }

  .about__services {
    grid-column: 1 / 7;
  }

  .about__facts {
    grid-column: 7 / 13;
  }

  .modal__shell {
    grid-template-columns: 1fr;
  }

  .modal__visual {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .modal__content {
    padding: 32px 28px 34px;
  }

  .modal__hint {
    margin-top: 26px;
    padding-top: 0;
  }
}

@media (max-width: 680px) {
  .hero__grid {
    min-height: 0;
  }

  .hero__headline {
    padding-top: 14px;
  }

  .hero h1 {
    font-size: clamp(52px, 14.5vw, 82px);
    line-height: 0.92;
    letter-spacing: -0.025em;
  }

  .theme-toggle {
    min-height: 30px;
    padding: 6px;
  }

  .theme-toggle__label {
    display: none;
  }

  .home-return {
    right: 14px;
    bottom: 14px;
    gap: 0;
    padding: 4px;
    border-radius: 50%;
  }

  .home-return__ring {
    width: 38px;
    height: 38px;
  }

  .home-return__label {
    display: none;
  }

  .hero__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .hero__scroll {
    flex-direction: row-reverse;
  }

  .hero__scroll-line {
    height: 1px;
    width: 42px;
  }

  .hero__scroll-line::after {
    animation: none;
    transform: none;
  }

  .section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .section-head h2 {
    font-size: clamp(38px, 10vw, 52px);
  }

  .works__bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .works__grid .project,
  .works__grid .project:nth-child(1),
  .works__grid .project:nth-child(2),
  .works__grid .project:nth-child(6),
  .works__grid.is-filtered .project,
  .works__grid.is-filtered .project:nth-child(1),
  .works__grid.is-filtered .project:nth-child(2),
  .works__grid.is-filtered .project:nth-child(6) {
    grid-column: span 12;
  }

  .works__grid .project__media,
  .works__grid.is-filtered .project__media,
  .works__grid.is-filtered .project--feature .project__media {
    aspect-ratio: 4 / 3;
  }

  .project__open {
    right: 12px;
    bottom: 12px;
    left: auto;
    padding: 8px 11px;
    opacity: 1;
    transform: none;
  }

  .about__body,
  .about__services,
  .about__facts {
    grid-column: 1 / 13;
  }

  .about__body {
    max-width: 540px;
  }

  .about__facts {
    margin-top: 12px;
  }

  .contact__meta {
    align-items: flex-start;
  }

  .contact h2 {
    font-size: clamp(58px, 15vw, 90px);
  }

  .contact__bottom {
    flex-direction: column;
    gap: 26px;
  }

  .contact__note {
    text-align: left;
  }

  .footer__inner {
    flex-wrap: wrap;
    gap: 8px 20px;
  }

  .footer__inner a {
    margin-left: auto;
  }

  .project-modal {
    width: calc(100vw - 24px);
    max-height: calc(100svh - 24px);
  }

  .modal__shell {
    max-height: calc(100svh - 24px);
  }

  .modal__visual {
    aspect-ratio: 4 / 3;
  }

  .modal__close {
    top: 10px;
    right: 10px;
  }

  .modal__content {
    padding: 28px 20px 30px;
  }

  .modal__meta {
    gap: 8px;
  }
}

@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;
  }
}
