/* Identity and timeline use the portfolio's shared type, palette, and gutters.
   The journey alone reveals this layer after the particle entrance. */
.identity-scene {
  opacity: 0; visibility: hidden; overflow: clip; isolation: isolate; container-type: size;
  color: var(--vi-site-background); background: var(--vi-surface); color-scheme: light;
  font-family: var(--vi-font-ui); font-weight: 400; letter-spacing: normal;
}
.identity-scene .identity-layout {
  display: grid; grid-template-columns: minmax(180px,260px) minmax(0,1fr);
  align-content: center; align-items: center; gap: clamp(36px,5cqw,72px);
  width: min(1120px,87.5%); height: 100%; margin: 0 auto; padding: 48px 0;
}
.identity-scene .identity-portrait { width: 100%; margin: 0; }
.identity-scene .identity-portrait img { display: block; width: 100%; height: auto; }
.identity-scene .identity-content { display: grid; gap: 24px; min-width: 0; }
.identity-scene .identity-greeting { margin: 0 0 12px; color: var(--vi-text-secondary); font-size: 18px; line-height: 1.5; }
.identity-scene .identity-name {
  margin: 0 0 18px; font-size: calc(clamp(44px,5.2cqw,76px) * var(--identity-name-fit,1));
  font-weight: 400; line-height: 1.1; letter-spacing: -.04em; white-space: nowrap;
}
.identity-scene .identity-name-mask { display: block; }
.identity-scene .identity-name-text { display: inline-block; width: max-content; }
.identity-scene .identity-roles { margin: 0; color: var(--vi-text-secondary); font-size: 17px; line-height: 1.55; }
.identity-scene .identity-introduction { max-width: 510px; padding-top: 3px; }
.identity-scene .identity-school-logo { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 18px; }
.identity-scene .identity-school-logo img { display: block; width: 144px; height: auto; }
.identity-scene .identity-bio { margin: 0; font-size: clamp(17px,1.45cqw,21px); line-height: 1.6; letter-spacing: -.012em; text-wrap: pretty; }

/* Dates are the index; the entire row opens its own story. */
.identity-scene .identity-timeline {
  --timeline-date-width: 90px; --timeline-gap: 20px; --timeline-node-y: 26px;
  margin: 24px 0 0; padding: 0; list-style: none;
}
.identity-scene .identity-timeline li { position: relative; }
.identity-scene .identity-timeline li + li { margin-top: 6px; }
.identity-scene .identity-timeline li:not(:last-child)::before {
  content: ''; position: absolute; left: calc(var(--timeline-date-width) + var(--timeline-gap) / 2);
  top: var(--timeline-node-y); bottom: calc(-1 * var(--timeline-node-y) - 6px);
  width: 1px; background: var(--vi-line);
}
.identity-scene .identity-timeline-link {
  display: grid; grid-template-columns: var(--timeline-date-width) minmax(0,1fr) 20px;
  align-items: center; column-gap: var(--timeline-gap); position: relative;
  width: 100%; min-height: 52px; padding: 6px 0; border: 0; background: none;
  color: inherit; font: inherit; font-size: 18px; line-height: 1.4; letter-spacing: -.015em;
  text-align: left; cursor: pointer; touch-action: manipulation; transition: color .18s ease;
}
.identity-scene .identity-timeline-link::before {
  content: ''; position: absolute;
  left: calc(var(--timeline-date-width) + var(--timeline-gap) / 2 - 3px);
  top: calc(var(--timeline-node-y) - 3px); width: 7px; height: 7px;
  border-radius: 50%; background: var(--vi-text-secondary);
  box-shadow: 0 0 0 3px var(--vi-surface); transition: background-color .18s ease;
}
.identity-scene .identity-timeline-date { color: var(--vi-text-secondary); font-size: 13px; line-height: 1.5; letter-spacing: 0; }
.identity-scene .identity-timeline-arrow { width: 20px; height: 20px; }
.identity-scene .identity-timeline-link:is(:hover,:focus-visible) { color: var(--vi-focus); }
.identity-scene .identity-timeline-link:is(:hover,:focus-visible)::before { background: var(--vi-focus); }
.identity-scene .identity-actions { margin-top: 20px; }
.identity-scene .identity-work-link {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  font-size: 16px; line-height: 1.4; text-decoration: underline; text-underline-offset: 5px;
}
.identity-scene .identity-link-mark { width: 20px; height: 20px; }
.identity-scene .identity-work-link:hover { color: var(--vi-focus); }
.identity-scene :is(a,button):focus-visible { outline: 1px solid var(--vi-focus); outline-offset: 5px; }

/* A story reads as a portfolio page, with one return to its timeline. */
html.has-background-dialog { overflow: hidden; }
.background-dialog {
  position: fixed; inset: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none; padding: 0; border: 0; border-radius: 0;
  overflow: hidden; color: var(--vi-site-background); background: var(--vi-surface);
  color-scheme: light; font-family: var(--vi-font-ui); font-weight: 400;
}
.background-dialog[open] { display: grid; grid-template-rows: 76px minmax(0,1fr); }
.background-dialog::backdrop { background: var(--vi-surface); }
.background-dialog-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 16px 6.25%; background: var(--vi-surface);
}
.background-dialog-back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 0; border: 0; background: none; color: inherit;
  font: inherit; font-size: 16px; line-height: 24px; cursor: pointer;
}
.background-dialog-back .vi-icon { width: 20px; height: 20px; }
.background-dialog-back:hover { color: var(--vi-focus); }
.background-story-owner { margin: 0; color: var(--vi-text-secondary); font-size: 14px; line-height: 20px; }
.background-dialog :is(a,button):focus-visible { outline: 1px solid var(--vi-focus); outline-offset: 5px; }
.background-dialog-panels { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: clamp(36px,5vw,80px) 6.25% 72px; scrollbar-width: thin; }
.background-story-heading, .background-panel { width: min(100%,1120px); margin-inline: auto; }
.background-story-heading h2 {
  max-width: 20ch; margin: 0 0 56px;
  font-size: clamp(38px,4.8vw,72px); font-weight: 400; line-height: 1.08; letter-spacing: -.04em;
  text-wrap: pretty;
}
.background-panel { display: grid; grid-template-columns: minmax(140px,.55fr) minmax(0,1.45fr); gap: clamp(32px,5vw,80px); align-items: start; }
.background-panel[hidden] { display: none; }
.background-panel-meta { margin: 0; color: var(--vi-text-secondary); font-size: 14px; line-height: 1.6; }
.background-story-copy { min-width: 0; max-width: 64ch; }
/* Timeline stories place their introductions above the same full-width layout. */
.background-panel-timeline:not([hidden]) { display: block; }
.background-panel-timeline .background-panel-meta { margin-bottom: 28px; }
.background-panel-timeline .background-story-copy { max-width: none; }
.background-story-copy > p { margin: 0; font-size: 18px; line-height: 1.65; letter-spacing: -.01em; }
.background-story-copy > p + p { margin-top: 20px; }
.background-story-copy a { text-decoration: underline; text-underline-offset: 4px; }
.background-story-copy a:hover { color: var(--vi-focus); }
.background-story-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 24px; font-size: 16px; line-height: 1.5; }

/* Dated milestones share one timeline layout inside their individual stories. */
.background-panel .story-timeline { --creator-date-width: 100px; --creator-column-gap: 24px; margin: 0; padding: 0; list-style: none; }
.story-timeline-item { display: grid; grid-template-columns: var(--creator-date-width) minmax(0,1fr); gap: var(--creator-column-gap); position: relative; padding-bottom: 32px; }
.story-timeline-item::before { content: ''; position: absolute; left: calc(var(--creator-date-width) + var(--creator-column-gap)); top: 10px; bottom: -10px; width: 1px; background: var(--vi-line); }
.story-timeline-item:last-child { padding-bottom: 0; }
.story-timeline-item:last-child::before { display: none; }
.story-timeline-date { padding-top: 1px; color: var(--vi-text-secondary); font-size: 14px; line-height: 1.6; }
.story-timeline-date > span { display: block; }
.story-timeline-content { position: relative; min-width: 0; padding-left: 22px; }
.story-timeline-content::before { content: ''; position: absolute; left: -3px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--vi-site-background); box-shadow: 0 0 0 3px var(--vi-surface); }
.story-timeline-content h4, .story-note h4 { margin: 0 0 8px; font-size: 20px; line-height: 1.4; font-weight: 400; letter-spacing: -.02em; }
.story-timeline-content p, .story-note p { margin: 0; font-size: 16px; line-height: 1.65; }
.story-timeline-content strong { font-weight: 500; }
.story-timeline-content h4 { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.story-platform-logo { display: block; flex: 0 0 28px; width: 28px; height: 28px; object-fit: contain; }
.story-network-list { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 18px 0 0; padding: 0; list-style: none; }
.story-network-list li { display: flex; align-items: center; gap: 8px; color: var(--vi-text-secondary); font-size: 13px; line-height: 1.5; }
.story-network-list img { display: block; flex: 0 0 28px; width: 28px; height: 28px; object-fit: contain; }
.story-network-list .story-network-logo-hyperliquid { padding: 4px; border-radius: 50%; background: #0f3933; }
.story-project-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 20px; margin: 14px 0 0; padding: 0; list-style: none; }
.story-project-list li { min-width: 0; }
.background-story-copy .story-project-list a { display: flex; align-items: center; gap: 10px; min-height: 40px; width: fit-content; max-width: 100%; font-size: 14px; line-height: 1.4; }
.story-project-list img { display: block; flex: 0 0 28px; width: 28px; height: 28px; object-fit: contain; }
.story-project-list .story-project-wordmark { flex-basis: 102px; width: 102px; height: 32px; }
.background-story-copy .story-platform-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: inherit; text-decoration: none; }
.story-platform-name { text-decoration: underline; text-underline-offset: 4px; }
.story-platform-note { display: inline-block; color: var(--vi-text-secondary); font-size: 14px; letter-spacing: 0; }
.background-story-copy .story-platform-link:hover .story-platform-name { color: var(--vi-focus); }
.story-timeline-content-with-account { container: account-story / inline-size; }
.story-account-layout { display: grid; gap: 20px; align-items: start; }
.story-account-picture { width: min(100%,300px); margin: 0; }
/* An English summary pairs the genuine avatar with the confirmed account figures. */
.background-story-copy .story-account-card { display: block; padding: 14px; color: #fff; background: #181818; text-decoration: none; }
.story-account-card-header { display: flex; align-items: center; gap: 10px; }
.story-account-card .story-account-avatar { display: block; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.story-account-card-title { display: grid; gap: 3px; min-width: 0; font-size: 17px; line-height: 1.25; }
.story-account-card-owner { color: #bdbdbd; font-size: 12px; }
.story-account-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(76px,1fr)); gap: 12px; margin: 16px 0; }
.story-account-metric { display: grid; gap: 3px; font-size: 12px; line-height: 1.4; color: #bdbdbd; }
.story-account-metric strong { color: #fff; font-size: 20px; font-weight: 600; line-height: 1.15; letter-spacing: -.03em; }
.story-account-card-link { font-size: 12px; line-height: 1.5; text-decoration: underline; text-underline-offset: 3px; }
.background-story-copy .story-account-card:hover { color: #fff; }
.story-account-card:hover .story-account-card-link { color: #d2d8ff; }
.story-account-picture figcaption { margin-top: 8px; color: var(--vi-text-secondary); font-size: 12px; line-height: 1.5; }
.story-organization-picture { max-width: 112px; }
.story-organization-logo, .story-organization-logo img { display: block; width: 100%; height: auto; }
@container account-story (min-width: 430px) {
  .story-account-layout { grid-template-columns: minmax(0,1fr) minmax(164px,34%); gap: 24px; }
  .story-account-picture { width: 100%; }
}
.story-note { margin-top: 36px; }

@media (max-width: 760px) {
  .identity-scene .identity-layout { grid-template-columns: clamp(88px,22cqw,120px) minmax(0,1fr); gap: 28px 20px; width: min(560px,87.5%); padding: 32px 0; }
  .identity-scene .identity-content { display: contents; }
  .identity-scene .identity-portrait { grid-column: 1; grid-row: 1; }
  .identity-scene .identity-heading { grid-column: 2; grid-row: 1; min-width: 0; }
  .identity-scene .identity-introduction { grid-column: 1 / -1; grid-row: 2; max-width: none; padding-top: 0; }
  .identity-scene .identity-greeting { font-size: 16px; margin-bottom: 8px; }
  .identity-scene .identity-name { font-size: calc(clamp(42px,8.8cqw,60px) * var(--identity-name-fit,1)); margin-bottom: 12px; }
  .identity-scene .identity-roles { font-size: 16px; }
  .identity-scene .identity-school-logo { margin-bottom: 14px; }
  .identity-scene .identity-school-logo img { width: 132px; }
  .identity-scene .identity-bio { font-size: 17px; line-height: 1.55; }
  .identity-scene .identity-work-link { font-size: 15px; }
  .background-dialog[open] { grid-template-rows: 72px minmax(0,1fr); }
  .background-dialog-header { padding-block: 14px; }
  .background-dialog-panels { padding-top: 28px; padding-bottom: 48px; }
  .background-story-heading h2 { font-size: clamp(36px,7vw,48px); margin-bottom: 28px; }
  .background-panel { display: block; }
  .background-panel-meta { margin-bottom: 28px; font-size: 13px; }
  .background-story-copy > p { font-size: 17px; line-height: 1.65; }
}
@media (max-height: 620px) {
  .identity-scene .identity-layout { padding-top: 16px; padding-bottom: 16px; row-gap: 16px; }
  .identity-scene .identity-content { gap: 18px; }
  .identity-scene .identity-greeting { font-size: 15px; margin-bottom: 6px; }
  .identity-scene .identity-name { margin-bottom: 10px; }
  .identity-scene .identity-roles { font-size: 15px; }
  .identity-scene .identity-bio { font-size: 16px; line-height: 1.5; }
  .identity-scene .identity-school-logo { margin-bottom: 10px; }
  .identity-scene .identity-timeline { margin-top: 12px; --timeline-node-y: 22px; }
  .identity-scene .identity-timeline-link { min-height: 44px; padding-block: 4px; font-size: 15.5px; }
  .identity-scene .identity-actions { margin-top: 16px; }
}
@media (min-width: 761px) and (max-height: 620px) {
  .identity-scene .identity-layout { grid-template-columns: minmax(140px,190px) minmax(0,1fr); column-gap: 36px; }
  .identity-scene .identity-content { gap: 12px; }
  .identity-scene .identity-name { font-size: calc(clamp(34px,4cqw,42px) * var(--identity-name-fit,1)); margin-bottom: 8px; }
  .identity-scene .identity-greeting { margin-bottom: 4px; }
  .identity-scene .identity-roles { font-size: 14px; line-height: 1.4; }
  .identity-scene .identity-school-logo { margin-bottom: 8px; }
  .identity-scene .identity-actions { margin-top: 12px; }
}
@media (max-width: 760px) and (max-height: 620px) {
  .identity-scene .identity-layout { grid-template-columns: clamp(80px,18cqw,100px) minmax(0,1fr); column-gap: 16px; }
}
@media (max-width: 540px) {
  .identity-scene .identity-timeline { --timeline-date-width: 76px; --timeline-gap: 16px; }
  .identity-scene .identity-timeline-date { font-size: 12px; }
  .identity-scene .identity-timeline-date > span { display: block; }
  .background-story-copy > p { font-size: 16px; }
  .background-panel .story-timeline { --creator-date-width: 0px; --creator-column-gap: 0px; }
  .story-timeline-item { display: block; padding-left: 22px; }
  .story-timeline-item::before { left: 0; }
  .story-timeline-date { display: block; margin-bottom: 8px; padding: 0; font-size: 13px; }
  .story-timeline-date > span { display: inline; }
  .story-timeline-date > span + span::before { content: ' '; }
  .story-timeline-content { padding-left: 0; }
  .story-timeline-content::before { left: -25px; top: -24px; }
  .story-timeline-content h4, .story-note h4 { font-size: 19px; }
  .story-timeline-content p, .story-note p { font-size: 16px; }
  .story-project-list { grid-template-columns: minmax(0,1fr); gap: 4px; }
}
@media (max-width: 360px) {
  .identity-scene .identity-layout { grid-template-columns: 72px minmax(0,1fr); column-gap: 14px; row-gap: 12px; padding-block: 12px; }
  .identity-scene .identity-greeting { margin-bottom: 4px; font-size: 14px; }
  .identity-scene .identity-name { margin-bottom: 8px; }
  .identity-scene .identity-roles { font-size: 14px; line-height: 1.4; }
  .identity-scene .identity-school-logo { margin-bottom: 10px; }
  .identity-scene .identity-bio { font-size: 15px; line-height: 1.45; }
  .identity-scene .identity-timeline { margin-top: 12px; --timeline-date-width: 68px; --timeline-gap: 14px; }
  .identity-scene .identity-timeline-link { font-size: 15px; }
  .identity-scene .identity-actions { margin-top: 16px; }
}
@media (min-width: 761px) and (max-height: 500px) { .identity-scene .identity-bio { display: none; } }
@media (prefers-reduced-motion: reduce) { .identity-scene .identity-timeline-link, .identity-scene .identity-timeline-link::before { transition: none; } }

.story-timeline-content p + p { margin-top: 14px; }

/* Emphasize the capital-growth result within the crypto story. */
#background-panel-crypto strong { font-weight: 600; }
