/*
 * 思想之河 · unified page direction
 * Content stays primary; the river and boat only provide orientation.
 */
:root {
  --river-canvas: #f7f5ef;
  --river-paper: rgba(251, 250, 246, .9);
  --river-ink: #26365f;
  --river-body: #536079;
  --river-muted: #7c879b;
  --river-blue: #657cae;
  --river-rule: rgba(38, 54, 95, .17);
  --river-content-right: clamp(54px, 7vw, 105px);
}

html {
  background: var(--river-canvas);
}

body {
  background: var(--river-canvas);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  background: rgba(247, 245, 239, .82);
  pointer-events: none;
}

.nav {
  position: fixed;
  z-index: 2000;
}

.nav nav a,
.nav .say-hi {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav--minimal {
  justify-content: space-between;
  transition: opacity .38s ease, transform .5s var(--ui-motion), background .35s ease;
}

main {
  position: relative;
  z-index: 1;
}

/* Persistent wayfinding river */
.thought-river-guide {
  --boat-x: 6%;
  position: fixed;
  z-index: 120;
  top: 88px;
  right: clamp(26px, 4vw, 68px);
  width: clamp(150px, 16vw, 230px);
  height: calc(100vh - 128px);
  pointer-events: none;
}

.thought-river-guide__water {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(79, 101, 151, .72) 7% 93%, transparent);
  transform: translateX(-50%);
  mask-image: linear-gradient(180deg, transparent, #000 6% 94%, transparent);
  transition: width .7s var(--ui-motion), opacity .55s ease, background .55s ease, transform .7s var(--ui-motion);
}

.thought-river-guide.is-launched .thought-river-guide__water {
  width: 1px;
  opacity: .68;
  background: linear-gradient(180deg, transparent, rgba(79, 101, 151, .76) 7% 93%, transparent);
  transform: translateX(-50%);
}

.thought-river-guide nav {
  position: absolute;
  z-index: 2;
  inset: 0;
}

.thought-river-guide a {
  position: absolute;
  right: 0;
  display: grid;
  grid-template-columns: 24px auto;
  gap: 8px;
  align-items: center;
  width: 92px;
  min-height: 36px;
  color: var(--river-muted);
  pointer-events: auto;
  transition: color .25s ease, transform .3s var(--ui-motion);
}

.thought-river-guide a:nth-child(1) { top: 4%; }
.thought-river-guide a:nth-child(2) { top: 21%; }
.thought-river-guide a:nth-child(3) { top: 38%; }
.thought-river-guide a:nth-child(4) { top: 55%; }
.thought-river-guide a:nth-child(5) { top: 72%; }
.thought-river-guide a:nth-child(6) { top: 89%; }

.thought-river-guide a::before {
  position: absolute;
  top: 50%;
  left: -37px;
  width: 8px;
  height: 8px;
  border: 1px solid var(--river-blue);
  border-radius: 50%;
  content: "";
  background: var(--river-canvas);
  transform: translateY(-50%);
}

.thought-river-guide a span {
  color: var(--river-blue);
  font: 500 8px var(--mono);
  letter-spacing: .08em;
}

.thought-river-guide a strong {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .08em;
}

.thought-river-guide a:hover,
.thought-river-guide a.is-active {
  color: var(--river-ink);
  transform: translateX(-5px);
}

.thought-river-guide a.is-active::before {
  background: var(--river-blue);
  box-shadow: 0 0 0 6px rgba(101, 124, 174, .1);
}

.thought-river-guide__boat {
  position: absolute;
  z-index: 3;
  top: var(--boat-y);
  left: calc(50% - 25px);
  width: 18px;
  transform: translate(-50%, -50%);
  transition: top .55s cubic-bezier(.22, 1, .36, 1);
}

.thought-river-guide__boat img {
  display: block;
  width: 18px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(37, 51, 88, .2));
}

.thought-river-guide__boat span {
  position: absolute;
  top: 50%;
  right: calc(100% + 9px);
  width: max-content;
  color: var(--river-muted);
  font: 500 7px var(--mono);
  letter-spacing: .12em;
  opacity: .75;
  transform: translateY(-50%);
}

/* First screen: thesis and capability, nothing else */
.river-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  gap: clamp(54px, 7vw, 110px);
  align-items: center;
  min-height: 100svh;
  padding: 138px var(--river-content-right) 80px clamp(54px, 7vw, 105px);
  color: var(--river-ink);
  background: transparent;
}

.river-hero .hero-ink-river {
  z-index: -1;
  inset: 0;
  width: 100%;
  opacity: .22;
  transition: opacity .8s ease, transform 1.2s var(--ui-motion);
}

.river-hero .hero-ink-river__base,
.river-hero .hero-ink-river__current {
  object-fit: cover;
  object-position: 68% center;
}

body.river-launched .river-hero .hero-ink-river {
  opacity: .08;
  transform: translateY(4%) scale(1.035);
}

.river-hero__content {
  position: relative;
  z-index: 2;
}

.river-hero .hero-code {
  margin: 0 0 24px;
  color: var(--river-muted);
}

.river-hero__identity {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--river-rule);
}

.river-hero__name {
  margin: 0 0 5px;
  color: var(--river-ink);
  font: 500 11px var(--mono);
  letter-spacing: .2em;
}

.river-hero h1 {
  display: flex;
  align-items: baseline;
  gap: 18px;
  max-width: 680px;
  margin: 0 0 12px;
  color: var(--river-ink);
  font-family: var(--serif);
  font-size: clamp(44px, 4.4vw, 64px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.river-hero h1 span {
  display: inline-block;
  color: #526a9d !important;
  font: 500 9px var(--mono);
  letter-spacing: .14em;
  white-space: nowrap;
}

.river-hero__role {
  margin: 0;
  color: var(--river-body);
  font-size: 13px;
  letter-spacing: .04em;
}

.river-hero__thesis {
  margin-top: 28px;
}

.river-hero__thesis > p {
  margin: 0 0 12px;
  color: var(--river-muted);
  font: 500 8px var(--mono);
  letter-spacing: .14em;
}

.river-hero__thesis h2 {
  margin: 0;
  color: var(--river-ink);
  font-family: var(--serif);
  font-size: clamp(29px, 2.7vw, 40px);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: -.035em;
}

.river-hero__thesis h2 em {
  color: #526a9d;
  font-weight: 400;
}

.river-hero__lead {
  max-width: 570px;
  margin: 24px 0 0;
  color: var(--river-body);
  font-size: 13px;
  line-height: 1.9;
}

.river-hero .scroll-cue {
  position: static;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 30px;
  padding-bottom: 8px;
  color: var(--river-ink);
  border-bottom: 1px solid var(--river-rule);
}

.river-hero__abilities {
  align-self: end;
  margin-bottom: 8vh;
  border-top: 1px solid var(--river-rule);
}

.river-hero__abilities article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 5px 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--river-rule);
}

.river-hero__abilities span {
  grid-row: 1 / 3;
  padding-top: 3px;
  color: var(--river-blue);
  font: 500 8px var(--mono);
}

.river-hero__abilities h2 {
  margin: 0;
  color: var(--river-ink);
  font-size: 16px;
  font-weight: 400;
}

.river-hero__abilities p {
  margin: 0;
  color: var(--river-muted);
  font-size: 11px;
  line-height: 1.7;
}

/* One shared content bank for every chapter */
#faces,
#work,
#thinking,
section#future,
#life {
  width: 100%;
  padding-right: var(--river-content-right) !important;
  padding-left: clamp(54px, 7vw, 105px) !important;
  color: var(--river-ink);
  border-top: 1px solid var(--river-rule);
  background: rgba(247, 245, 239, .76) !important;
}

#faces::before,
#faces::after,
#work::before,
#work::after,
#thinking::before,
#thinking::after,
#future::before,
#future::after,
#life::before,
#life::after {
  opacity: .08 !important;
}

#faces {
  padding-top: 112px !important;
  padding-bottom: 126px !important;
}

#work,
#thinking,
#future,
#life {
  padding-top: 104px !important;
  padding-bottom: 120px !important;
}

.section-label,
.section-label.light {
  color: var(--river-muted) !important;
}

.section-label span {
  border-color: var(--river-rule);
}

/* Resume: content first, decoration second */
#faces .resume-editorial {
  max-width: 1160px;
  margin: 42px 0 0;
}

#faces .resume-editorial__intro {
  min-height: 330px;
  border-top: 1px solid var(--river-rule);
  border-bottom: 1px solid var(--river-rule);
  background: rgba(251, 250, 246, .44);
  box-shadow: none;
}

#faces .resume-editorial__river {
  opacity: .12;
}

#faces .resume-editorial__columns {
  gap: clamp(46px, 6vw, 90px);
}

/* Project and method surfaces share the same quiet paper treatment */
#work .project-folder,
#thinking .workflow-track,
#thinking .method-grid {
  max-width: 1160px;
}

#work .folder-page,
#work .folder-page[data-tone] {
  background: rgba(251, 250, 246, .76);
  box-shadow: 0 24px 70px rgba(48, 62, 96, .07);
}

#work .folder-page-header > div:first-child p,
#work .project-file-description {
  color: var(--river-body) !important;
  font-size: 12px;
}

#work .folder-page-header > div:last-child,
#work .folder-page-header > div:last-child span,
#work .folder-page-header > div:last-child p,
#work .project-file-data {
  color: var(--river-muted) !important;
}

#thinking .workflow-heading {
  max-width: 1160px;
}

#thinking .workflow-track details,
#thinking .method-grid details {
  background: rgba(251, 250, 246, .5);
}

/* Future remains exploratory but sits on the same page bank */
#future .future-stage {
  max-width: 1160px;
  height: 1180px;
  margin-left: 0;
  box-shadow: none;
}

#future .future-stage::before {
  opacity: .14 !important;
}

/* An entered future world becomes a true viewport-level experience. */
.future-immersive-open .thought-river-guide {
  opacity: 0;
  pointer-events: none;
}

#future .future-stage.is-immersive {
  position: fixed;
  z-index: 1500;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  margin: 0;
  background: #080b30;
}

#future .future-stage.is-immersive .future-world.is-active {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body.future-immersive-open > .future-stage.is-immersive {
  position: fixed;
  z-index: 1500;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  border-radius: 0;
  color: rgba(255, 255, 255, .92);
  background: #080b30;
}

body.future-immersive-open > .future-stage.is-immersive > .future-three-canvas,
body.future-immersive-open > .future-stage.is-immersive > .future-depth,
body.future-immersive-open > .future-stage.is-immersive > .future-road-network,
body.future-immersive-open > .future-stage.is-immersive > .future-stage-note,
body.future-immersive-open > .future-stage.is-immersive > .future-sky-decor {
  display: none !important;
}

body.future-immersive-open > .future-stage.is-immersive .future-world.is-active {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body.future-immersive-open > .future-stage.is-immersive .world-detail {
  width: min(34vw, 440px);
  padding: 30px 34px 34px;
  color: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 4px;
  background: rgba(8, 11, 48, .74);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px);
}

body.future-immersive-open > .future-stage.is-immersive .world-detail h3 {
  font-size: clamp(42px, 4.2vw, 62px);
  line-height: 1.06;
}

body.future-immersive-open > .future-stage.is-immersive .world-back {
  margin-bottom: 42px;
}

body.future-immersive-open > .future-stage.is-immersive .world-scene-image {
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  transform: none !important;
  animation: none !important;
}

body.future-immersive-open > .future-stage.is-immersive .world-trigger:hover .world-scene-image,
body.future-immersive-open > .future-stage.is-immersive .world-trigger:focus-visible .world-scene-image {
  transform: none !important;
}

/* Life is a personal tributary, not a separate dark microsite */
#life .life-stack-heading h2 {
  color: var(--river-ink);
  white-space: nowrap;
}

#life .life-stack-heading h2::after {
  background: var(--river-ink);
}

#life .life-stack-heading p,
#life .section-label,
#life .section-label.light {
  color: var(--river-muted) !important;
}

#life .life-scroll-stack {
  width: min(920px, 100%);
  margin-left: 0;
  background: rgba(89, 112, 164, .045);
}

/* Final destination */
.river-footer {
  position: relative;
  z-index: 130;
  min-height: 500px;
  padding: 100px clamp(54px, 7vw, 105px) 36px;
  color: rgba(255, 255, 255, .9);
  background: #243457;
}

.river-footer > p {
  margin: 0;
  color: rgba(255, 255, 255, .5);
}

.river-footer h2 {
  max-width: 900px;
  margin: 44px 0 42px;
  font-family: var(--serif);
  font-size: clamp(38px, 4.4vw, 64px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.035em;
}

.river-footer > button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 44px;
  padding: 0 2px 4px;
  color: #fff;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .4);
  background: transparent;
  font: 500 18px/1.2 var(--sans);
  letter-spacing: .04em;
}

.river-footer > div {
  position: absolute;
  right: clamp(54px, 7vw, 105px);
  bottom: 36px;
  left: clamp(54px, 7vw, 105px);
}

@media (max-width: 1200px) {
  :root {
    --river-content-right: 165px;
  }

  .thought-river-guide {
    right: 14px;
    width: 130px;
  }

  .thought-river-guide a {
    width: 76px;
  }

  .river-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: 58px;
  }

  .river-hero__abilities {
    margin-bottom: 6vh;
  }
}

@media (max-width: 760px) {
  :root {
    --river-content-right: 42px;
  }

  body {
    background-position: 110% -80px;
    background-size: 540px auto;
  }

  .thought-river-guide {
    top: 76px;
    right: 3px;
    width: 34px;
    height: calc(100vh - 96px);
  }

  .thought-river-guide__water {
    width: 42px;
  }

  .thought-river-guide a {
    right: 8px;
    width: 18px;
  }

  .thought-river-guide a::before {
    left: 5px;
  }

  .thought-river-guide a span,
  .thought-river-guide a strong {
    display: none;
  }

  .thought-river-guide__boat {
    left: 8px;
    width: 14px;
  }

  .thought-river-guide__boat img {
    width: 14px;
    height: 46px;
  }

  .thought-river-guide__boat span {
    display: none;
  }

  .river-hero {
    grid-template-columns: 1fr;
    gap: 46px;
    min-height: auto;
    padding-top: 130px;
    padding-bottom: 78px;
  }

  .river-hero .hero-ink-river {
    inset: 0 0 48% 44%;
    width: 56%;
  }

  .river-hero h1 {
    display: block;
    font-size: clamp(40px, 12vw, 58px);
  }

  .river-hero h1 span {
    display: block;
    margin-top: 9px;
  }

  .river-hero__thesis h2 {
    font-size: clamp(28px, 8vw, 36px);
  }

  .river-hero__lead {
    font-size: 13px;
  }

  .river-hero__abilities {
    display: block;
    border-top: 1px solid var(--river-rule);
  }

  .river-hero__abilities article {
    display: grid;
  }

  #faces,
  #work,
  #thinking,
  #future,
  #life {
    padding-left: 22px !important;
  }

  #future .future-stage {
    height: 1450px;
  }

  body.future-immersive-open > .future-stage.is-immersive .future-world.is-active .world-trigger {
    top: 0;
    right: 0;
    width: 100%;
    height: 48vh;
    transform: none;
  }

  body.future-immersive-open > .future-stage.is-immersive .world-detail {
    top: auto;
    right: 16px;
    bottom: 18px;
    left: 16px;
    width: auto;
    max-height: 48vh;
    padding: 20px 22px 22px;
    overflow: auto;
    transform: none;
  }

  body.future-immersive-open > .future-stage.is-immersive .world-detail h3 {
    margin: 16px 0 12px;
    font-size: 34px;
  }

  body.future-immersive-open > .future-stage.is-immersive .world-back {
    margin-bottom: 16px;
  }

  body.future-immersive-open > .future-stage.is-immersive .world-modes {
    margin-top: 18px;
  }

  .river-footer {
    min-height: 440px;
    padding-right: 32px;
    padding-left: 24px;
  }

  .river-footer > div {
    right: 24px;
    left: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thought-river-guide__boat {
    transition: none;
  }
}

/* After departure, chapters share one quiet paper field.
   Only the abstract guide path remains; repeated scenic backgrounds are removed. */
#faces,
#work,
#thinking,
section#future,
#life {
  background-color: var(--river-canvas) !important;
  background-image: none !important;
}

#faces::before,
#faces::after,
#work::before,
#work::after,
#thinking::before,
#thinking::after,
#future::before,
#future::after,
#life::before,
#life::after,
#future .future-stage::before,
#life .fragment-lines,
#life .fragment-star {
  display: none !important;
  content: none !important;
  background: none !important;
}

#faces .resume-editorial__river {
  display: none;
}

@media (max-width: 760px) {
  .river-hero .hero-ink-river {
    inset: 0;
    width: 100%;
    opacity: .16;
  }
}

/* Horizontal voyage guide: the page has one navigation system, anchored below. */
.thought-river-guide {
  top: auto;
  right: clamp(30px, 5vw, 82px);
  bottom: 14px;
  left: clamp(30px, 5vw, 82px);
  width: auto;
  height: 76px;
}

.thought-river-guide__water {
  top: 22px;
  right: 0;
  bottom: auto;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 101, 151, .72) 5% 95%, transparent);
  transform: none;
  mask-image: linear-gradient(90deg, transparent, #000 4% 96%, transparent);
}

.thought-river-guide.is-launched .thought-river-guide__water {
  width: 100%;
  opacity: .68 !important;
  background: linear-gradient(90deg, transparent, rgba(79, 101, 151, .76) 5% 95%, transparent);
  transform: none;
}

.thought-river-guide a {
  top: 36px;
  right: auto;
  display: flex;
  justify-content: center;
  gap: 7px;
  width: 78px;
  min-height: 34px;
  transform: translateX(-50%);
}

.thought-river-guide a:nth-child(1) { top: 36px; left: 6%; }
.thought-river-guide a:nth-child(2) { top: 36px; left: 23.5%; }
.thought-river-guide a:nth-child(3) { top: 36px; left: 41%; }
.thought-river-guide a:nth-child(4) { top: 36px; left: 59%; }
.thought-river-guide a:nth-child(5) { top: 36px; left: 76.5%; }
.thought-river-guide a:nth-child(6) { top: 36px; left: 94%; }

.thought-river-guide a::before {
  top: -18px;
  left: 50%;
  transform: translate(-50%, -50%);
}

.thought-river-guide a:hover,
.thought-river-guide a.is-active {
  transform: translate(-50%, -4px);
}

.thought-river-guide__boat {
  top: 22px;
  left: var(--boat-x);
  width: 58px;
  height: 18px;
  transform: translate(-50%, -50%);
  transition: left .55s cubic-bezier(.22, 1, .36, 1);
}

.thought-river-guide__boat img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 58px;
  transform: translate(-50%, -50%) rotate(90deg);
}

.thought-river-guide__boat span {
  top: auto;
  right: auto;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 1200px) {
  :root {
    --river-content-right: clamp(42px, 5vw, 72px);
  }

  .thought-river-guide {
    right: 24px;
    left: 24px;
    width: auto;
  }

  .thought-river-guide a {
    width: 72px;
  }
}

@media (max-width: 760px) {
  .thought-river-guide {
    right: 10px;
    bottom: 6px;
    left: 10px;
    display: block;
    width: auto;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(247, 245, 239, .9);
    box-shadow: 0 -10px 28px rgba(38, 54, 95, .05);
    backdrop-filter: blur(12px);
  }

  .thought-river-guide__water {
    display: block;
    top: 18px;
  }

  .thought-river-guide a,
  .thought-river-guide a:nth-child(n) {
    top: 30px;
    width: 54px;
    min-height: 30px;
    padding: 0;
    background: transparent;
  }

  .thought-river-guide a::before {
    top: -12px;
    left: 50%;
  }

  .thought-river-guide a span,
  .thought-river-guide a strong {
    display: inline;
  }

  .thought-river-guide a span {
    font-size: 7px;
  }

  .thought-river-guide a strong {
    font-size: 10px;
  }

  .thought-river-guide__boat {
    top: 18px;
    display: block;
  }

  .thought-river-guide__boat img {
    width: 15px;
    height: 48px;
  }

  .thought-river-guide__boat span {
    display: none;
  }
}


/* Final material pass sits after the docking layout rules. */
.thought-river-guide {
  border-color: rgba(66, 84, 126, .09);
  background: linear-gradient(180deg, rgba(255, 255, 252, .4), rgba(245, 244, 239, .64));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .56) inset,
    0 14px 42px rgba(38, 54, 95, .052);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
  backdrop-filter: blur(18px) saturate(112%);
}

body.guide-docked .thought-river-guide {
  background: rgba(247, 245, 239, .86);
  box-shadow:
    0 1px 0 rgba(38, 54, 95, .10),
    0 10px 30px rgba(38, 54, 95, .045);
  -webkit-backdrop-filter: blur(20px) saturate(116%);
  backdrop-filter: blur(20px) saturate(116%);
}

@media (max-width: 760px) {
  .thought-river-guide {
    background: linear-gradient(180deg, rgba(255, 255, 252, .5), rgba(247, 245, 239, .76));
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    backdrop-filter: blur(16px) saturate(110%);
  }

  body.guide-docked .thought-river-guide {
    background: rgba(247, 245, 239, .9);
  }
}

/* Refined horizontal route: number / waypoint / chapter form one clear vertical rhythm. */
.thought-river-guide {
  height: 72px;
  margin: -72px 0 0;
  border: 0;
  border-radius: 0;
  background: rgba(250, 249, 246, .58);
  box-shadow:
    0 1px 0 rgba(73, 91, 135, .07),
    0 12px 32px rgba(38, 54, 95, .035);
  transform: none;
  -webkit-backdrop-filter: blur(18px) saturate(108%);
  backdrop-filter: blur(18px) saturate(108%);
}

.thought-river-guide::after {
  opacity: .038;
}

.thought-river-guide__water,
.thought-river-guide.is-launched .thought-river-guide__water {
  top: 36px;
  right: 5.8%;
  left: 5.8%;
  width: auto;
  height: 1px;
  opacity: .5 !important;
  background: linear-gradient(
    90deg,
    rgba(82, 105, 158, .05),
    rgba(82, 105, 158, .34) 9%,
    rgba(82, 105, 158, .22) 50%,
    rgba(82, 105, 158, .34) 91%,
    rgba(82, 105, 158, .05)
  );
  mask-image: none;
  transform: none;
}

.thought-river-guide a,
.thought-river-guide a:nth-child(n) {
  top: 0;
  display: grid;
  grid-template-rows: 22px 24px 20px;
  place-items: center;
  gap: 0;
  width: 82px;
  height: 68px;
  min-height: 0;
  padding: 3px 0 0;
  border-radius: 0;
  background: transparent;
  transform: translateX(-50%);
}

.thought-river-guide a span {
  align-self: end;
  color: rgba(51, 77, 137, .72);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1;
}

.thought-river-guide a strong {
  grid-row: 3;
  align-self: start;
  color: rgba(48, 69, 116, .72);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1.25;
  white-space: nowrap;
}

.thought-river-guide a::before {
  top: 36px;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(79, 105, 166, .7);
  background: rgba(250, 249, 246, .96);
  box-shadow: 0 0 0 3px rgba(250, 249, 246, .64);
  transform: translate(-50%, -50%);
  transition:
    border-color .25s ease,
    background-color .25s ease,
    box-shadow .25s ease,
    transform .35s var(--ui-motion);
}

.thought-river-guide a:hover,
.thought-river-guide a.is-active {
  background: transparent;
  transform: translateX(-50%);
}

.thought-river-guide a:hover strong,
.thought-river-guide a.is-active strong {
  color: var(--river-ink);
}

.thought-river-guide a.is-active::before {
  border-color: var(--river-blue);
  background: var(--river-blue);
  box-shadow:
    0 0 0 3px rgba(250, 249, 246, .82),
    0 0 0 7px rgba(85, 106, 153, .09);
  transform: translate(-50%, -50%) scale(1.04);
}

.thought-river-guide__boat {
  top: 36px;
  left: calc(var(--boat-x) + 20px);
  width: 34px;
  height: 12px;
  filter: drop-shadow(0 3px 5px rgba(39, 55, 94, .13));
  transform: translate(-50%, -50%);
}

.thought-river-guide__boat img {
  width: 10px;
  height: 30px;
}

.thought-river-guide__boat span {
  display: none;
}

body.guide-docked .thought-river-guide {
  height: 72px;
  background: rgba(249, 248, 244, .97);
  box-shadow:
    0 1px 0 rgba(38, 54, 95, .11),
    0 9px 24px rgba(38, 54, 95, .045);
}

body.guide-docked .nav--minimal {
  visibility: hidden;
}

@media (max-width: 760px) {
  .thought-river-guide {
    top: 68px;
    height: 58px;
    margin: -58px 0 0;
    border-radius: 0;
    background: rgba(250, 249, 246, .76);
    transform: none;
  }

  .thought-river-guide__water,
  .thought-river-guide.is-launched .thought-river-guide__water {
    top: 29px;
    right: 5%;
    left: 5%;
  }

  .thought-river-guide a,
  .thought-river-guide a:nth-child(n) {
    top: 0;
    grid-template-rows: 18px 18px 17px;
    width: 54px;
    height: 55px;
    padding-top: 2px;
  }

  .thought-river-guide a::before {
    top: 29px;
    width: 7px;
    height: 7px;
  }

  .thought-river-guide a span {
    font-size: 6px;
  }

  .thought-river-guide a strong {
    font-size: 9px;
    letter-spacing: .04em;
  }

  .thought-river-guide__boat {
    top: 29px;
    left: calc(var(--boat-x) + 13px);
    width: 28px;
    height: 10px;
  }

  .thought-river-guide__boat img {
    width: 8px;
    height: 24px;
  }

  body.guide-docked .thought-river-guide {
    height: 58px;
  }
}

/* Symmetric page grid: the former right-side guide gutter is no longer reserved. */
:root {
  --river-gutter: clamp(24px, 6vw, 96px);
  --river-content-right: var(--river-gutter);
  --river-content-max: 1160px;
}

.river-hero {
  padding-right: var(--river-gutter);
  padding-left: var(--river-gutter);
}

#faces,
#work,
#thinking,
section#future,
#life {
  padding-right: var(--river-gutter) !important;
  padding-left: var(--river-gutter) !important;
}

#faces > .section-label,
#faces > .resume-editorial,
#work > .section-label,
#work > header,
#work > .project-folder,
#thinking > .workflow-heading,
#thinking > .workflow-track,
#thinking > .method-library,
#future > .section-label,
#future > .future-heading,
#future > .future-stage,
#life > .life-stack-heading,
#life > .life-memory-wheel {
  width: min(100%, var(--river-content-max));
  margin-right: auto;
  margin-left: auto;
}

#faces > .resume-editorial {
  margin-top: 42px;
}

@media (max-width: 760px) {
  :root {
    --river-gutter: 22px;
  }

  .river-hero,
  #faces,
  #work,
  #thinking,
  section#future,
  #life {
    padding-right: var(--river-gutter) !important;
    padding-left: var(--river-gutter) !important;
  }
}

/* Ink-glass finish: keep the voyage guide quiet, tactile and legible. */
.thought-river-guide {
  isolation: isolate;
  border-color: rgba(66, 84, 126, .09);
  background:
    linear-gradient(180deg, rgba(255, 255, 252, .42), rgba(245, 244, 239, .66));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .56) inset,
    0 14px 42px rgba(38, 54, 95, .052);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
  backdrop-filter: blur(18px) saturate(112%);
}

.thought-river-guide::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background: url("assets/hero/cici-ink-river-v1.png") center 48% / 118% auto no-repeat;
  opacity: .072;
  filter: saturate(.62) contrast(.86);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  pointer-events: none;
}

.thought-river-guide nav {
  z-index: 2;
}

.thought-river-guide__water {
  z-index: 1;
  height: 1px;
  opacity: .58;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(72, 94, 143, .18) 5%,
    rgba(72, 94, 143, .46) 27%,
    rgba(72, 94, 143, .24) 54%,
    rgba(72, 94, 143, .42) 78%,
    transparent
  );
  filter: blur(.15px);
}

.thought-river-guide.is-launched .thought-river-guide__water {
  opacity: .62 !important;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(72, 94, 143, .2) 5%,
    rgba(72, 94, 143, .48) 27%,
    rgba(72, 94, 143, .26) 54%,
    rgba(72, 94, 143, .44) 78%,
    transparent
  );
}

.thought-river-guide a {
  border-radius: 999px;
  transition:
    color .24s ease,
    background-color .24s ease,
    transform .4s var(--ui-motion);
}

.thought-river-guide a:hover,
.thought-river-guide a.is-active {
  background: rgba(255, 255, 255, .22);
}

.thought-river-guide a:focus-visible {
  outline: 1px solid rgba(72, 94, 143, .34);
  outline-offset: 3px;
  background: rgba(255, 255, 255, .28);
}

.thought-river-guide a.is-active::before {
  box-shadow:
    0 0 0 4px rgba(249, 248, 244, .72),
    0 0 0 7px rgba(85, 106, 153, .10);
}

.thought-river-guide__boat {
  z-index: 3;
  filter: drop-shadow(0 3px 5px rgba(39, 55, 94, .14));
}

body.guide-docked .thought-river-guide {
  background: rgba(247, 245, 239, .86);
  box-shadow:
    0 1px 0 rgba(38, 54, 95, .10),
    0 10px 30px rgba(38, 54, 95, .045);
  -webkit-backdrop-filter: blur(20px) saturate(116%);
  backdrop-filter: blur(20px) saturate(116%);
}

body.guide-docked .thought-river-guide::after {
  opacity: .048;
  background-position: center 45%;
}

@media (max-width: 760px) {
  .thought-river-guide {
    background: linear-gradient(180deg, rgba(255, 255, 252, .5), rgba(247, 245, 239, .76));
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    backdrop-filter: blur(16px) saturate(110%);
  }

  .thought-river-guide::after {
    opacity: .055;
    background-size: 165% auto;
  }

  body.guide-docked .thought-river-guide {
    background: rgba(247, 245, 239, .9);
  }
}

/* The voyage guide starts at the hero's lower edge, then naturally sticks below the brand bar. */
.thought-river-guide {
  position: sticky;
  z-index: 1900;
  top: 78px;
  right: auto;
  bottom: auto;
  left: auto;
  width: auto;
  margin: -76px clamp(24px, 5vw, 82px) 0;
  overflow: visible;
  border: 1px solid rgba(38, 54, 95, .1);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(251, 250, 246, .5), rgba(247, 245, 239, .78));
  box-shadow: 0 14px 38px rgba(38, 54, 95, .06);
  backdrop-filter: blur(12px);
  transform: translateY(-12px);
  transition:
    top .5s var(--ui-motion),
    transform .5s var(--ui-motion),
    margin-right .5s var(--ui-motion),
    margin-left .5s var(--ui-motion),
    background .35s ease,
    box-shadow .35s ease;
}

body.guide-docked .nav--minimal {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

body.guide-docked .thought-river-guide {
  position: fixed;
  z-index: 2100;
  top: 0;
  right: 0;
  left: 0;
  margin-top: 0;
  margin-right: 0;
  margin-left: 0;
  transform: none;
  overflow: visible;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: rgba(247, 245, 239, .96);
  box-shadow: 0 1px 0 rgba(38, 54, 95, .14), 0 12px 32px rgba(38, 54, 95, .06);
}

body.guide-docked .thought-river-guide__boat span {
  display: none;
}

@media (max-width: 760px) {
  .thought-river-guide {
    position: sticky;
    top: 72px;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    height: 64px;
    margin: -64px 10px 0;
    border-radius: 12px;
    transform: translateY(-8px);
  }

  body.guide-docked .thought-river-guide {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    margin-top: 0;
    margin-right: 0;
    margin-left: 0;
    border-radius: 0;
    transform: none;
  }
}

/* Material override: deliberately last so the sticky and docked states share one finish. */
.thought-river-guide {
  border-color: rgba(66, 84, 126, .09);
  background: linear-gradient(180deg, rgba(255, 255, 252, .4), rgba(245, 244, 239, .64));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .56) inset,
    0 14px 42px rgba(38, 54, 95, .052);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
  backdrop-filter: blur(18px) saturate(112%);
}

body.guide-docked .thought-river-guide {
  background: rgba(247, 245, 239, .86);
  box-shadow:
    0 1px 0 rgba(38, 54, 95, .10),
    0 10px 30px rgba(38, 54, 95, .045);
  -webkit-backdrop-filter: blur(20px) saturate(116%);
  backdrop-filter: blur(20px) saturate(116%);
}

@media (max-width: 760px) {
  .thought-river-guide {
    background: linear-gradient(180deg, rgba(255, 255, 252, .5), rgba(247, 245, 239, .76));
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    backdrop-filter: blur(16px) saturate(110%);
  }

  body.guide-docked .thought-river-guide {
    background: rgba(247, 245, 239, .9);
  }
}

/* Route polish must remain last: later legacy material rules should not flatten its hierarchy. */
.thought-river-guide {
  height: 72px;
  margin: -72px 0 0;
  border: 0;
  border-radius: 0;
  background: rgba(250, 249, 246, .58);
  box-shadow:
    0 1px 0 rgba(73, 91, 135, .07),
    0 12px 32px rgba(38, 54, 95, .035);
  transform: none;
  -webkit-backdrop-filter: blur(18px) saturate(108%);
  backdrop-filter: blur(18px) saturate(108%);
}

.thought-river-guide::after {
  opacity: .038;
}

.thought-river-guide__water,
.thought-river-guide.is-launched .thought-river-guide__water {
  top: 36px;
  right: 5.8%;
  left: 5.8%;
  width: auto;
  opacity: .5 !important;
  background: linear-gradient(
    90deg,
    rgba(82, 105, 158, .05),
    rgba(82, 105, 158, .34) 9%,
    rgba(82, 105, 158, .22) 50%,
    rgba(82, 105, 158, .34) 91%,
    rgba(82, 105, 158, .05)
  );
  mask-image: none;
}

.thought-river-guide a:hover,
.thought-river-guide a.is-active {
  background: transparent;
}

.thought-river-guide a.is-active::before {
  box-shadow:
    0 0 0 3px rgba(250, 249, 246, .82),
    0 0 0 7px rgba(85, 106, 153, .09);
}

body.guide-docked .thought-river-guide {
  height: 72px;
  background: rgba(249, 248, 244, .97);
  box-shadow:
    0 1px 0 rgba(38, 54, 95, .11),
    0 9px 24px rgba(38, 54, 95, .045);
}

@media (max-width: 760px) {
  .thought-river-guide {
    top: 68px;
    height: 58px;
    margin: -58px 0 0;
    border-radius: 0;
    background: rgba(250, 249, 246, .76);
    transform: none;
  }

  .thought-river-guide__water,
  .thought-river-guide.is-launched .thought-river-guide__water {
    top: 29px;
    right: 5%;
    left: 5%;
  }

  body.guide-docked .thought-river-guide {
    height: 58px;
    background: rgba(249, 248, 244, .97);
  }
}
