:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: rgba(8, 15, 34, 0.72);
  --panel-strong: rgba(12, 23, 54, 0.92);
  --ink: #f6f8ff;
  --muted: #aeb9d6;
  --faint: #6f7ca5;
  --line: rgba(148, 163, 255, 0.22);
  --eth-blue: #627eea;
  --cyan: #8fffeb;
  --cyan-2: #31d7ff;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
  --max: 1480px;
  --header-h: 72px;
  --page-h: calc(100svh - var(--header-h));
  --page-x: max(28px, calc((100vw - var(--max)) / 2));
  --page-y: 0px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  width: 100%;
}

body {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 16%, rgba(98, 126, 234, 0.2), transparent 34rem),
    radial-gradient(circle at 82% 72%, rgba(143, 255, 235, 0.12), transparent 30rem),
    linear-gradient(180deg, var(--bg), #02030a 72%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.65;
}

body.is-loading {
  overflow: hidden;
}

body.is-loading .site-header,
body.is-loading .cosmic-shell,
body.is-loading .site-footer {
  opacity: 0;
  visibility: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

#starfield,
.cosmic-vignette,
.eth-ghost,
.eth-line-logo {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#starfield {
  z-index: 0;
  background: transparent;
}

.cosmic-vignette {
  z-index: 1;
  background:
    linear-gradient(rgba(143, 255, 235, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 255, 235, 0.024) 1px, transparent 1px),
    radial-gradient(circle at center, transparent 36%, rgba(0, 0, 0, 0.76));
  background-size: 58px 58px, 58px 58px, auto;
}

.eth-ghost {
  z-index: 1;
  display: grid;
  place-items: center;
  opacity: 0.12;
  filter: blur(0.3px) drop-shadow(0 0 42px rgba(143, 255, 235, 0.2));
  transition: opacity 1200ms ease, transform 1200ms ease;
}

body.is-loading .eth-ghost {
  opacity: 0;
  transform: scale(0.92);
}

body.is-loading .eth-line-logo {
  opacity: 0;
}

.eth-ghost svg {
  width: min(56vw, 680px);
  min-width: 320px;
  fill: rgba(143, 255, 235, 0.045);
  stroke: rgba(143, 255, 235, 0.38);
  stroke-width: 0.8;
  transform: rotate(8deg);
}

.eth-line-logo {
  z-index: 1;
  display: grid;
  place-items: center;
  opacity: 0.1;
  transform: translateX(16vw) rotate(-9deg);
  transition: opacity 1200ms ease, transform 1200ms ease;
}

.eth-line-logo svg {
  width: min(42vw, 560px);
  min-width: 280px;
  fill: none;
  stroke: rgba(143, 255, 235, 0.56);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.05;
  filter: drop-shadow(0 0 28px rgba(98, 126, 234, 0.28));
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 90;
  border: 1px solid var(--cyan);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--cyan);
  padding: 10px 14px;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 16px;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(98, 126, 234, 0.18), transparent 34rem);
  transition: opacity 800ms ease, visibility 800ms ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-stage {
  position: relative;
  width: min(92vw, 620px);
  min-height: min(92vw, 620px);
  display: grid;
  place-items: center;
  text-align: center;
}

.loader-stage::before,
.loader-stage::after {
  content: "";
  position: absolute;
  inset: 70px;
  border: 1px solid rgba(143, 255, 235, 0.28);
  transform: rotate(45deg);
  animation: loaderOrbit 4.6s linear infinite;
}

.loader-stage::after {
  inset: 132px;
  border-color: rgba(98, 126, 234, 0.36);
  animation-direction: reverse;
  animation-duration: 6.2s;
}

.loader-eth-ghost {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  opacity: 0.28;
  filter:
    blur(0.2px)
    drop-shadow(0 0 28px rgba(143, 255, 235, 0.42))
    drop-shadow(0 0 64px rgba(98, 126, 234, 0.3));
  animation: loaderGhostPulse 3.8s ease-in-out infinite;
}

.loader-eth-ghost svg {
  width: clamp(138px, 24vw, 238px);
  height: auto;
  fill: rgba(143, 255, 235, 0.035);
  stroke: rgba(143, 255, 235, 0.42);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1;
  transform: rotate(0deg);
}

.eth-loader {
  position: relative;
  z-index: 1;
  width: clamp(108px, 18vw, 154px);
  height: clamp(176px, 29vw, 252px);
  filter:
    drop-shadow(0 0 18px rgba(143, 255, 235, 0.42))
    drop-shadow(0 0 46px rgba(98, 126, 234, 0.38));
  transition: transform 900ms ease, opacity 760ms ease, filter 900ms ease;
}

.eth-glyph {
  width: 100%;
  height: 100%;
  transform-origin: center;
  transition: opacity 220ms ease, transform 420ms ease;
}

.eth-face {
  fill: url(#ethSolidLeft);
  stroke: rgba(255, 255, 255, 0.26);
  stroke-width: 0.7;
  stroke-linejoin: round;
  animation: ethPulse 1.7s ease-in-out infinite alternate;
}

.eth-top-right,
.eth-mid-right,
.eth-bottom-right {
  fill: url(#ethSolidRight);
}

.eth-mid-left,
.eth-bottom-left {
  filter: brightness(0.86);
}

.eth-mid-right,
.eth-bottom-right {
  filter: brightness(0.72);
}

.eth-particles {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.eth-particles span {
  position: absolute;
  left: var(--sx, 50%);
  top: var(--sy, 50%);
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: var(--particle-color, rgba(143, 255, 235, 0.98));
  box-shadow:
    0 0 12px rgba(143, 255, 235, 0.84),
    0 0 28px rgba(98, 126, 234, 0.48);
  opacity: 0;
  transform: translate(-50%, -50%);
}

.loader.disperse .eth-glyph {
  opacity: 0;
  transform: scale(0.96);
}

.loader.disperse .eth-particles span {
  animation: particleDrift 1.75s cubic-bezier(0.18, 0.72, 0.18, 1) forwards;
}

.site-header,
.cosmic-shell,
.site-footer {
  position: relative;
  z-index: 2;
  transition: opacity 700ms ease;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(148, 163, 255, 0.12);
  background: rgba(3, 7, 18, 0.58);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(var(--max), calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}

.brand,
.nav-links,
.hero-actions,
.contact-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(143, 255, 235, 0.5);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(98, 126, 234, 0.5), rgba(3, 7, 18, 0.8));
  color: var(--cyan);
  box-shadow: 0 0 28px rgba(98, 126, 234, 0.25);
}

.nav-links {
  justify-content: center;
  gap: 8px;
}

.nav-links a,
.language-toggle,
.button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 850;
}

.nav-links a {
  white-space: nowrap;
  flex: 0 0 auto;
  padding: 8px 12px;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a.is-active {
  border-color: rgba(143, 255, 235, 0.35);
  color: var(--cyan);
}

.language-toggle {
  width: 56px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.language-toggle:hover {
  border-color: rgba(143, 255, 235, 0.4);
  color: var(--cyan);
}

.cosmic-shell {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  z-index: 2;
  width: 100vw;
  height: var(--page-h);
  overflow: hidden;
  overflow: clip;
  margin: 0;
}

.page-track {
  width: 100%;
  height: auto;
  transform: translateY(var(--page-y));
  transition: transform 820ms cubic-bezier(0.2, 0.82, 0.18, 1);
  will-change: transform;
}

body.is-instant-page .page-track {
  transition-duration: 0ms;
}

.story-section {
  position: relative;
  height: var(--page-h);
  min-height: 0;
  display: grid;
  align-content: center;
  gap: clamp(14px, 2.5vw, 24px);
  overflow: hidden;
  overscroll-behavior: contain;
  padding: clamp(28px, 4.4vw, 58px) var(--page-x);
  pointer-events: none;
}

.story-section.is-page-active {
  pointer-events: auto;
}

.story-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(98, 126, 234, 0.15), transparent 34rem),
    radial-gradient(circle at 78% 64%, rgba(143, 255, 235, 0.09), transparent 34rem),
    linear-gradient(180deg, transparent, rgba(7, 13, 31, 0.3) 42%, transparent);
}

.story-section::after {
  content: "";
  position: absolute;
  inset: 12% 8%;
  z-index: -1;
  border: 1px solid rgba(143, 255, 235, 0.08);
  transform: rotate(45deg);
}

.hero-section {
  grid-template-columns: minmax(0, 640px) minmax(96px, 150px) minmax(260px, 340px);
  align-items: center;
  justify-content: center;
  column-gap: clamp(28px, 3.8vw, 56px);
  row-gap: clamp(16px, 2vw, 22px);
}

.hero-copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  max-width: 760px;
}

.hero-section .metric-grid {
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-self: center;
  width: 100%;
  max-width: 1120px;
}

.scroll-cue {
  grid-column: 1 / -1;
  grid-row: 3;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 100%;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(3.8rem, 5.2vw, 5.4rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.9;
  text-shadow:
    0 0 34px rgba(98, 126, 234, 0.38),
    0 0 70px rgba(143, 255, 235, 0.16);
  overflow-wrap: normal;
  word-break: normal;
}

h1 span {
  display: block;
}

h2 {
  max-width: 900px;
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(2.35rem, 5vw, 5.2rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  overflow-wrap: anywhere;
}

.story-section:not(.hero-section) h2 {
  font-size: clamp(2.25rem, 4.5vw, 4.5rem);
}

#work .panel-heading,
#writing .panel-heading {
  max-width: none;
}

#work h2,
#writing h2 {
  font-size: clamp(2.4rem, 4.8vw, 5.4rem);
}

#work.story-section {
  grid-template-columns: minmax(500px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(36px, 6vw, 96px);
}

#work .panel-heading {
  max-width: 720px;
}

#work h2 {
  max-width: 720px;
  font-size: clamp(3rem, 3.4vw, 4.2rem);
  line-height: 0.98;
  white-space: pre-line;
}

#work .timeline {
  align-self: center;
  grid-template-columns: 1fr;
}

#work .timeline-item:last-child {
  grid-column: auto;
}

#writing h2 {
  max-width: none;
}

h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.14rem;
  line-height: 1.3;
}

.hero-subtitle {
  max-width: 760px;
  margin-bottom: 18px;
  color: #dfe6ff;
  font-size: clamp(1.08rem, 1.7vw, 1.38rem);
  font-weight: 850;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.hero-summary,
.timeline-item p,
.project-card p,
.impact-list p {
  color: var(--muted);
}

.hero-summary {
  max-width: 620px;
  font-size: 1rem;
}

.hero-actions,
.contact-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.05);
  color: #e9edff;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 255, 0.12);
}

.button:hover {
  border-color: rgba(143, 255, 235, 0.55);
  color: var(--cyan);
}

.button-primary {
  border-color: rgba(143, 255, 235, 0.65);
  background: linear-gradient(135deg, rgba(98, 126, 234, 0.85), rgba(49, 215, 255, 0.28));
  color: #fff;
}

.identity-orbit {
  position: relative;
  grid-column: 3;
  grid-row: 1;
  min-height: clamp(320px, 32vw, 430px);
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 420px);
}

.hero-eth-core {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  width: clamp(86px, 8vw, 132px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  filter:
    drop-shadow(0 0 18px rgba(143, 255, 235, 0.38))
    drop-shadow(0 0 42px rgba(98, 126, 234, 0.3));
  animation: ethCoreFloat 4.8s ease-in-out infinite;
}

.hero-eth-core svg {
  position: relative;
  z-index: 1;
  width: 58%;
  height: auto;
  overflow: visible;
  transform-origin: center;
  animation: ethCoreBreathe 3.4s ease-in-out infinite;
}

.hero-eth-orbit,
.hero-eth-orbit span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.hero-eth-orbit {
  border: 1px solid rgba(143, 255, 235, 0.24);
  animation: slowSpin 16s linear infinite;
}

.hero-eth-orbit span {
  border: 1px solid rgba(98, 126, 234, 0.26);
  transform: scale(0.72) rotate(26deg);
}

.hero-eth-orbit span:last-child {
  border-color: rgba(143, 255, 235, 0.16);
  transform: scale(1.22) rotate(-18deg);
  animation: ethOrbitPulse 3.2s ease-in-out infinite;
}

.hero-eth-face {
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 0.7;
  stroke-linejoin: round;
}

.hero-eth-face.top-left,
.hero-eth-face.mid-left,
.hero-eth-face.bottom-left {
  fill: rgba(143, 255, 235, 0.82);
}

.hero-eth-face.top-right,
.hero-eth-face.mid-right,
.hero-eth-face.bottom-right {
  fill: rgba(98, 126, 234, 0.8);
}

.hero-eth-face.mid-left,
.hero-eth-face.mid-right {
  filter: brightness(0.82);
}

.hero-eth-face.bottom-left,
.hero-eth-face.bottom-right {
  filter: brightness(0.68);
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(143, 255, 235, 0.24);
  border-radius: 50%;
  animation: slowSpin 20s linear infinite;
}

.ring-one {
  width: min(92%, 420px);
  aspect-ratio: 1;
}

.ring-two {
  width: min(70%, 310px);
  aspect-ratio: 1;
  border-color: rgba(98, 126, 234, 0.3);
  animation-direction: reverse;
}

.portrait-wrap {
  position: relative;
  z-index: 1;
  width: clamp(178px, 17vw, 255px);
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(143, 255, 235, 0.78);
  border-radius: 50%;
  background: var(--panel);
  box-shadow:
    0 0 0 14px rgba(98, 126, 234, 0.09),
    0 0 80px rgba(143, 255, 235, 0.24);
}

.portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.metric-grid,
.focus-grid,
.project-grid,
.impact-list,
.source-grid,
.article-list {
  display: grid;
  gap: 12px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.focus-grid,
.impact-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.source-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.metric,
.focus-grid div,
.project-card,
.impact-list article,
.source-card,
.article-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 13, 31, 0.72);
  backdrop-filter: blur(12px);
}

.metric {
  min-height: 92px;
  padding: 16px 18px;
}

.metric span {
  display: block;
  color: var(--cyan);
  font-size: clamp(1.7rem, 2.5vw, 2.35rem);
  font-weight: 950;
  line-height: 1;
}

.metric p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.scroll-cue {
  justify-self: center;
  color: var(--faint);
  font-weight: 800;
  margin-top: 2px;
}

.scroll-cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 44px;
  margin: 12px auto 0;
  background: linear-gradient(transparent, var(--cyan));
}

.panel-heading {
  max-width: 960px;
}

.focus-grid div {
  min-height: 142px;
  padding: 20px;
}

.focus-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
}

.focus-grid p {
  margin: 0;
  color: var(--muted);
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.skill-cloud span {
  border: 1px solid rgba(143, 255, 235, 0.25);
  border-radius: 999px;
  background: rgba(143, 255, 235, 0.07);
  padding: 8px 12px;
  color: #dffdf8;
  font-size: 0.9rem;
  font-weight: 850;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(130px, 0.28fr) minmax(0, 1fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 13, 31, 0.58);
  padding: 14px 16px;
}

.timeline-item:last-child {
  grid-column: 1 / -1;
}

.timeline-item time {
  color: var(--cyan);
  font-weight: 900;
  line-height: 1.3;
}

.role {
  margin-bottom: 5px;
  color: #dfe6ff;
  font-weight: 900;
}

.timeline-item h3 {
  margin-bottom: 5px;
}

.timeline-item p {
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.46;
}

.project-card {
  min-height: 202px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.source-card {
  min-height: 188px;
  padding: 18px;
}

.project-card.featured {
  grid-column: span 2;
  border-color: rgba(143, 255, 235, 0.55);
  background:
    linear-gradient(135deg, rgba(98, 126, 234, 0.28), transparent 60%),
    rgba(7, 13, 31, 0.82);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card-topline span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-card p,
.source-card p,
.article-card p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.detail-card p {
  margin-bottom: 18px;
}

.detail-card details {
  margin-top: auto;
}

details {
  color: var(--muted);
}

summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  cursor: pointer;
  border: 1px solid rgba(143, 255, 235, 0.32);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 900;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

details[open] summary {
  margin-bottom: 12px;
  border-color: rgba(143, 255, 235, 0.58);
  background: rgba(143, 255, 235, 0.07);
}

details ul {
  margin: 0 0 14px;
  padding-left: 18px;
}

details li + li {
  margin-top: 7px;
}

.text-link {
  display: inline-flex;
  max-width: 100%;
  width: fit-content;
  margin: 10px 12px 0 0;
  color: var(--cyan);
  font-weight: 900;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.text-link:hover {
  color: #fff;
}

.article-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.article-card {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 12px;
  min-height: 360px;
  padding: 22px;
}

.article-index {
  color: var(--cyan);
  font-size: clamp(3rem, 5.2vw, 5.3rem);
  font-weight: 950;
  line-height: 1;
}

.article-card h3 {
  font-size: clamp(1.35rem, 2vw, 2.1rem);
  overflow-wrap: anywhere;
}

.article-card p {
  font-size: 0.98rem;
  line-height: 1.5;
}

.impact-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.impact-list article {
  min-height: 230px;
  padding: 22px;
}

.impact-list span {
  color: var(--cyan);
  font-weight: 950;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
  gap: 40px;
  align-items: center;
}

.contact-actions {
  flex-direction: column;
  align-items: stretch;
}

.contact-actions .button {
  width: 100%;
}

.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
  transition-delay: var(--delay, 0ms);
}

.story-section.is-page-active .reveal {
  transition-delay: 0ms !important;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body:not(.is-loading) .hero-section .reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-duration: 0ms;
  transition-delay: 0ms;
}

.site-footer {
  display: none;
}

.site-footer p {
  margin: 0;
}

@keyframes loaderOrbit {
  to {
    transform: rotate(405deg);
  }
}

@keyframes ethPulse {
  from {
    opacity: 0.72;
  }
  to {
    opacity: 1;
  }
}

@keyframes particleDrift {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6);
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.15);
  }
}

@keyframes slowSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loaderGhostPulse {
  0%,
  100% {
    opacity: 0.18;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.34;
    transform: scale(1.03);
  }
}

@keyframes ethCoreFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes ethCoreBreathe {
  0%,
  100% {
    opacity: 0.82;
    transform: scale(0.96) rotate(-2deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.04) rotate(2deg);
  }
}

@keyframes ethOrbitPulse {
  0%,
  100% {
    opacity: 0.32;
    transform: scale(1.12) rotate(-18deg);
  }
  50% {
    opacity: 0.72;
    transform: scale(1.28) rotate(12deg);
  }
}

@media (max-width: 1180px) {
  :root {
    --page-x: clamp(28px, 4vw, 46px);
  }

  .nav-shell {
    width: calc(100% - 56px);
  }

  .hero-section {
    grid-template-columns: minmax(0, 520px) minmax(82px, 112px) minmax(210px, 280px);
    column-gap: clamp(20px, 3vw, 34px);
  }

  .hero-copy {
    max-width: 520px;
  }

  h1 {
    font-size: clamp(3.2rem, 6vw, 4.35rem);
    line-height: 0.92;
  }

  .hero-subtitle {
    font-size: clamp(1rem, 1.55vw, 1.18rem);
  }

  .identity-orbit {
    min-height: 280px;
  }

  .hero-eth-core {
    width: clamp(74px, 8vw, 102px);
  }

  .portrait-wrap {
    width: clamp(168px, 18vw, 220px);
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metric {
    min-height: 82px;
    padding: 13px 14px;
  }

  .metric span {
    font-size: clamp(1.5rem, 3vw, 2rem);
  }

  .metric p {
    margin-top: 6px;
  }

  #work.story-section {
    grid-template-columns: minmax(310px, 0.34fr) minmax(0, 1fr);
    column-gap: clamp(24px, 4vw, 48px);
  }

  #work h2 {
    font-size: clamp(2.3rem, 3.8vw, 3.2rem);
  }

  .timeline-item {
    grid-template-columns: minmax(112px, 0.24fr) minmax(0, 1fr);
    gap: 12px;
  }

  .article-card {
    min-height: 300px;
    padding: 18px;
  }

  .article-card h3 {
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  }
}

@media (min-width: 621px) and (max-height: 680px) {
  :root {
    --page-x: clamp(28px, 4vw, 42px);
  }

  .nav-shell {
    min-height: 58px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .nav-links a,
  .language-toggle {
    min-height: 34px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .story-section {
    gap: 10px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .hero-section {
    grid-template-columns: minmax(0, 440px) minmax(62px, 84px) minmax(160px, 210px);
    column-gap: clamp(14px, 2.4vw, 22px);
    row-gap: 8px;
    align-content: center;
  }

  .hero-copy {
    max-width: 440px;
  }

  h1 {
    margin-bottom: 8px;
    font-size: clamp(2.8rem, 5.2vw, 3.35rem);
    line-height: 0.9;
  }

  .hero-subtitle {
    margin-bottom: 10px;
    font-size: clamp(0.95rem, 1.4vw, 1.08rem);
    line-height: 1.28;
  }

  .hero-summary {
    max-width: 580px;
    font-size: 0.92rem;
    line-height: 1.42;
  }

  .hero-actions {
    gap: 8px;
    margin-top: 16px;
  }

  .button {
    min-height: 36px;
    padding: 8px 12px;
  }

  .identity-orbit {
    min-height: 170px;
  }

  .hero-eth-core {
    width: clamp(58px, 7vw, 76px);
  }

  .ring-one {
    width: min(96%, 270px);
  }

  .ring-two {
    width: min(74%, 210px);
  }

  .portrait-wrap {
    width: clamp(138px, 15vw, 176px);
    box-shadow:
      0 0 0 10px rgba(98, 126, 234, 0.08),
      0 0 52px rgba(143, 255, 235, 0.2);
  }

  .metric-grid {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-width: 900px;
  }

  .metric {
    min-height: 68px;
    padding: 10px 12px;
  }

  .metric span {
    font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  }

  .metric p {
    margin-top: 4px;
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .scroll-cue {
    display: none;
  }

  .story-section:not(.hero-section) h2,
  #work h2,
  #writing h2 {
    font-size: clamp(2rem, 3.4vw, 3rem);
  }

  .panel-heading {
    max-width: 800px;
  }

  .focus-grid div {
    min-height: 108px;
    padding: 16px;
  }

  .timeline {
    gap: 8px;
  }

  #work .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-item {
    grid-template-columns: 1fr;
    padding: 10px 12px;
    gap: 4px;
  }

  .timeline-item p {
    font-size: 0.84rem;
    line-height: 1.35;
  }

  #work .timeline-item p:not(.role) {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .source-card,
  .project-card {
    min-height: 150px;
    padding: 14px;
  }

  .article-card {
    min-height: 250px;
    padding: 16px;
  }

  .article-index {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
  }
}

@media (max-width: 960px) {
  :root {
    --page-x: 20px;
  }

  .nav-shell {
    grid-template-columns: auto auto;
    min-height: 64px;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .hero-section,
  #work.story-section,
  .contact-grid,
  .focus-grid,
  .project-grid,
  .source-grid,
  .impact-list {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .hero-section .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .hero-copy,
  .hero-eth-core,
  .identity-orbit,
  .hero-section .metric-grid,
  .scroll-cue {
    grid-column: 1;
    grid-row: auto;
  }

  .project-card.featured {
    grid-column: auto;
  }

  .timeline,
  .article-list {
    grid-template-columns: 1fr;
  }

  .timeline-item:last-child {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  :root {
    --page-x: 14px;
  }

  body {
    font-size: 15px;
  }

  .cosmic-vignette {
    background-size: 42px 42px, 42px 42px, auto;
  }

  .eth-ghost {
    opacity: 0.1;
  }

  .eth-ghost svg {
    width: 78vw;
    min-width: 220px;
  }

  .eth-line-logo {
    opacity: 0.08;
    transform: translateX(8vw) rotate(-9deg);
  }

  .eth-line-logo svg {
    width: 72vw;
    min-width: 220px;
  }

  .site-header {
    background: rgba(3, 7, 18, 0.76);
  }

  .brand span:last-child {
    display: none;
  }

  .nav-shell,
  .site-footer {
    width: min(var(--max), calc(100% - 24px));
  }

  .nav-shell {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 60px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .nav-links {
    grid-column: auto;
    grid-row: auto;
    min-width: 0;
    gap: 4px;
    padding-bottom: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 0.86rem;
  }

  .language-toggle {
    width: 48px;
    min-height: 36px;
    font-size: 0.88rem;
  }

  .cosmic-shell {
    width: 100vw;
  }

  .story-section {
    height: var(--page-h);
    min-height: 0;
    align-content: start;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px var(--page-x) calc(24px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-y;
  }

  .story-section::-webkit-scrollbar {
    display: none;
  }

  .story-section:not(.hero-section) {
    align-content: start;
    padding-top: 22px;
  }

  .story-section::before {
    inset: 0;
  }

  .story-section::after {
    inset: 12% -24%;
  }

  h1 {
    margin-bottom: 10px;
    font-size: clamp(2.45rem, 12.2vw, 3.25rem);
    line-height: 0.92;
  }

  h2 {
    font-size: clamp(1.38rem, 5.8vw, 1.82rem);
    margin-bottom: 10px;
    line-height: 1.08;
  }

  .story-section:not(.hero-section) h2 {
    font-size: clamp(1.38rem, 5.8vw, 1.82rem);
  }

  #work h2,
  #writing h2 {
    font-size: clamp(1.52rem, 6.4vw, 2.05rem);
    line-height: 1.06;
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 0.7rem;
  }

  .hero-section {
    align-content: start;
  }

  .hero-copy {
    width: 100%;
    margin-inline: auto;
    text-align: center;
  }

  .hero-copy h1,
  .hero-subtitle,
  .hero-summary {
    margin-left: auto;
    margin-right: auto;
  }

  .identity-orbit {
    order: -3;
    width: min(100%, 310px);
    margin-inline: auto;
  }

  .hero-eth-core {
    order: -2;
    width: 74px;
    margin: -4px auto 0;
  }

  .hero-copy {
    order: -1;
  }

  .hero-subtitle {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.34;
  }

  .hero-summary {
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .hero-actions {
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
  }

  .button {
    min-height: 36px;
    padding: 8px 11px;
    font-size: 0.88rem;
  }

  .identity-orbit {
    min-height: 136px;
  }

  .identity-orbit .orbit-ring {
    opacity: 0.55;
  }

  .portrait-wrap {
    width: 116px;
    margin: 0 auto;
    box-shadow:
      0 0 0 9px rgba(98, 126, 234, 0.09),
      0 0 44px rgba(143, 255, 235, 0.22);
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-inline: auto;
    gap: 8px;
  }

  .metric,
  .source-card,
  .project-card,
  .article-card {
    min-height: 0;
    padding: 12px;
  }

  .metric {
    padding: 11px;
  }

  .metric span {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }

  .metric p {
    margin-top: 5px;
    font-size: 0.78rem;
    line-height: 1.28;
  }

  .scroll-cue {
    font-size: 0.82rem;
  }

  .scroll-cue::after {
    height: 28px;
    margin-top: 8px;
  }

  .focus-grid {
    gap: 8px;
  }

  .focus-grid div {
    min-height: 0;
    padding: 13px;
  }

  .focus-grid span {
    margin-bottom: 5px;
    font-size: 0.95rem;
  }

  .skill-cloud {
    gap: 6px;
  }

  .skill-cloud span {
    padding: 6px 9px;
    font-size: 0.78rem;
  }

  .source-card p,
  .project-card p,
  .article-card p,
  .timeline-item p {
    font-size: 0.84rem;
    line-height: 1.42;
  }

  .project-card h3,
  .source-card h3,
  .article-card h3 {
    font-size: 1rem;
  }

  .card-topline {
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .timeline-item {
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 11px 12px;
  }

  .timeline-item:last-child {
    grid-column: auto;
  }

  .timeline-item time {
    font-size: 0.86rem;
  }

  .role {
    font-size: 0.86rem;
  }

  .article-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .article-index {
    font-size: clamp(2.45rem, 13vw, 3.25rem);
  }

  summary {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  details ul {
    padding-left: 16px;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .loader-stage {
    width: min(88vw, 420px);
    min-height: min(88vw, 420px);
  }

  .loader-stage::before {
    inset: 44px;
  }

  .loader-stage::after {
    inset: 86px;
  }

  .eth-loader {
    width: 94px;
    height: 154px;
  }
}

@media (max-width: 390px) {
  :root {
    --page-x: 12px;
  }

  .nav-shell {
    width: calc(100% - 18px);
    gap: 6px;
  }

  .nav-links a {
    padding-inline: 8px;
    font-size: 0.82rem;
  }

  h1 {
    font-size: clamp(2.2rem, 11.8vw, 2.85rem);
  }

  .hero-subtitle,
  .hero-summary {
    font-size: 0.86rem;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric {
    padding: 10px;
  }

  .button {
    padding-inline: 10px;
  }
}
