:root {
  --paper: #f3f0e9;
  --paper-deep: #e9e3d7;
  --ink: #171717;
  --muted: #666159;
  --line: rgba(23, 23, 23, .16);
  --purple: #6548ee;
  --purple-soft: #d9d0ff;
  --mint: #a8e6cf;
  --project-bg: #191919;
  --project-ink: #faf8f2;
  --project-muted: #aaa69e;
  --shadow: 0 34px 80px rgba(55, 46, 31, .16);
}

html[data-theme="dark"] {
  --paper: #151515;
  --paper-deep: #1e1d1b;
  --ink: #f4f0e8;
  --muted: #aaa49a;
  --line: rgba(244, 240, 232, .14);
  --purple: #9b87ff;
  --purple-soft: #352d59;
  --mint: #65bea1;
  --project-bg: #eee9df;
  --project-ink: #171717;
  --project-muted: #6d685f;
  --shadow: 0 34px 90px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--purple) var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  transition: color .35s ease, background-color .35s ease;
}

a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: white; background: var(--purple); }

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.wash {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: .75;
  transition: background .35s ease;
}

.wash-one {
  width: min(55vw, 720px);
  height: min(55vw, 720px);
  right: -12vw;
  top: -23vw;
  background: radial-gradient(circle at center, var(--purple-soft), transparent 69%);
}

.wash-two {
  width: min(44vw, 600px);
  height: min(44vw, 600px);
  left: -18vw;
  bottom: -20vw;
  background: radial-gradient(circle at center, rgba(168, 230, 207, .45), transparent 68%);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: .045;
  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='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.pointer-light {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(101, 72, 238, .12), transparent 68%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .25s ease;
}

.scroll-line {
  position: fixed;
  z-index: 50;
  left: 0;
  top: 0;
  width: 0;
  height: 3px;
  background: var(--purple);
}

.topbar,
.intro,
.project,
footer {
  width: min(1240px, calc(100% - 64px));
  margin-inline: auto;
}

.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.nameplate {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .04em;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

.topbar nav > a {
  position: relative;
  color: var(--muted);
  font-size: 13px;
}

.topbar nav > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -5px;
  height: 1px;
  background: var(--ink);
  transition: right .2s ease;
}

.topbar nav > a:hover { color: var(--ink); }
.topbar nav > a:hover::after { right: 0; }

.theme-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.theme-icon {
  position: relative;
  width: 15px;
  height: 15px;
  display: block;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.theme-icon::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 6px;
  top: -3px;
  border-radius: 50%;
  background: var(--paper);
  transition: transform .3s ease, background .3s ease;
}

html[data-theme="dark"] .theme-icon::after { transform: translate(-6px, 3px); }

.intro {
  position: relative;
  min-height: calc(100svh - 92px);
  padding: 72px 0 105px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  align-items: center;
  gap: 62px;
}

.intro-copy {
  position: relative;
  z-index: 2;
}

.intro h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(78px, 9vw, 132px);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -.07em;
}

.identity {
  margin: 38px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 22px);
  letter-spacing: .01em;
}

.intro-links {
  margin-top: 42px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.primary-link {
  min-height: 52px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  color: white;
  border-radius: 999px;
  background: var(--purple);
  box-shadow: 0 14px 30px rgba(101, 72, 238, .18);
  font-size: 13px;
  font-weight: 750;
  transition: box-shadow .2s ease, filter .2s ease;
}

.primary-link:hover {
  filter: saturate(1.15);
  box-shadow: 0 18px 36px rgba(101, 72, 238, .27);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.portrait-area {
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: .88;
  justify-self: end;
  perspective: 950px;
}

.portrait-backdrop {
  position: absolute;
  inset: 8% 0 0 9%;
  border: 1px solid var(--line);
  border-radius: 46% 54% 52% 48% / 40% 42% 58% 60%;
  transform: rotate(6deg);
}

.portrait-backdrop::before,
.portrait-backdrop::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  border: 1px solid var(--line);
}

.portrait-backdrop::before { inset: 7%; }
.portrait-backdrop::after { inset: 14%; }

.portrait {
  position: absolute;
  inset: 11% 6% 5% 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 43% 57% 49% 51% / 39% 43% 57% 61%;
  background: var(--paper-deep);
  box-shadow: var(--shadow);
  transform: rotate(-2deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform .16s ease-out;
}

.portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform .35s ease;
}

.portrait:hover img { transform: scale(1.06); }

.portrait-mark {
  position: absolute;
  z-index: 3;
  color: var(--purple);
  user-select: none;
}

.mark-one { right: -2%; top: 10%; font-size: 40px; }
.mark-two { left: -8%; top: 33%; font-size: 60px; }
.mark-three { right: 5%; bottom: -2%; font-size: 28px; color: var(--muted); }

.down-link {
  position: absolute;
  left: 0;
  bottom: 28px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.down-link:hover {
  color: var(--ink);
  border-color: var(--ink);
  transform: translateY(4px);
}

.project {
  padding: 110px 0 130px;
}

.project-card {
  position: relative;
  min-height: 590px;
  padding: 68px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: center;
  gap: 72px;
  overflow: hidden;
  color: var(--project-ink);
  border-radius: 44px;
  background: var(--project-bg);
  box-shadow: var(--shadow);
}

.project-card::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  left: -230px;
  top: -230px;
  border: 1px solid rgba(155, 135, 255, .3);
  border-radius: 50%;
  box-shadow:
    0 0 0 55px rgba(155, 135, 255, .035),
    0 0 0 110px rgba(155, 135, 255, .025);
}

.project-copy {
  position: relative;
  z-index: 1;
}

.project-heading {
  min-height: 30px;
  display: flex;
  align-items: center;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--project-muted);
  font-size: 12px;
}

.project-status i {
  width: 8px;
  height: 8px;
  display: block;
  border-radius: 50%;
  background: #d7a850;
}

.project-status.online i {
  background: #64c6a2;
  box-shadow: 0 0 0 5px rgba(100, 198, 162, .1);
}

.project-status.offline i { background: #d86f7d; }

.project h2 {
  margin: 38px 0 24px;
  font-size: clamp(52px, 7vw, 94px);
  line-height: .98;
  letter-spacing: -.065em;
}

.project-copy > p {
  max-width: 500px;
  margin: 0 0 36px;
  color: var(--project-muted);
  font-size: 15px;
  line-height: 1.9;
}

.nutrition-widget {
  position: relative;
  z-index: 1;
  padding: 28px;
  color: var(--ink);
  border-radius: 30px;
  background: var(--paper);
  transform: rotate(1.3deg);
  box-shadow: 0 25px 65px rgba(0, 0, 0, .22);
  transition: transform .22s ease;
}

.nutrition-widget:hover { transform: rotate(0deg) translateY(-4px); }

.widget-title {
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
}

.widget-title button {
  padding: 4px 0;
  color: var(--muted);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.food-list {
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.food-list button {
  padding: 8px 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.food-list button:hover,
.food-list button.active {
  color: white;
  border-color: var(--purple);
  background: var(--purple);
}

.macro {
  margin: 17px 0;
  display: grid;
  grid-template-columns: 50px 1fr 40px;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}

.macro > span { color: var(--muted); }

.macro > div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-deep);
}

.macro i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), #8c74f7);
  transition: width .45s cubic-bezier(.2, .8, .2, 1);
}

.macro b {
  color: var(--muted);
  text-align: right;
  font: 700 10px ui-monospace, monospace;
}

#food-summary {
  min-height: 20px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 11px;
}

footer {
  min-height: 150px;
  padding: 35px 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

footer strong { color: var(--ink); }
footer > div { display: flex; gap: 24px; }
footer a:hover { color: var(--ink); }

.noscript {
  position: fixed;
  z-index: 100;
  left: 20px;
  right: 20px;
  bottom: 20px;
  margin: 0;
  padding: 12px;
  color: white;
  border-radius: 12px;
  background: var(--purple);
  text-align: center;
}

.magnetic {
  --mx: 0px;
  --my: 0px;
  transform: translate(var(--mx), var(--my));
  transition: transform .15s ease-out, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.project {
  display: grid;
  gap: 42px;
}

.human-card {
  --human-accent: #f17454;
  color: #f8f5ee;
  background: #0c1016;
}

.human-card::before {
  width: 620px;
  height: 620px;
  left: auto;
  right: -300px;
  top: -310px;
  border: 0;
  background: radial-gradient(circle, rgba(241, 116, 84, .22), rgba(241, 116, 84, .04) 48%, transparent 70%);
  box-shadow: none;
}

.human-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .08;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .32) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent 15%, black 72%);
}

.human-card > * {
  position: relative;
  z-index: 1;
}

.human-card .project-status {
  color: rgba(248, 245, 238, .58);
}

.project-kicker {
  display: block;
  margin-top: 26px;
  color: var(--human-accent);
  font: 700 11px ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .12em;
}

.human-card h2 {
  margin-top: 20px;
}

.human-card .project-copy > p {
  color: rgba(248, 245, 238, .62);
}

.human-link {
  color: #171717;
  background: var(--human-accent);
  box-shadow: 0 14px 32px rgba(241, 116, 84, .2);
}

.human-link:hover {
  box-shadow: 0 18px 38px rgba(241, 116, 84, .3);
}

.human-widget {
  position: relative;
  z-index: 1;
  padding: 27px;
  overflow: hidden;
  color: #16181d;
  border-radius: 30px;
  background: #f3f0e8;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .32);
  transform: rotate(-1deg);
  transition: transform .22s ease;
}

.human-widget:hover {
  transform: rotate(0deg) translateY(-4px);
}

.human-widget::before {
  content: "";
  position: absolute;
  width: 80px;
  height: 4px;
  top: 0;
  left: 27px;
  background: var(--human-accent);
}

.human-widget-head {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.human-widget-head span {
  font-size: 13px;
  font-weight: 850;
}

.human-widget-head b {
  color: #777168;
  font: 700 9px ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .1em;
}

.human-topic {
  min-height: 58px;
  margin: 0 0 18px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  color: #4f4b45;
  border: 1px solid rgba(22, 24, 29, .1);
  border-radius: 15px;
  background: rgba(255, 255, 255, .46);
  font-size: 13px;
  line-height: 1.65;
}

.human-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.answer-card {
  min-height: 190px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  color: #16181d;
  border: 1px solid rgba(22, 24, 29, .12);
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.answer-card:hover {
  z-index: 1;
  border-color: rgba(22, 24, 29, .34);
  background: rgba(255, 255, 255, .54);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(42, 35, 25, .08);
}

.answer-card span {
  color: #817a70;
  font: 700 9px ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .09em;
}

.answer-card p {
  flex: 1;
  margin: 15px 0 18px;
  font-size: 12px;
  line-height: 1.75;
}

.answer-card b {
  color: #666057;
  font-size: 10px;
  font-weight: 750;
}

.answer-card.locked {
  cursor: default;
  opacity: .52;
  transform: none;
  box-shadow: none;
}

.answer-card.correct,
.answer-card.revealed {
  opacity: 1;
  border-color: #47a482;
  background: rgba(71, 164, 130, .1);
}

.answer-card.wrong {
  opacity: 1;
  border-color: var(--human-accent);
  background: rgba(241, 116, 84, .1);
}

.answer-card.correct b,
.answer-card.revealed b { color: #257858; }
.answer-card.wrong b { color: #b14c34; }

.human-result-row {
  min-height: 34px;
  margin-top: 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.human-result {
  margin: 0;
  color: #777168;
  font-size: 11px;
}

.human-result.success { color: #257858; }
.human-result.fail { color: #b14c34; }

.human-next {
  flex: 0 0 auto;
  padding: 5px 0;
  color: #4f4b45;
  border: 0;
  border-bottom: 1px solid rgba(22, 24, 29, .2);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

html[data-theme="dark"] .human-card {
  color: #171717;
  background: #eee9df;
}

html[data-theme="dark"] .human-card::before {
  background: radial-gradient(circle, rgba(241, 116, 84, .2), rgba(241, 116, 84, .035) 48%, transparent 70%);
}

html[data-theme="dark"] .human-card::after {
  background-image:
    linear-gradient(rgba(23, 23, 23, .3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, .3) 1px, transparent 1px);
}

html[data-theme="dark"] .human-card .project-status {
  color: rgba(23, 23, 23, .58);
}

html[data-theme="dark"] .human-card .project-copy > p {
  color: #6d685f;
}

html[data-theme="dark"] .human-widget {
  color: #f8f5ee;
  background: #10141b;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] .human-widget-head b,
html[data-theme="dark"] .answer-card span,
html[data-theme="dark"] .human-result {
  color: #989187;
}

html[data-theme="dark"] .human-topic {
  color: #d3cdc3;
  border-color: rgba(248, 245, 238, .12);
  background: rgba(255, 255, 255, .035);
}

html[data-theme="dark"] .answer-card {
  color: #f8f5ee;
  border-color: rgba(248, 245, 238, .14);
}

html[data-theme="dark"] .answer-card:hover {
  border-color: rgba(248, 245, 238, .34);
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .answer-card b {
  color: #aaa39a;
}

html[data-theme="dark"] .answer-card.correct,
html[data-theme="dark"] .answer-card.revealed {
  border-color: #65bea1;
  background: rgba(101, 190, 161, .12);
}

html[data-theme="dark"] .answer-card.wrong {
  border-color: var(--human-accent);
  background: rgba(241, 116, 84, .12);
}

html[data-theme="dark"] .answer-card.correct b,
html[data-theme="dark"] .answer-card.revealed b,
html[data-theme="dark"] .human-result.success {
  color: #78cfb2;
}

html[data-theme="dark"] .answer-card.wrong b,
html[data-theme="dark"] .human-result.fail {
  color: #ff9a7e;
}

html[data-theme="dark"] .human-next {
  color: #c8c1b8;
  border-bottom-color: rgba(248, 245, 238, .22);
}

@media (max-width: 900px) {
  .intro {
    grid-template-columns: 1fr;
    padding-top: 90px;
    text-align: center;
  }

  .intro-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .portrait-area {
    width: min(460px, 90vw);
    justify-self: center;
    margin-top: 20px;
  }

  .down-link { left: 50%; transform: translateX(-50%); }
  .down-link:hover { transform: translate(-50%, 4px); }

  .project-card {
    grid-template-columns: 1fr;
    gap: 55px;
  }
}

@media (max-width: 620px) {
  .topbar,
  .intro,
  .project,
  footer {
    width: min(100% - 30px, 1240px);
  }

  .topbar { height: 74px; }
  .topbar nav { gap: 15px; }
  .topbar nav > a:first-child { display: none; }
  .nameplate { font-size: 14px; }

  .intro {
    min-height: auto;
    padding: 84px 0 105px;
    gap: 48px;
  }

  .intro h1 {
    font-size: clamp(52px, 16vw, 72px);
    line-height: 1;
  }

  .identity {
    max-width: 330px;
    margin-top: 28px;
    font-size: 16px;
  }

  .intro-links {
    margin-top: 34px;
    justify-content: center;
    gap: 18px;
  }

  .text-link { font-size: 12px; }

  .portrait-area {
    width: min(350px, 88vw);
  }

  .mark-two { left: -3%; }

  .project { padding: 72px 0 90px; }

  .project-card {
    min-height: 0;
    padding: 36px 22px 28px;
    gap: 40px;
    border-radius: 30px;
  }

  .project h2 {
    margin-top: 28px;
    font-size: clamp(44px, 14vw, 58px);
  }

  .project-copy > p {
    font-size: 14px;
  }

  .nutrition-widget {
    padding: 22px 18px;
    border-radius: 22px;
    transform: none;
  }

  footer {
    grid-template-columns: 1fr auto;
    gap: 20px;
  }

  footer > div {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 620px) {
  .project { gap: 26px; }

  .project-kicker {
    margin-top: 22px;
    font-size: 9px;
  }

  .human-widget {
    padding: 21px 17px;
    border-radius: 22px;
    transform: none;
  }

  .human-widget::before { left: 17px; }

  .human-answers {
    grid-template-columns: 1fr;
  }

  .answer-card {
    min-height: 148px;
  }
}

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