@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,600;1,300&display=swap");

:root {
  --bg: #070707;
  --fg: #ffffff;
  --muted: #a9a9a9;
  --dim: #474747;
  --line: #1d1d1d;
  --panel: #0d0d0d;
  --ambient-x: 0px;
  --ambient-y: 0px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0;
}

html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

html.is-leaving::before {
  opacity: 1;
}

html.nav-transition::before {
  animation: pageTransitionReveal 420ms ease forwards;
}

.hero,
.memory-page {
  transition: opacity 320ms ease, filter 320ms ease, transform 320ms ease;
}

.is-leaving .hero,
.is-leaving .memory-page {
  opacity: 0.72;
  filter: blur(0.3px);
  transform: translateY(-4px);
}

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

a:hover {
  color: var(--muted);
}

.page {
  min-height: 100vh;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
  perspective: 900px;
  animation: loaderExit 420ms ease 2.48s forwards;
}

.loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035), transparent 36%),
    radial-gradient(ellipse at 50% 58%, rgba(255, 255, 255, 0.035), transparent 48%);
  opacity: 0;
  animation: loaderPulse 2.2s ease forwards;
}

.loader-floor {
  position: absolute;
  left: 50%;
  top: 56%;
  width: min(1240px, 116vw);
  height: min(760px, 76vh);
  background:
    linear-gradient(rgba(255, 255, 255, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 58px 58px;
  border-radius: 2px;
  mask-image: linear-gradient(to top, black 0%, black 54%, transparent 88%);
  opacity: 0;
  transform: translate(-50%, -50%) rotateX(72deg) translateY(320px) translateZ(430px) scale(3.5);
  transform-origin: center bottom;
  animation: loaderFloor 2.32s cubic-bezier(0.12, 0.82, 0.18, 1) forwards;
}

.loader-scan {
  position: relative;
  z-index: 1;
  color: var(--dim);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0;
  font-style: italic;
  animation: loaderText 1.55s steps(11, end) forwards;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
}

.ready .loader {
  display: none;
}

.start-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.045), transparent 34%),
    var(--bg);
  color: var(--fg);
  cursor: pointer;
  font: inherit;
  letter-spacing: 0;
}

.start-gate span {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
}

.start-gate-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  font-style: italic;
  font-weight: 300;
}

.start-gate .start-gate-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92px;
  height: 92px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #4d4d4d;
  opacity: 0.2;
  transform: translate(-50%, -50%) scale(0.72);
  animation: startGatePulse 1.9s ease-in-out infinite;
}

.intro-started .start-gate,
.ready .start-gate {
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.intro-pending:not(.intro-started) .loader,
.intro-pending:not(.intro-started) .loader::before,
.intro-pending:not(.intro-started) .loader-floor,
.intro-pending:not(.intro-started) .loader-scan,
.intro-pending:not(.intro-started) .hero-inner,
.intro-pending:not(.intro-started) .signature,
.intro-pending:not(.intro-started) .signature path,
.intro-pending:not(.intro-started) .hero-inner > h1,
.intro-pending:not(.intro-started) .hero-inner > p,
.intro-pending:not(.intro-started) .hero-links,
.intro-pending:not(.intro-started) .contact-row,
.intro-pending:not(.intro-started) .lang,
.intro-pending:not(.intro-started) .sound-toggle {
  animation-play-state: paused !important;
}

.hero {
  overflow: hidden;
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 96px 24px 64px;
  perspective: 900px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 68%);
  opacity: 0.45;
  transform: translate(calc(var(--ambient-x) * 0.35), calc(var(--ambient-y) * 0.35));
  transition: transform 420ms ease-out;
  animation: gridDrift 18s linear infinite;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 16%, rgba(255, 255, 255, 0.035) 42%, transparent 66%),
    linear-gradient(248deg, transparent 20%, rgba(255, 255, 255, 0.025) 48%, transparent 72%);
  opacity: 0.65;
  transform: translate(calc(var(--ambient-x) * -0.55), calc(var(--ambient-y) * -0.55)) scale(1.08);
  transition: transform 520ms ease-out;
  animation: ambientOrbit 28s ease-in-out infinite alternate;
}

.ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  transform: translate(var(--ambient-x), var(--ambient-y));
  transition: transform 360ms ease-out;
}

.ambient-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 620px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  opacity: 0.18;
  transform-origin: center;
}

.ambient-line-a {
  animation: lineSweepA 16s ease-in-out infinite;
}

.ambient-line-b {
  animation: lineSweepB 22s ease-in-out infinite;
}

.ambient-line-c {
  animation: lineSweepC 26s ease-in-out infinite;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(458px, calc(100vw - 48px));
  margin-top: -67px;
  margin-left: -68px;
  opacity: 0;
  transform: translateX(34px) translateZ(-260px) scale(0.96);
  transform-style: preserve-3d;
  animation: heroArrive 1150ms cubic-bezier(0.14, 0.82, 0.18, 1) 2.9s forwards;
}

.signature {
  width: 100%;
  height: 155px;
  display: block;
  opacity: 0;
  margin-bottom: 16px;
  animation: signatureReveal 360ms ease 2.9s forwards;
}

.signature svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.signature path {
  fill: transparent;
  stroke: #858585;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signature.is-written path {
  fill: #4a4a4a;
  stroke: transparent;
  transition: fill 900ms ease, stroke 900ms ease;
}

.hero-inner > h1,
.hero-inner > p,
.hero-links,
.contact-row,
.lang {
  opacity: 0;
  transform: translateY(8px);
  animation: revealUp 800ms ease forwards;
}

.hero-inner > h1 {
  animation-delay: 5.18s;
}

.hero-inner > p {
  animation-delay: 5.34s;
}

.hero-links {
  animation-delay: 5.52s;
}

.contact-row {
  animation-delay: 5.68s;
}

.hero-links,
.philosophy-nav,
.philosophy-pages,
.philosophy-copy,
.philosophy-memory,
.memory-nav,
.lang,
.memory-lang {
  -webkit-user-select: none;
  user-select: none;
}

.lang {
  animation-delay: 5.82s;
}

.sound-toggle {
  position: absolute;
  left: calc(50% - 80px);
  bottom: 80px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 160px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #121212;
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  line-height: 20.8px;
  font-weight: 400;
  letter-spacing: 0;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  animation: revealUp 420ms ease 5.92s forwards;
  transition: background 160ms ease;
  -webkit-user-select: none;
  user-select: none;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  background: #1c1c1c;
  outline: none;
}

.intro-skip .hero-inner,
.intro-complete .hero-inner {
  opacity: 1;
  transform: translateX(34px) translateZ(0) scale(1);
  animation: none;
}

.intro-skip .signature,
.intro-complete .signature {
  opacity: 0.62;
  animation: none;
}

.intro-skip .hero-inner > h1,
.intro-skip .hero-inner > p,
.intro-skip .hero-links,
.intro-skip .contact-row,
.intro-skip .lang,
.intro-skip .sound-toggle,
.intro-complete .hero-inner > h1,
.intro-complete .hero-inner > p,
.intro-complete .hero-links,
.intro-complete .contact-row,
.intro-complete .lang,
.intro-complete .sound-toggle {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

.intro-skip .hero-inner {
  opacity: 0;
  transform: translateX(34px) translateZ(-34px) scale(0.985);
  animation: reloadHeroEnter 520ms cubic-bezier(0.14, 0.82, 0.18, 1) 80ms forwards;
}

.intro-skip .signature {
  opacity: 0;
  animation: signatureReveal 260ms ease 120ms forwards;
}

.intro-skip .hero-inner > h1,
.intro-skip .hero-inner > p,
.intro-skip .hero-links,
.intro-skip .contact-row,
.intro-skip .lang {
  opacity: 0;
  transform: translateY(8px);
  animation: revealUp 420ms ease forwards;
}

.intro-skip .hero-inner > h1 {
  animation-delay: 180ms;
}

.intro-skip .hero-inner > p {
  animation-delay: 230ms;
}

.intro-skip .hero-links {
  animation-delay: 280ms;
}

.intro-skip .contact-row {
  animation-delay: 330ms;
}

.intro-skip .lang {
  animation-delay: 380ms;
}

.intro-skip .sound-toggle {
  opacity: 0;
  transform: translateY(8px);
  animation: revealUp 420ms ease 430ms forwards;
}

.hero h1 {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 600;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 300;
}

.hero-links {
  display: grid;
  margin-top: 47px;
  width: 100%;
  font-size: 14px;
  line-height: 20px;
  font-style: italic;
  font-weight: 300;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  width: 100%;
}

.socials {
  display: flex;
  gap: 16px;
  font-size: 12px;
  line-height: 16px;
  font-style: italic;
  font-weight: 300;
}

.github-link {
  font-size: 12px;
  line-height: 16px;
  font-style: italic;
  font-weight: 300;
}

.lang {
  position: absolute;
  z-index: 1;
  left: calc(50% - 32px);
  bottom: 32px;
  transform: translateY(8px);
  display: flex;
  justify-content: space-between;
  width: 64px;
  height: 16px;
  font-size: 16px;
  line-height: 20.8px;
  font-style: italic;
  font-weight: 300;
}

.lang button,
.memory-lang button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--dim);
  font: inherit;
  letter-spacing: 0;
  cursor: pointer;
}

.lang button[aria-pressed="true"],
.memory-lang button[aria-pressed="true"] {
  color: var(--fg);
}

.philosophy-view {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  padding: 0 24px;
  pointer-events: none;
}

.philosophy-nav {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  width: 261px;
  height: 24px;
  opacity: 0;
  transform-origin: center;
  color: var(--dim);
  font-size: 16px;
  line-height: 20.8px;
  font-style: italic;
  font-weight: 300;
}

.philosophy-nav a,
.philosophy-nav button,
.philosophy-pages button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  cursor: pointer;
}

.philosophy-nav button:nth-child(3) {
  color: var(--muted);
}

.philosophy-pages {
  position: fixed;
  left: 50%;
  top: auto;
  bottom: calc(32px + 16px + 40px);
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  height: 24px;
  opacity: 0;
  color: var(--dim);
  font-size: 16px;
  line-height: 20.8px;
  font-style: italic;
  font-weight: 300;
}

.philosophy-pages button {
  position: relative;
  width: 20px;
  height: 24px;
  text-align: center;
}

.philosophy-pages button.is-active {
  color: var(--muted);
  animation: pageActivePulse 220ms ease;
}

.philosophy-pages button.is-active::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 1px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.philosophy-pages button.is-hidden {
  display: none;
}

.philosophy-pages.is-hidden {
  opacity: 0 !important;
  pointer-events: none;
}

.philosophy-copy {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(446px, calc(100vw - 48px));
  min-height: 147px;
  margin: 0;
  opacity: 0;
  transform: translate(-50%, -50%);
  color: var(--fg);
  font-size: 16px !important;
  line-height: 20.8px !important;
  font-weight: 300;
  text-align: left;
  white-space: pre-line;
}

.philosophy-memory {
  position: absolute;
  left: calc(50% - 61px);
  bottom: 80px;
  display: grid;
  place-items: center;
  width: 122px;
  height: 40px;
  border-radius: 8px;
  background: #121212;
  color: var(--fg);
  font-size: 16px;
  line-height: 20.8px;
  font-weight: 300;
  opacity: 0;
  pointer-events: none;
  transition: background-color 160ms ease, opacity 320ms ease;
}

.philosophy-memory.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.philosophy-memory:hover,
.philosophy-memory:active {
  background: #1c1c1c;
  color: var(--fg);
}

.is-philosophy .hero-inner,
.is-philosophy .contact-row,
.is-philosophy .sound-toggle {
  opacity: 0 !important;
  transform: translateY(-10px) !important;
  animation: none !important;
  transition: opacity 420ms ease, transform 420ms ease;
  pointer-events: none;
}

.is-philosophy .hero-inner > *,
.is-philosophy .signature,
.is-philosophy .signature path {
  animation: none !important;
}

.is-philosophy .lang {
  bottom: 32px;
  font-size: 16px;
  opacity: 1;
  transform: translateY(0);
  animation: none;
  transition: bottom 420ms ease, font-size 420ms ease;
}

.is-philosophy .philosophy-view {
  pointer-events: auto;
}

.is-philosophy .philosophy-nav {
  animation: philosophyReveal 520ms ease 260ms forwards;
}

.is-philosophy .philosophy-pages {
  animation: philosophyReveal 520ms ease 520ms forwards;
}

.is-philosophy .philosophy-copy {
  opacity: 1;
  transition: opacity 680ms ease 820ms;
}

.philosophy-copy.is-changing {
  animation: philosophySwap 520ms ease forwards;
  transition: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.memory-body {
  min-height: 100vh;
  overflow: hidden;
}

.memory-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  perspective: 900px;
}

.memory-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 68%);
  opacity: 0.45;
  animation: gridDrift 18s linear infinite;
}

.memory-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 16%, rgba(255, 255, 255, 0.035) 42%, transparent 66%),
    linear-gradient(248deg, transparent 20%, rgba(255, 255, 255, 0.025) 48%, transparent 72%);
  opacity: 0.65;
  transform: scale(1.08);
  animation: ambientOrbit 28s ease-in-out infinite alternate;
}

.memory-ambient {
  z-index: 0;
}

.memory-nav {
  position: absolute;
  top: 32px;
  left: 50%;
  z-index: 3;
  display: flex;
  width: 234px;
  height: 18px;
  transform: translateX(-50%);
  gap: 16px;
  color: #333333;
  font-size: 14px;
  line-height: 18.2px;
  font-style: italic;
  font-weight: 300;
}

.memory-nav .is-active {
  color: var(--fg);
}

.memory-shell {
  position: absolute;
  top: calc(50vh - 61px);
  top: calc(50svh - 61px);
  left: 50%;
  z-index: 2;
  width: 628px;
  transform: translateX(-50%);
  --memory-signature-width: 340px;
  --memory-signature-height: 138px;
  --memory-signature-offset: -202px;
}

.memory-page.is-chatting .memory-shell {
  top: 0;
  bottom: 0;
  height: 100vh;
}

.memory-signature {
  position: absolute;
  top: var(--memory-signature-offset);
  left: 50%;
  width: var(--memory-signature-width);
  height: var(--memory-signature-height);
  margin: 0;
  opacity: 0;
  transform: translateX(-50%);
  animation: memorySignatureReveal 360ms ease 120ms forwards;
}

.memory-page.is-chatting .memory-signature,
.memory-page.is-chatting .memory-suggestions-wrap,
.memory-page.is-chatting .memory-portfolio {
  display: none;
}

.memory-signature svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.memory-signature path {
  fill: transparent;
  stroke: #333333;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.memory-signature.is-written path {
  fill: #333333;
  stroke: transparent;
  transition: fill 900ms ease, stroke 900ms ease;
}

.memory-card {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 112px;
  padding: 8px;
  border: 0;
  border-radius: 16px;
  background: #121212;
  opacity: 0;
  transform: translateY(6px);
  animation: memoryEnter 180ms ease 180ms forwards;
}

.memory-page.is-chatting .memory-card {
  position: absolute;
  right: 0;
  bottom: 80px;
  left: 0;
  animation: memoryEnter 160ms ease forwards;
}

.memory-input {
  display: block;
  width: 100%;
  height: 62px;
  resize: none;
  border: 0;
  border-radius: 10px;
  padding: 4px 8px;
  overflow: hidden;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  line-height: 15.6px;
  font-weight: 400;
  letter-spacing: 0;
  outline: none;
}

.memory-input::placeholder {
  color: #333333;
  font-style: italic;
  font-weight: 300;
}

.memory-actions {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
}

.memory-filter {
  position: relative;
  flex: 0 0 auto;
}

.memory-filter-button {
  display: flex;
  align-items: center;
  width: 188px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  padding: 0 8px;
  gap: 8px;
  background: transparent;
  color: #4d4d4d;
  font: inherit;
  font-size: 12px;
  line-height: 15.6px;
  font-weight: 400;
  letter-spacing: 0;
  cursor: pointer;
}

.memory-filter-button:hover,
.memory-filter-button:focus-visible {
  background: #1c1c1c;
  outline: none;
}

.memory-filter-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.memory-filter-arrow {
  width: 12px;
  height: 9px;
  margin-left: auto;
  flex: 0 0 12px;
}

.memory-filter-button [data-memory-filter-label] {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.memory-filter-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 4;
  display: grid;
  grid-auto-rows: 26px;
  gap: 2px;
  width: 225px;
  height: 174px;
  padding: 4px;
  border: 0;
  border-radius: 12px;
  background: #121212;
  box-shadow: inset 0 0 0 1px #1f1f1f;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.memory-filter.is-open .memory-filter-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.memory-filter-menu button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 217px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  padding: 0 4px;
  background: transparent;
  color: #4d4d4d;
  font: inherit;
  font-size: 12px;
  line-height: 15.6px;
  text-align: left;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.memory-filter-menu .is-previewed,
.memory-filter:not(.is-browsing-options) .memory-filter-menu .is-selected {
  background: #1c1c1c;
  color: var(--fg);
  outline: none;
}

.memory-option-circle {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  opacity: 1 !important;
  filter: brightness(1.85);
}

.memory-filter-menu button span {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.memory-filter-menu .is-selected span {
  padding-right: 16px;
}

.memory-option-check {
  position: absolute;
  right: 4px;
  top: 7px;
  width: 12px;
  height: 12px;
  opacity: 0;
}

.memory-filter-menu .is-selected .memory-option-check {
  opacity: 1;
}

.memory-count {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  height: 24px;
  min-width: 0;
  flex: 1 1 auto;
  margin-left: auto;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  color: #4d4d4d;
  font-size: 12px;
  line-height: 15.6px;
  font-style: normal;
  font-weight: 400;
  text-align: right;
  white-space: nowrap;
}

.memory-count-current {
  color: #4d4d4d;
}

.memory-page.is-filled .memory-count-current {
  color: var(--fg);
}

.memory-send {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: #333333;
  color: var(--fg);
  cursor: pointer;
}

.memory-send img {
  width: 16px;
  height: 16px;
}

.memory-send:hover,
.memory-send:focus-visible {
  background: #4d4d4d;
}

.memory-suggestions-wrap {
  position: relative;
  width: 628px;
  height: 200px;
  margin: 12px auto 0;
  opacity: 0;
  transform: translateY(6px);
  animation: memoryEnter 220ms ease 250ms forwards;
}

.memory-suggestions {
  width: 100%;
  height: 100%;
  padding: 12px 16px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  scrollbar-width: thin;
  scrollbar-color: #333333 transparent;
}

.memory-suggestions:hover,
.memory-suggestions:focus-within {
  overflow-y: auto;
}

.memory-suggestions::-webkit-scrollbar {
  width: 4px;
}

.memory-suggestions::-webkit-scrollbar-track {
  background: transparent;
}

.memory-suggestions::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #333333;
}

.memory-suggestions button {
  display: block;
  width: 100%;
  height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #4d4d4d;
  font: inherit;
  font-size: 12px;
  line-height: 15.6px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  opacity: 0;
  transform: translateY(4px);
  animation: memoryEnter 180ms ease forwards;
}

.memory-suggestions button:nth-child(1) { animation-delay: 250ms; }
.memory-suggestions button:nth-child(2) { animation-delay: 275ms; }
.memory-suggestions button:nth-child(3) { animation-delay: 300ms; }
.memory-suggestions button:nth-child(4) { animation-delay: 325ms; }
.memory-suggestions button:nth-child(5) { animation-delay: 350ms; }
.memory-suggestions button:nth-child(6) { animation-delay: 375ms; }
.memory-suggestions button:nth-child(7) { animation-delay: 400ms; }
.memory-suggestions button:nth-child(8) { animation-delay: 425ms; }
.memory-suggestions button:nth-child(9) { animation-delay: 450ms; }

.memory-suggestions button:hover,
.memory-suggestions button:focus-visible {
  color: var(--fg);
  outline: none;
}

.memory-chat {
  position: relative;
  width: 612px;
  height: 558px;
  margin: 0 auto;
  overflow: hidden;
  overflow-y: auto;
  padding: 0 0 20px;
  scrollbar-width: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.memory-chat::-webkit-scrollbar {
  display: none;
}

.memory-page.is-chatting .memory-chat {
  position: absolute;
  top: 82px;
  bottom: 192px;
  left: 50%;
  height: auto;
  max-height: none;
  transform: translateX(-50%);
}

.memory-page.chat-fade-top .memory-chat {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 100%);
}

.memory-page.chat-fade-bottom .memory-chat {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 72px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 72px), transparent 100%);
}

.memory-page.chat-fade-top.chat-fade-bottom .memory-chat {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 calc(100% - 72px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 calc(100% - 72px), transparent 100%);
}

.memory-chat:not([hidden]) {
  display: block;
}

.memory-chat-row {
  display: flex;
  width: 100%;
  margin: 0 0 16px;
  opacity: 0;
  transform: translateY(6px);
  animation: memoryEnter 180ms ease forwards;
}

.memory-chat-row.is-user {
  justify-content: flex-end;
}

.memory-chat-row.is-memory,
.memory-chat-row.is-thinking {
  justify-content: flex-start;
}

.memory-chat-bubble {
  font-size: 12px;
  line-height: 15.6px;
  font-weight: 400;
  letter-spacing: 0;
}

.memory-chat-row.is-user .memory-chat-bubble {
  width: fit-content;
  max-width: min(456px, 100%);
  min-height: 32px;
  padding: 8px 12px;
  border-radius: 16px;
  background: #121212;
  color: var(--fg);
  text-align: right;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.memory-chat-row.is-memory .memory-chat-bubble {
  width: 100%;
  min-height: 80px;
  padding: 8px 12px;
  color: var(--fg);
}

.memory-chat-row.is-memory .memory-chat-bubble h3 {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
}

.memory-chat-row.is-memory .memory-chat-bubble p {
  margin: 0 0 12px;
}

.memory-chat-row.is-memory .memory-chat-bubble p:last-child,
.memory-answer-bullet:last-child {
  margin-bottom: 0;
}

.memory-answer-bullet {
  position: relative;
  margin: 0 0 6px;
  padding-left: 14px;
}

.memory-answer-bullet::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.72;
}

.memory-chat-row.is-memory .memory-chat-bubble strong {
  font-weight: 600;
}

.memory-chat-row.is-memory {
  flex-direction: column;
}

.memory-inline-link {
  position: relative;
  color: #6aa8ff;
  text-decoration: none;
  white-space: nowrap;
}

.memory-inline-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  opacity: 0;
  background-image: radial-gradient(circle, #6aa8ff 1.2px, transparent 1.4px);
  background-size: 6px 2px;
  background-repeat: repeat-x;
  transition: opacity 160ms ease;
}

.memory-inline-link:hover::after,
.memory-inline-link:focus-visible::after {
  opacity: 1;
}

.memory-inline-link:focus-visible {
  outline: none;
}

.memory-sources {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
}

.memory-source-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 56px;
  padding: 12px;
  border-radius: 16px;
  background: #121212;
  color: var(--fg);
  text-decoration: none;
}

.memory-source-icon {
  display: block;
  width: 32px;
  height: 32px;
  padding: 4px;
  border-radius: 8px;
  background: #1c1c1c;
  object-fit: contain;
}

.memory-source-body {
  display: grid;
  min-width: 0;
}

.memory-source-title,
.memory-source-type,
.memory-source-open {
  font-size: 12px;
  line-height: 15.6px;
  letter-spacing: 0;
}

.memory-source-title {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-source-type {
  color: #4d4d4d;
}

.memory-source-open {
  display: grid;
  min-width: 75px;
  min-height: 24px;
  place-items: center;
  border-radius: 8px;
  background: #1c1c1c;
  color: #fff;
  font-weight: 300;
}

.memory-chat-row.is-thinking {
  align-items: center;
  height: 24px;
  margin-top: 0;
  color: #4d4d4d;
  font-size: 12px;
  line-height: 15.6px;
  font-style: italic;
  font-weight: 300;
}

.memory-thinking-wave {
  display: inline-flex;
  color: #4d4d4d;
  white-space: pre;
}

.memory-thinking-wave span {
  display: inline-block;
  animation: memoryThinkingWave 1450ms ease-in-out infinite;
  animation-delay: calc(var(--i) * 55ms);
}

.memory-response {
  position: relative;
  display: none;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 12px 16px;
  overflow: hidden;
  color: #4d4d4d;
  font-size: 12px;
  line-height: 15.6px;
  font-weight: 400;
  opacity: 0;
  transform: translateY(4px);
}

.memory-page.has-response .memory-suggestions {
  display: none;
}

.memory-page.has-response .memory-response:not([hidden]) {
  display: block;
  animation: memoryEnter 200ms ease forwards;
}

.memory-page.is-thinking .memory-response::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.055), transparent);
  animation: memoryScan 1150ms linear infinite;
}

.memory-thinking {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #858585;
}

.memory-thinking-dots {
  display: inline-flex;
  gap: 3px;
}

.memory-thinking-dots i {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.28;
  animation: memoryDot 840ms ease-in-out infinite;
}

.memory-thinking-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.memory-thinking-dots i:nth-child(3) {
  animation-delay: 240ms;
}

.memory-portfolio {
  position: fixed;
  left: calc(50% - 75.5px);
  bottom: 80px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 151px;
  height: 40px;
  margin: 0;
  border-radius: 8px;
  background: #121212;
  color: #ffffff;
  font-size: 16px;
  line-height: 20.8px;
  font-weight: 300;
  opacity: 0;
  transform: translateY(6px);
  animation: memoryEnter 220ms ease 350ms forwards;
  transition: background 160ms ease, color 160ms ease;
}

.memory-portfolio:hover,
.memory-portfolio:focus-visible {
  background: #1c1c1c;
  color: #ffffff;
}

.memory-lang {
  position: fixed;
  z-index: 2;
  left: calc(50% - 32px);
  bottom: 32px;
  display: flex;
  justify-content: space-between;
  width: 64px;
  height: 16px;
  color: var(--fg);
  font-size: 16px;
  line-height: 20.8px;
  font-style: italic;
  font-weight: 300;
  opacity: 0;
  transform: translateY(6px);
  animation: memoryEnter 220ms ease 350ms forwards;
}

.memory-page.is-filled .memory-input {
  color: var(--fg);
}

.portfolio-body {
  min-height: 100vh;
  overflow: hidden;
}

.portfolio-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  perspective: 900px;
}

.portfolio-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 68%);
  opacity: 0.45;
  animation: gridDrift 18s linear infinite;
}

.portfolio-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 16%, rgba(255, 255, 255, 0.035) 42%, transparent 66%),
    linear-gradient(248deg, transparent 20%, rgba(255, 255, 255, 0.025) 48%, transparent 72%);
  opacity: 0.65;
  transform: scale(1.08);
  animation: ambientOrbit 28s ease-in-out infinite alternate;
}

.portfolio-ambient {
  z-index: 0;
}

.portfolio-nav {
  position: absolute;
  top: 32px;
  left: 50%;
  z-index: 3;
  display: flex;
  width: 234px;
  height: 18px;
  transform: translateX(-50%);
  gap: 16px;
  color: #333333;
  font-size: 14px;
  line-height: 18.2px;
  font-style: italic;
  font-weight: 300;
  -webkit-user-select: none;
  user-select: none;
}

.portfolio-nav .is-active {
  color: var(--fg);
}

.portfolio-shell {
  position: absolute;
  top: 90px;
  left: 50%;
  z-index: 2;
  width: 614px;
  bottom: 160px;
  transform: translateX(-50%);
}

.portfolio-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 194px);
  grid-auto-rows: 259px;
  gap: 16px;
  width: 614px;
  max-height: calc(100vh - 298px);
  overflow: hidden;
  padding: 0;
  scrollbar-width: none;
  animation: memoryEnter 220ms ease 120ms forwards;
}

.portfolio-grid:focus,
.portfolio-grid:focus-visible {
  outline: none;
}

.portfolio-grid::-webkit-scrollbar {
  display: none;
}

.portfolio-page.is-all .portfolio-grid {
  max-height: calc(100vh - 226px);
  overflow-y: auto;
  padding-bottom: 0;
}

.portfolio-page.portfolio-fade-top .portfolio-grid {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 100%);
}

.portfolio-page.portfolio-fade-bottom .portfolio-grid {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 72px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 72px), transparent 100%);
}

.portfolio-page.portfolio-fade-top.portfolio-fade-bottom .portfolio-grid {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 calc(100% - 72px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 calc(100% - 72px), transparent 100%);
}

.portfolio-card {
  display: block;
  width: 194px;
  height: 259px;
  border-radius: 16px;
  padding: 8px;
  background: #121212;
  color: var(--fg);
  opacity: 0;
  transform: translateY(6px);
  animation: memoryEnter 180ms ease forwards;
  transition: background 160ms ease, transform 160ms ease;
  -webkit-user-select: none;
  user-select: none;
}

.portfolio-card:nth-child(2) { animation-delay: 40ms; }
.portfolio-card:nth-child(3) { animation-delay: 80ms; }
.portfolio-card:nth-child(4) { animation-delay: 120ms; }
.portfolio-card:nth-child(5) { animation-delay: 160ms; }
.portfolio-card:nth-child(6) { animation-delay: 200ms; }

.portfolio-card:hover,
.portfolio-card:focus-visible,
.portfolio-card:active {
  background: #1c1c1c;
  outline: none;
  transform: translateY(0);
}

.portfolio-card:hover .portfolio-card-media,
.portfolio-card:focus-visible .portfolio-card-media,
.portfolio-card:active .portfolio-card-media {
  filter: brightness(1.15);
}

.portfolio-card-media {
  display: block;
  width: 178px;
  height: 128px;
  border-radius: 8px;
  background: #1c1c1c;
  background-size: cover;
  background-position: center;
  transition: filter 160ms ease;
}

.portfolio-card-text {
  width: 162px;
  height: 93.6px;
  max-height: 93.6px;
  margin: 14px 8px 0;
  overflow: clip;
  color: var(--fg);
  font-size: 12px;
  line-height: 15.6px;
  font-style: italic;
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
}

.portfolio-actions {
  position: absolute;
  left: 50%;
  top: calc(100vh - 210px);
  bottom: auto;
  z-index: 3;
  display: flex;
  gap: 8px;
  width: 252px;
  height: 40px;
  transform: translateX(-50%);
  transition: opacity 220ms ease;
}

.portfolio-actions.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.portfolio-action {
  display: grid;
  place-items: center;
  width: 122px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #121212;
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  line-height: 20.8px;
  font-weight: 300;
  cursor: pointer;
  transition: background 160ms ease;
}

.portfolio-action:hover,
.portfolio-action:focus-visible {
  background: #1c1c1c;
  outline: none;
}

.portfolio-actions .portfolio-action:first-child {
  background: #333333;
}

.portfolio-actions .portfolio-action:first-child:hover,
.portfolio-actions .portfolio-action:first-child:focus-visible {
  background: #333333;
}

.portfolio-all-back {
  position: fixed;
  left: calc(50% - 61px);
  bottom: 80px;
  z-index: 3;
  background: #333333;
}

.portfolio-all-back:hover,
.portfolio-all-back:focus-visible {
  background: #333333;
}

.portfolio-all-back[hidden] {
  display: none;
}

.portfolio-case-back {
  position: absolute;
  left: calc(50% - 61px);
  bottom: 80px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 122px;
  height: 40px;
  border-radius: 8px;
  background: #333333;
  color: var(--fg);
  font-size: 16px;
  line-height: 20.8px;
  font-weight: 300;
  opacity: 1;
  transition: opacity 260ms ease, background 160ms ease;
  -webkit-user-select: none;
  user-select: none;
}

.portfolio-case-back:hover,
.portfolio-case-back:focus-visible {
  background: #333333;
  outline: none;
}

.portfolio-page.is-case-scrolling .portfolio-case-back {
  opacity: 0;
  pointer-events: none;
}

.portfolio-lang {
  position: absolute;
  z-index: 2;
  left: calc(50% - 32px);
  bottom: 32px;
  display: flex;
  justify-content: space-between;
  width: 64px;
  height: 16px;
  color: var(--fg);
  font-size: 16px;
  line-height: 20.8px;
  font-style: italic;
  font-weight: 300;
  -webkit-user-select: none;
  user-select: none;
}

.portfolio-lang button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #474747;
  font: inherit;
  cursor: pointer;
}

.portfolio-lang button[aria-pressed="true"] {
  color: var(--fg);
}

.portfolio-case {
  position: absolute;
  top: 82px;
  left: 50%;
  z-index: 2;
  width: 628px;
  max-height: calc(100vh - 164px);
  overflow: hidden;
  overflow-y: auto;
  padding-bottom: 46px;
  color: var(--fg);
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  animation: portfolioCaseEnter 260ms ease 120ms forwards;
  scrollbar-width: none;
}

.portfolio-case::-webkit-scrollbar {
  display: none;
}

.portfolio-page.case-fade-top .portfolio-case {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 100%);
}

.portfolio-page.case-fade-bottom .portfolio-case {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 72px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 72px), transparent 100%);
}

.portfolio-page.case-fade-top.case-fade-bottom .portfolio-case {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 calc(100% - 72px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 48px, #000 calc(100% - 72px), transparent 100%);
}

.portfolio-case-head {
  width: 628px;
  min-height: 56px;
  margin: 0 0 32px;
}

.portfolio-case h1 {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 31.2px;
  font-weight: 600;
}

.portfolio-case-head p {
  margin: 0;
  font-size: 14px;
  line-height: 18.2px;
  font-weight: 300;
}

.portfolio-case-body img {
  display: block;
  width: 628px;
  height: 256px;
  margin: 0 0 23px;
  border-radius: 16px;
  object-fit: cover;
}

.portfolio-case-body p {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 18.2px;
  font-weight: 400;
}

.portfolio-case-meta {
  color: #8b8b8b;
}

.portfolio-case-body ul {
  margin: 0 0 24px;
  padding-left: 18px;
  color: #d6d6d6;
  font-size: 12px;
  line-height: 15.6px;
}

.portfolio-case-body li {
  margin: 0 0 8px;
}

.portfolio-case-chart {
  margin: 0 0 28px;
  padding: 14px;
  border-radius: 16px;
  background: #121212;
}

.portfolio-case-chart div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  color: #777777;
  font-size: 11px;
  line-height: 14px;
}

.portfolio-case-chart strong {
  color: var(--case-accent, #ff8a1c);
  font-weight: 400;
}

.portfolio-case-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.portfolio-proof {
  margin: 0 0 28px;
}

.portfolio-content-section {
  margin: 0 0 40px;
}

.portfolio-section-video {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 24px;
}

.portfolio-section-video-frame {
  width: 100%;
  height: 345px;
  overflow: hidden;
  border-radius: 16px;
  background: #1c1c1c;
}

.portfolio-section-video-frame video,
.portfolio-section-video-frame iframe {
  display: block;
  width: 100%;
  height: 345px;
  border: 0;
  border-radius: 0;
  background: #1c1c1c;
  object-fit: cover;
}

.portfolio-section-source {
  display: block;
  margin: 0;
  color: #ffffff;
  font-size: 12px;
  line-height: 15.6px;
}

.portfolio-section-source a {
  color: #f5f5f5;
}

.portfolio-section-link,
.portfolio-section-embed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 24px;
}

.portfolio-section-link > a {
  display: grid;
  place-items: center;
  width: 100%;
  height: 345px;
  padding: 24px;
  border-radius: 16px;
  background: #1c1c1c;
  color: #ffffff;
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
}

.portfolio-section-embed iframe {
  display: block;
  width: 100%;
  height: 345px;
  border: 0;
  border-radius: 16px;
  background: #1c1c1c;
}

.portfolio-section-gallery-wrap {
  position: relative;
  width: 100%;
  margin: 32px 0 8px;
}

.portfolio-section-gallery {
  display: flex;
  gap: 16px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.portfolio-section-gallery::-webkit-scrollbar {
  display: none;
}

.portfolio-gallery-card {
  flex: 0 0 629px;
  margin: 0;
  padding: 0;
  background: transparent;
  scroll-snap-align: start;
}

.portfolio-gallery-card img {
  display: block;
  width: 100%;
  height: 345px;
  margin: 0;
  border-radius: 16px;
  object-fit: cover;
}

.portfolio-section-gallery-wrap.is-contain .portfolio-gallery-card img {
  background: #050505;
  object-fit: contain;
}

.portfolio-section-chain {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.portfolio-chain-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #1c1c1c;
}

.portfolio-chain-index {
  color: #555;
  font-size: 13px;
  line-height: 20.8px;
}

.portfolio-chain-item h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 16px;
  line-height: 20.8px;
  font-weight: 600;
}

.portfolio-chain-item p {
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 18.2px;
}

.portfolio-line-chart {
  margin: 10px 0 22px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  contain: layout paint;
}

.portfolio-line-chart-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: clamp(160px, 22vw, 210px);
  min-height: 160px;
  overflow: hidden;
}

.portfolio-line-chart canvas {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 210px !important;
}

.portfolio-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 0 0;
  color: #fff;
  font-size: 11px;
  line-height: 14.3px;
}

.portfolio-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.portfolio-chart-legend i {
  width: 18px;
  height: 2px;
  border-radius: 999px;
}

.portfolio-line-chart p {
  margin: 10px 0 0;
  color: #666;
  font-size: 11px;
  line-height: 14.3px;
}

.portfolio-gallery-card figcaption {
  margin: 0;
  padding: 12px 0 0;
  color: #333333;
  font-size: 12px;
  line-height: 15.6px;
}

.portfolio-gallery-nav {
  position: absolute;
  top: 156px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.78);
  color: #ffffff;
  font: 400 30px/1 IBM Plex Mono, monospace;
  cursor: pointer;
}

.portfolio-gallery-nav.is-prev {
  left: 12px;
}

.portfolio-gallery-nav.is-next {
  right: 12px;
}

.portfolio-proof-images {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.portfolio-proof-images figure {
  margin: 0;
}

.portfolio-proof-images figcaption {
  margin: -12px 0 18px;
  color: #8b8b8b;
  font-size: 11px;
  line-height: 14px;
}

.portfolio-proof a {
  color: #58a6ff;
}

.portfolio-proof-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portfolio-proof-links a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: #121212;
  color: var(--fg);
  font-size: 11px;
  line-height: 14px;
}

.memory-source-page {
  min-height: 100vh;
  padding: 96px 24px 64px;
  color: var(--fg);
}

.memory-source-article {
  width: min(760px, 100%);
  margin: 0 auto;
}

.memory-source-kicker,
.memory-source-content,
.memory-source-content p,
.memory-source-content li {
  font-size: 12px;
  line-height: 15.6px;
  letter-spacing: 0;
}

.memory-source-kicker {
  margin: 0 0 8px;
  color: #4d4d4d;
}

.memory-source-article h1 {
  margin: 0 0 32px;
  font-size: 24px;
  line-height: 28px;
  font-weight: 400;
  letter-spacing: 0;
}

.memory-source-content h2 {
  margin: 32px 0 12px;
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: 0;
}

.memory-source-content h3 {
  margin: 24px 0 8px;
  font-size: 12px;
  line-height: 15.6px;
  font-weight: 400;
  letter-spacing: 0;
}

.memory-source-content p {
  margin: 0 0 12px;
  color: #d6d6d6;
}

.memory-source-content ul {
  margin: 0 0 16px;
  padding-left: 18px;
  color: #d6d6d6;
}

.portfolio-case-body h2 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
}

@keyframes gridDrift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 56px 56px;
  }
}

@keyframes portfolioCaseEnter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes ambientOrbit {
  from {
    transform: translate(calc(var(--ambient-x) * -0.55), calc(var(--ambient-y) * -0.55)) rotate(-1deg) scale(1.08);
  }

  to {
    transform: translate(calc(var(--ambient-x) * -0.55), calc(var(--ambient-y) * -0.55)) rotate(1deg) scale(1.1);
  }
}

@keyframes lineSweepA {
  0%, 100% {
    transform: translate(-58%, -190px) rotate(-18deg);
  }

  50% {
    transform: translate(-42%, -80px) rotate(-12deg);
  }
}

@keyframes lineSweepB {
  0%, 100% {
    transform: translate(-44%, 120px) rotate(14deg);
  }

  50% {
    transform: translate(-60%, 42px) rotate(8deg);
  }
}

@keyframes lineSweepC {
  0%, 100% {
    transform: translate(-50%, 260px) rotate(-4deg);
  }

  50% {
    transform: translate(-48%, 180px) rotate(5deg);
  }
}

@keyframes loaderFloor {
  from {
    opacity: 0;
    background-position: 0 0;
    transform: translate(-50%, -50%) rotateX(72deg) translateY(320px) translateZ(430px) scale(3.5);
  }

  20% {
    opacity: 0.24;
  }

  68% {
    opacity: 0.2;
  }

  to {
    opacity: 0;
    background-position: 0 180px;
    transform: translate(-50%, -50%) rotateX(72deg) translateY(22px) translateZ(-220px) scale(0.92);
  }
}

@keyframes loaderPulse {
  0%, 100% {
    opacity: 0;
  }

  35% {
    opacity: 1;
  }
}

@keyframes loaderText {
  from {
    width: 0;
    opacity: 0;
  }

  30% {
    opacity: 1;
  }

  to {
    width: 88px;
    opacity: 0;
  }
}

@keyframes startGatePulse {
  0%,
  100% {
    opacity: 0.16;
    transform: translate(-50%, -50%) scale(0.72);
  }

  50% {
    opacity: 0.44;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes loaderExit {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reloadHeroEnter {
  to {
    opacity: 1;
    transform: translateX(34px) translateZ(0) scale(1);
  }
}

@keyframes philosophyReveal {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes philosophySwap {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes philosophyTextReveal {
  from {
    opacity: 0;
    transform: none;
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pageActivePulse {
  50% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

@keyframes memoryEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes memoryScan {
  to {
    transform: translateX(100%);
  }
}

@keyframes memoryDot {
  50% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

@keyframes memoryThinkingWave {
  0%,
  100% {
    color: #4d4d4d;
    transform: translateY(0);
  }

  50% {
    color: #ffffff;
    transform: translateY(-2px);
  }
}

@keyframes pageTransitionReveal {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes heroArrive {
  55% {
    opacity: 0.82;
  }

  to {
    opacity: 1;
    transform: translateX(34px) translateZ(0) scale(1);
  }
}

@keyframes signatureReveal {
  to {
    opacity: 0.62;
  }
}

@keyframes memorySignatureReveal {
  to {
    opacity: 1;
  }
}

@keyframes writeSignature {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --mobile-lang-bottom: 104px;
    --mobile-action-bottom: 152px;
    --mobile-action-top: calc(100svh - var(--mobile-action-bottom) - 40px);
  }

  html,
  body {
    overflow-x: hidden;
  }

  .memory-body {
    overflow: hidden;
  }

  .memory-page {
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
    overflow: hidden;
  }

  .memory-nav {
    top: 32px;
    width: 234px;
    max-width: calc(100vw - 48px);
    font-size: 14px;
  }

  .memory-shell {
    position: fixed;
    top: clamp(156px, 22svh, 192px);
    right: 16px;
    bottom: 152px;
    left: 16px;
    width: auto;
    max-width: 370px;
    margin: 0 auto;
    transform: none;
    --memory-signature-width: 100%;
    --memory-signature-height: 138px;
    --memory-signature-offset: 0;
  }

  .memory-page.is-chatting .memory-shell {
    position: fixed;
    inset: 72px 16px 0;
    width: auto;
    max-width: none;
    margin: 0;
    transform: none;
  }

  .memory-chat {
    width: 100%;
    height: min(52vh, 558px);
  }

  .memory-page.is-chatting .memory-chat {
    top: 0;
    bottom: 184px;
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
  }

  .memory-signature {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: 138px;
    margin: 0 auto 24px;
    transform: none;
  }

  .memory-card {
    width: 100%;
    height: 112px;
  }

  .memory-page.is-chatting .memory-card {
    bottom: var(--mobile-action-bottom);
  }

  .memory-input {
    height: 62px;
  }

  .memory-actions {
    right: 8px;
  }

  .memory-filter-button {
    width: min(188px, calc(100vw - 136px));
  }

  .memory-filter-menu {
    width: min(225px, calc(100vw - 64px));
  }

  .memory-filter-menu button {
    width: calc(100%);
  }

  .memory-suggestions-wrap {
    width: 100%;
    height: min(240px, calc(100svh - 634px));
    min-height: 168px;
    margin-top: 16px;
  }

  .memory-portfolio {
    position: fixed;
    left: calc(50% - 75.5px);
    top: auto;
    bottom: var(--mobile-action-bottom);
    margin: 0;
  }

  .memory-lang {
    position: fixed;
    bottom: var(--mobile-lang-bottom);
  }

  .portfolio-body {
    overflow: hidden;
  }

  .portfolio-page {
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
    overflow: hidden;
  }

  .portfolio-nav {
    position: fixed;
    top: 32px;
    width: 234px;
    max-width: calc(100vw - 48px);
    font-size: 14px;
  }

  .portfolio-shell {
    position: fixed;
    top: 90px;
    right: 0;
    bottom: calc(var(--mobile-action-bottom) + 56px);
    left: 0;
    display: block;
    width: 100vw;
    height: auto;
    margin: 0;
    transform: none;
  }

  .portfolio-grid,
  .portfolio-page.is-all .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 259px;
    gap: 8px;
    width: min(370px, calc(100vw - 32px));
    max-height: 100%;
    margin: 0 auto;
    overflow-y: auto;
  }

  .portfolio-card {
    width: 100%;
  }

  .portfolio-card-media {
    width: 100%;
    height: 128px;
  }

  .portfolio-card-text {
    width: auto;
    margin: 14px 8px 0;
  }

  .portfolio-actions {
    position: fixed;
    left: 50%;
    top: auto;
    bottom: var(--mobile-action-bottom);
    margin: 0;
    transform: translateX(-50%);
  }

  .portfolio-all-back {
    left: calc(50% - 61px);
    bottom: var(--mobile-action-bottom);
  }

  .portfolio-case-back {
    position: fixed;
    left: calc(50% - 61px);
    bottom: var(--mobile-action-bottom);
  }

  .portfolio-lang {
    position: fixed;
    left: calc(50% - 32px);
    bottom: var(--mobile-lang-bottom);
  }

  .portfolio-case {
    position: fixed;
    top: 90px;
    right: 16px;
    bottom: calc(var(--mobile-action-bottom) + 56px);
    left: 16px;
    width: auto;
    max-height: none;
    margin: 0 auto;
    transform: none;
    animation-name: memoryEnter;
  }

  .portfolio-case-head,
  .portfolio-case-body img {
    width: 100%;
  }

  .hero {
    place-items: center;
    padding: 0 32px;
  }

  .hero-inner {
    width: min(100%, 338px);
    margin-top: 0;
    margin-left: 0;
    transform: translateZ(-260px) scale(0.96);
    animation-name: heroArriveMobile;
  }

  .intro-skip .hero-inner,
  .intro-complete .hero-inner {
    transform: translateZ(0) scale(1);
  }

  .intro-skip .hero-inner {
    animation-name: heroArriveMobile;
  }

  .signature {
    width: 100%;
    height: 132px;
    margin-bottom: 12px;
  }

  .hero h1 {
    font-size: clamp(20px, 6vw, 24px);
    line-height: 1.25;
    overflow-wrap: normal;
  }

  .hero p {
    max-width: 100%;
    font-size: clamp(12px, 3.4vw, 14px);
  }

  .contact-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 44px;
    width: 100%;
  }

  .github-link {
    margin-left: auto;
  }

  .philosophy-view {
    padding: 0 32px;
  }

  .philosophy-nav {
    top: 32px;
    gap: 16px;
    width: 261px;
    font-size: 16px;
  }

  .philosophy-copy {
    top: 50%;
    left: 50%;
    width: min(100%, 338px);
    margin-top: 0;
    font-size: 16px;
    line-height: 20.8px;
  }

  .philosophy-pages {
    top: auto;
    bottom: var(--mobile-action-bottom);
  }

  .philosophy-memory {
    top: auto;
    bottom: var(--mobile-action-bottom);
  }

  .sound-toggle {
    position: fixed;
    left: calc(50% - 80px);
    bottom: var(--mobile-action-bottom);
  }

  .is-philosophy .lang {
    bottom: var(--mobile-lang-bottom);
    font-size: 16px;
  }
}

@keyframes heroArriveMobile {
  55% {
    opacity: 0.82;
  }

  to {
    opacity: 1;
    transform: translateZ(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after,
  .ambient-line,
  .loader,
  .loader::before,
  .loader-floor,
  .loader-scan,
  .hero-inner,
  .hero,
  .sound-toggle,
  .memory-page,
  .hero-inner > h1,
  .hero-inner > p,
  .hero-links,
  .contact-row,
  .lang,
  .philosophy-nav,
  .philosophy-pages,
  .philosophy-pages button.is-active,
  .philosophy-copy,
  .memory-signature,
  .memory-card,
  .memory-suggestions-wrap,
  .memory-suggestions button,
  .memory-response,
  .memory-thinking-dots i,
  .memory-chat-row,
  .memory-thinking-wave span,
  .memory-portfolio,
  .memory-lang,
  .portfolio-page,
  .portfolio-page::before,
  .portfolio-page::after,
  .portfolio-grid,
  .portfolio-card,
  .portfolio-actions,
  .portfolio-action,
  .portfolio-case,
  .portfolio-lang,
  .start-gate {
    animation: none;
    transition: none;
  }

  .memory-page.is-thinking .memory-response::before {
    display: none;
    animation: none;
  }

  .memory-thinking-wave span {
    animation: none;
  }

  .loader,
  .start-gate {
    display: none;
  }

  .hero-inner > h1,
  .hero-inner > p,
  .hero-links,
  .contact-row,
  .lang,
  .sound-toggle {
    opacity: 1;
    transform: none;
  }

  .is-philosophy .philosophy-nav,
  .is-philosophy .philosophy-pages {
    opacity: 1;
    transform: translateX(-50%);
  }

  .is-philosophy .philosophy-copy {
    opacity: 1;
    transform: none;
  }

  .memory-signature,
  .memory-card,
  .memory-suggestions-wrap,
  .memory-suggestions button,
  .memory-chat-row,
  .memory-page.has-response .memory-response:not([hidden]),
  .memory-portfolio,
  .memory-lang {
    opacity: 1;
    transform: none;
  }

  .hero-inner {
    opacity: 1;
    transform: translateX(34px);
  }
}
