:root {
  --paper: #f3f2ec;
  --ink: #151512;
  --muted: #77766f;
  --line: #b9b7af;
  --soft: #e8e6de;
  --mono: "IBM Plex Mono Embedded", "Noto Sans SC Embedded", monospace;
  --display: "Space Mono Embedded", "Noto Sans SC Embedded", monospace;
  --shell: min(1060px, calc(100vw - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(0,0,0,.025) 0 1px, transparent 1.5px) 0 0 / 7px 7px,
    var(--paper);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body[data-lang="zh"] .en,
body[data-lang="en"] .zh { display: none !important; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; }
::selection { color: var(--paper); background: var(--ink); }
.shell { width: var(--shell); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 50;
  width: 0;
  height: 3px;
  background: var(--ink);
}
.noise {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}
.translation-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 272px;
  height: 272px;
  opacity: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: rgba(243, 242, 236, .08);
  box-shadow: inset 0 0 0 1px rgba(243, 242, 236, .38);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.82);
  transition: opacity .16s ease, transform .22s ease;
}
.translation-cursor::before {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 4px;
  height: 4px;
  content: "";
  background: var(--ink);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.translation-cursor span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
  font-size: 8px;
}
.translation-cursor.is-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.site-header {
  height: 86px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .08em;
}
.monogram {
  justify-self: start;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
}
.monogram img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.8) brightness(.8);
}
.site-header nav { display: flex; gap: 10px; align-items: center; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }
.hiking-nav-link { display: inline-flex; align-items: center; gap: 7px; }
.mountain-mark {
  flex: 0 0 auto;
  display: inline-block;
  width: 17px;
  height: 10px;
  background: var(--ink);
  clip-path: polygon(0 100%, 34% 20%, 53% 63%, 70% 34%, 100% 100%);
}
.lang-switch {
  justify-self: end;
  padding: 6px 8px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  cursor: pointer;
}
.lang-switch:hover { color: var(--paper); background: var(--ink); }

.ticker { overflow: hidden; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ticker-track {
  width: max-content;
  padding: 8px 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .14em;
  animation: ticker 24s linear infinite;
}
@keyframes ticker { to { transform: translateX(-50%); } }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 640px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(40px, 8vw, 110px);
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-pattern {
  position: absolute;
  inset: 22px -14vw;
  z-index: -1;
  display: grid;
  align-content: space-around;
  overflow: hidden;
  color: rgba(21, 21, 18, .04);
  font: 400 clamp(34px, 5.8vw, 76px)/1 var(--display);
  letter-spacing: .16em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.hero-pattern span:nth-child(even) { transform: translateX(8vw); }
.doodle-face-hero {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--soft);
}
.doodle-face-hero iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: var(--soft);
}
.hero-copy { max-width: 730px; }
.ink-highlight {
  display: inline-block;
  padding: .04em .18em .1em;
  color: var(--paper);
  background: var(--ink);
  font-weight: 700;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.eyebrow, .paper-role {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .15em;
}
.hero-profession { display: block; width: max-content; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 28px;
  font-family: var(--display);
  font-size: clamp(32px, 5.5vw, 64px);
  line-height: 1.08;
  letter-spacing: -.055em;
}
.hero-name { display: block; width: max-content; max-width: 100%; padding-inline: .15em .2em; }
h1 em { font-style: normal; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.lede { max-width: 650px; font-size: 16px; }
.hero-summary .lede { margin-bottom: 0; }
.hero-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 32px; font-size: 11px; }
.hero-links a { text-decoration: none; }
.hero-links a:hover { text-decoration: underline; }

.hero-lens-copy { position: relative; --lens-x: -200px; --lens-y: -200px; --lens-radius: 0px; }
body[data-lang="en"] .hero .hero-lens-copy > .zh {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block !important;
  overflow: hidden;
  clip-path: circle(var(--lens-radius) at var(--lens-x) var(--lens-y));
  pointer-events: none;
}
body[data-lang="en"] .hero .hero-name > .zh {
  padding: inherit;
  color: var(--paper);
  background: var(--ink);
  white-space: nowrap;
}
body[data-lang="en"] .hero .hero-profession > .zh {
  color: var(--muted);
  background: var(--paper);
  white-space: nowrap;
}
body[data-lang="en"] .hero .hero-summary > .zh,
body[data-lang="en"] .hero .hero-links .hero-lens-copy > .zh { background: var(--paper); }
body[data-lang="en"] .hero .portrait-index > .zh {
  padding: inherit;
  background: rgba(243, 242, 236, .94);
}
body[data-lang="en"] .hero .hero-links .hero-lens-copy > .zh { white-space: nowrap; }

@media (hover: hover) and (pointer: fine) {
  body[data-lang="en"] .hero,
  body[data-lang="en"] .hero a,
  body[data-lang="en"] .hero .dither-portrait { cursor: none; }
}

.section-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  padding: 100px 0;
  border-bottom: 1px solid var(--line);
}
.section-label {
  padding-top: 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.section-label span { display: block; margin-bottom: 10px; color: var(--ink); font-family: var(--display); font-size: 12px; }
.section-label p { margin: 0; }
.section-content h2 {
  max-width: 760px;
  margin-bottom: 34px;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.18;
  letter-spacing: -.035em;
}
.prose > p { max-width: 760px; font-size: 16px; }
.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 36px 0 0;
  list-style: none;
}
.keyword-row li { padding: 5px 9px; border: 1px solid var(--line); font-size: 9px; letter-spacing: .08em; }

.section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.section-heading-row h2 { margin-bottom: 0; }
.section-heading-row > span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.paper-row {
  display: grid;
  grid-template-columns: 115px 1fr;
  border: 1px solid var(--ink);
  border-bottom: 0;
}
.paper-row:last-child { border-bottom: 1px solid var(--ink); }
.paper-row > * { padding: 20px; }
.paper-meta span { overflow-wrap: anywhere; }
.paper-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--ink);
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .08em;
}
.paper-main h3 { margin-bottom: 12px; font-family: var(--display); font-size: 17px; line-height: 1.35; }
.paper-main > p:last-child { margin-bottom: 0; color: #44443f; font-size: 12px; }
.paper-role { margin-bottom: 10px; font-size: 8px; }
.paper-authors { margin: -4px 0 10px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.paper-action {
  display: grid;
  place-items: center;
  border-left: 1px solid var(--ink);
  font-size: 9px;
  text-align: center;
  text-decoration: none;
  writing-mode: vertical-rl;
}
a.paper-action:hover { color: var(--paper); background: var(--ink); }
.featured-paper { background: rgba(255,255,255,.28); }

.timeline { padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--ink); }
.timeline li {
  display: grid;
  grid-template-columns: 130px 1fr 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--ink);
}
.timeline li > span { color: var(--muted); font-size: 9px; }
.timeline strong { font-family: var(--display); font-size: 13px; }
.timeline p { margin: 0; font-size: 11px; text-align: right; }

.album-grid { border-top: 1px solid var(--ink); }
.album-folder {
  display: grid;
  grid-template-columns: 70px 1fr 72px;
  gap: 24px;
  align-items: center;
  min-height: 126px;
  border-bottom: 1px solid var(--ink);
  transition: padding .25s ease, background .25s ease;
}
.album-folder:hover { padding-inline: 14px; background: rgba(255,255,255,.4); }
.folder-number { font-size: 9px; }
.album-folder h3 { margin: 0 0 5px; font: 700 20px/1.2 var(--display); }
.album-folder p { margin: 0; color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.album-count { font: 400 44px/1 var(--display); text-align: right; letter-spacing: -.08em; }
.index-note { margin: 18px 0 0; color: var(--muted); font-size: 9px; letter-spacing: .06em; }

.art-index { border-top: 1px solid var(--ink); }
.art-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) minmax(180px, 38%);
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--ink);
}
.art-copy h3 { margin: 0 0 10px; font: 700 clamp(19px, 2.3vw, 26px)/1.25 var(--display); }
.art-copy a { text-decoration: none; }
.art-copy a:hover { text-decoration: underline; }
.art-arrow { display: inline-block; font-size: .65em; vertical-align: top; margin-top: .12em; }
.art-copy p { margin: 0; color: var(--muted); font-size: 11px; }
.art-medium { display: block; margin-top: 22px; color: var(--muted); font-size: 8px; letter-spacing: .1em; }
.art-preview-wrap { min-width: 0; }
.art-preview {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #f3f2ec;
  cursor: pointer;
  transition: border-color .2s ease;
}
.art-row[data-playing="true"] .art-preview { border-color: var(--ink); }
.art-preview iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.art-preview:focus-visible, .art-copy a:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.art-hint { margin: 8px 0 0; color: var(--muted); font-size: 8px; letter-spacing: .03em; text-align: right; }
.art-seed-form { margin-top: 16px; max-width: 250px; }
.art-seed-form label { display: block; margin-bottom: 7px; font-size: 10px; line-height: 1.5; }
.art-seed-controls { display: flex; gap: 6px; }
.art-seed-controls input {
  min-width: 0; width: 128px; padding: 7px 8px;
  font: inherit; font-size: 10px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 0; background: transparent;
  appearance: textfield; -moz-appearance: textfield;
}
.art-seed-controls input::-webkit-inner-spin-button,
.art-seed-controls input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.art-seed-controls button { padding: 7px 10px; font-size: 10px; color: var(--paper); border: 1px solid var(--ink); border-radius: 0; background: var(--ink); cursor: pointer; }
.art-seed-controls input:focus-visible, .art-seed-controls button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.hiking-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 46px);
  color: var(--paper);
  background:
    linear-gradient(114deg, transparent 0 62%, rgba(255,255,255,.045) 62.2% 62.5%, transparent 62.7%),
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.09) 0 1px, transparent 1.5px) 0 0 / 8px 8px,
    var(--ink);
  border: 1px solid var(--ink);
}
.hiking-card-top,
.hiking-card-body,
.hiking-tags { display: flex; justify-content: space-between; gap: 28px; }
.hiking-card-top { align-items: flex-start; }
.hiking-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 9px;
  letter-spacing: .13em;
}
.mountain-mark-light { width: 23px; height: 14px; background: var(--paper); }
.hiking-year { color: #aaa99f; font-size: 10px; letter-spacing: .14em; }
.hiking-card-body { align-items: flex-end; margin: 70px 0 54px; }
.hiking-card-body > div:first-child { max-width: 570px; }
.hiking-card-body h2 {
  margin-bottom: 18px;
  color: var(--paper);
  font-size: clamp(32px, 5vw, 58px);
}
.hiking-card-body p { max-width: 540px; margin-bottom: 0; color: #c7c5bb; font-size: 12px; }
.hiking-stat { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.hiking-stat strong { font: 400 clamp(56px, 9vw, 104px)/.78 var(--display); letter-spacing: -.1em; }
.hiking-stat span { margin-top: 14px; color: #aaa99f; font-size: 8px; letter-spacing: .16em; }
.hiking-tags { justify-content: flex-start; padding-top: 18px; border-top: 1px solid #4f4e49; color: #aaa99f; font-size: 8px; letter-spacing: .12em; }

.movement-card {
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  color: var(--paper);
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.09) 0 1px, transparent 1.5px) 0 0 / 8px 8px,
    var(--ink);
  border: 1px solid var(--ink);
  text-decoration: none;
}
.movement-card-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 54px); }
.movement-kicker { margin-bottom: 54px; color: #aaa99f; font-size: 9px; letter-spacing: .13em; }
.movement-card h2 { margin-bottom: 18px; color: var(--paper); font-size: clamp(32px, 5vw, 58px); }
.movement-card-copy > p:last-child { max-width: 570px; margin-bottom: 0; color: #c7c5bb; font-size: 12px; }
.movement-card-index {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 28px;
  border-left: 1px solid #4f4e49;
  color: #aaa99f;
  font-size: 8px;
  letter-spacing: .14em;
}
.movement-card-index strong { color: var(--paper); font: 400 76px/.8 var(--display); letter-spacing: -.1em; }
.movement-card:hover .movement-card-index { color: var(--ink); background: var(--paper); }
.movement-card:hover .movement-card-index strong { color: var(--ink); }

.site-footer { position: relative; padding: 80px 0 60px; }
.footer-small { display: flex; justify-content: space-between; gap: 24px; font-size: 9px; }
.footer-small p { margin: 0; }
.thank-you { margin-top: 70px; font: 700 clamp(42px, 9.2vw, 104px)/.74 var(--display); letter-spacing: -.09em; }
.thank-you span { display: block; }
.thank-you span:not(:first-child) { color: transparent; -webkit-text-stroke: 1px var(--line); }
.back-top { position: absolute; right: 0; bottom: 60px; font-size: 10px; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 760px) {
  :root { --shell: min(100% - 28px, 680px); }
  body { font-size: 13px; }
  .site-header { height: 72px; grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 34px; padding: 64px 0 74px; }
  .hero-pattern { inset: 12px -70vw; font-size: 42px; }
  .doodle-face-hero { width: 150px; }
  h1 { font-size: clamp(35px, 11vw, 52px); }
  .section-grid { grid-template-columns: 1fr; gap: 28px; padding: 68px 0; }
  .section-label { display: flex; gap: 12px; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
  .section-label span { margin: 0; }
  .paper-row { grid-template-columns: 72px 1fr; }
  .paper-row > * { padding: 14px; }
  .timeline li { grid-template-columns: 90px 1fr; gap: 12px; }
  .timeline p { grid-column: 2; text-align: left; }
  .album-folder { grid-template-columns: 50px 1fr 42px; gap: 12px; min-height: 108px; }
  .album-count { font-size: 30px; }
  .art-row { grid-template-columns: 30px minmax(0, 1fr) minmax(140px, 42%); gap: 12px; padding: 22px 0; }
  .art-copy h3 { font-size: 18px; }
  .art-copy p { font-size: 10px; }
  .art-medium { margin-top: 12px; font-size: 7px; }
  .art-hint { font-size: 7px; letter-spacing: 0; }
  .art-seed-form label { font-size: 9px; }
  .art-seed-controls input { width: 100%; font-size: 9px; padding-inline: 5px; }
  .art-seed-controls button { font-size: 9px; padding-inline: 7px; }
  .art-seed-controls input, .art-seed-controls button { min-height: 44px; }
  .hiking-card { min-height: 400px; }
  .hiking-card-body { align-items: flex-start; flex-direction: column; margin: 58px 0 42px; }
  .hiking-stat { align-items: flex-start; }
  .hiking-tags { flex-wrap: wrap; gap: 12px 20px; }
  .movement-card { grid-template-columns: minmax(0, 1fr) 110px; }
  .movement-card-index { padding: 20px 14px; }
  .movement-card-index strong { font-size: 52px; }
  .footer-small { flex-direction: column; gap: 2px; }
  .thank-you { margin-top: 52px; }
  .back-top { bottom: 20px; }
}

@media (max-width: 420px) {
  .art-row { grid-template-columns: minmax(0, 1fr) minmax(130px, 46%); column-gap: 14px; row-gap: 8px; }
  .art-row > .folder-number { grid-column: 1 / -1; }
  .art-copy h3 { font-size: 16px; }
  .art-copy p { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
