:root {
  color-scheme: dark;
  --bg: #080b12;
  --ink: #f4f6fb;
  --muted: #aeb8c8;
  --accent: #a3e6d1;
  --accent-ink: #101a18;
  --line: #ffffff24;
  --panel: #101620eb;
  --section: #090d15e8;
  --header: #080b12ed;
  --soft: #ffffff0a;
  --secondary: #b8c6ff;
  --max: 1180px;
  --gutter: 36px;
  --header-h: 76px;
}

html[data-theme="sakura"] {
  color-scheme: light;
  --bg: #fff9fc;
  --ink: #25262b;
  --muted: #65636e;
  --accent: #b73870;
  --accent-ink: #fff;
  --line: #7e3d591f;
  --panel: #fffffff2;
  --section: #fffafde8;
  --header: #fffcfeef;
  --soft: #c35a8b08;
  --secondary: #3c756c;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
  overflow-wrap: break-word;
}
body.is-loading {
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
::selection {
  background: #f3bad2;
  color: #26212a;
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 750;
  text-wrap: balance;
}
h1 {
  font-size: 104px;
  line-height: 1.04;
  font-weight: 820;
}
h2 {
  font-size: 38px;
}
h3 {
  font-size: 22px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 16px;
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 6px;
}
.skip-link:focus {
  transform: none;
}
.icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: var(--icon) center / contain no-repeat;
  -webkit-mask: var(--icon) center / contain no-repeat;
}
.icon-arrow-up-right {
  --icon: url("data:image/svg+xml,%3Csvg%0A%20%20class%3D%22lucide%20lucide-arrow-up-right%22%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22currentColor%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Cpath%20d%3D%22M7%207h10v10%22%20%2F%3E%0A%20%20%3Cpath%20d%3D%22M7%2017%2017%207%22%20%2F%3E%0A%3C%2Fsvg%3E");
}
.icon-arrow-down {
  --icon: url("data:image/svg+xml,%3Csvg%0A%20%20class%3D%22lucide%20lucide-arrow-down%22%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22currentColor%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Cpath%20d%3D%22M12%205v14%22%20%2F%3E%0A%20%20%3Cpath%20d%3D%22m19%2012-7%207-7-7%22%20%2F%3E%0A%3C%2Fsvg%3E");
}
.icon-arrow-up {
  --icon: url("data:image/svg+xml,%3Csvg%0A%20%20class%3D%22lucide%20lucide-arrow-up%22%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22currentColor%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Cpath%20d%3D%22m5%2012%207-7%207%207%22%20%2F%3E%0A%20%20%3Cpath%20d%3D%22M12%2019V5%22%20%2F%3E%0A%3C%2Fsvg%3E");
}
.icon-pause {
  --icon: url("data:image/svg+xml,%3Csvg%0A%20%20class%3D%22lucide%20lucide-pause%22%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22currentColor%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Crect%20x%3D%2214%22%20y%3D%224%22%20width%3D%224%22%20height%3D%2216%22%20rx%3D%221%22%20%2F%3E%0A%20%20%3Crect%20x%3D%226%22%20y%3D%224%22%20width%3D%224%22%20height%3D%2216%22%20rx%3D%221%22%20%2F%3E%0A%3C%2Fsvg%3E");
}
.icon-play {
  --icon: url("data:image/svg+xml,%3Csvg%0A%20%20class%3D%22lucide%20lucide-play%22%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22currentColor%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Cpolygon%20points%3D%226%203%2020%2012%206%2021%206%203%22%20%2F%3E%0A%3C%2Fsvg%3E");
}
.icon-rotate-ccw {
  --icon: url("data:image/svg+xml,%3Csvg%0A%20%20class%3D%22lucide%20lucide-rotate-ccw%22%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22currentColor%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Cpath%20d%3D%22M3%2012a9%209%200%201%200%209-9%209.75%209.75%200%200%200-6.74%202.74L3%208%22%20%2F%3E%0A%20%20%3Cpath%20d%3D%22M3%203v5h5%22%20%2F%3E%0A%3C%2Fsvg%3E");
}
.icon-copy {
  --icon: url("data:image/svg+xml,%3Csvg%0A%20%20class%3D%22lucide%20lucide-copy%22%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22currentColor%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Crect%20width%3D%2214%22%20height%3D%2214%22%20x%3D%228%22%20y%3D%228%22%20rx%3D%222%22%20ry%3D%222%22%20%2F%3E%0A%20%20%3Cpath%20d%3D%22M4%2016c-1.1%200-2-.9-2-2V4c0-1.1.9-2%202-2h10c1.1%200%202%20.9%202%202%22%20%2F%3E%0A%3C%2Fsvg%3E");
}
.icon-check {
  --icon: url("data:image/svg+xml,%3Csvg%0A%20%20class%3D%22lucide%20lucide-check%22%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22currentColor%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Cpath%20d%3D%22M20%206%209%2017l-5-5%22%20%2F%3E%0A%3C%2Fsvg%3E");
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
}
.icon-button:hover {
  background: var(--soft);
  color: var(--accent);
}

/* Atmosphere stays behind the document, never above its controls. */
#starfield,
.sakura-tree-backdrop,
.sakura-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
body {
  isolation: isolate;
}
#starfield {
  width: 100%;
  height: 100%;
}
.sakura-tree-backdrop {
  display: none;
  background:
    linear-gradient(90deg, #fffafcf0, #fffafca1 48%, #fffafc35),
    url("assets/sakura-tree-bg.jpg") 58% center / cover no-repeat;
}
html[data-theme="sakura"] .sakura-tree-backdrop {
  display: block;
}
html[data-theme="sakura"] #starfield {
  visibility: hidden;
}
.sakura-field {
  display: none;
  overflow: hidden;
}
html[data-theme="sakura"] .sakura-field {
  display: block;
}
.sakura-field span,
.studio-petals span {
  position: absolute;
  top: -40px;
  left: var(--petal-x, 50%);
  width: var(--petal-w, 12px);
  height: calc(var(--petal-w, 12px) * 0.58);
  border-radius: 80% 10% 80% 10%;
  background: #f5b2ce;
  opacity: 0.65;
  animation: petalFall var(--petal-t, 24s) linear infinite;
  animation-delay: var(--petal-d, 0s);
}
.sakura-field span:nth-child(2n),
.studio-petals span:nth-child(2n) {
  background: #fff;
  opacity: 0.86;
}
.sakura-field span:nth-child(3n),
.studio-petals span:nth-child(3n) {
  background: #ed94b9;
  opacity: 0.4;
}
.cosmic-vignette,
.eth-ghost,
.eth-line-logo,
.hero-sakura-tree,
.hero-eth-core {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-shell {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  min-height: 76px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand,
.nav-links,
.nav-controls,
.hero-actions,
.hero-socials,
.footer-links {
  display: flex;
  align-items: center;
}
.brand {
  gap: 10px;
  font-size: 18px;
  font-weight: 780;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}
.nav-links {
  gap: 24px;
}
.nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-links a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.nav-links a:hover {
  color: var(--accent);
}
.nav-controls {
  gap: 6px;
}
.language-toggle {
  min-width: 44px;
  height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.language-toggle:hover {
  background: var(--soft);
  color: var(--accent);
}
.cosmic-shell {
  outline: none;
}
.story-section {
  padding: 80px max(var(--gutter), calc((100% - var(--max)) / 2));
  border-top: 1px solid var(--line);
  background: var(--section);
  scroll-margin-top: 0;
  min-width: 0;
}
.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 40px 64px;
  align-items: center;
  padding-block: 64px 36px;
  min-height: min(710px, calc(100svh - var(--header-h) - 64px));
  border-top: 0;
  background: transparent;
}
.hero-copy {
  min-width: 0;
}
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}
.hero-copy .eyebrow {
  margin-bottom: 22px;
}
.hero-subtitle {
  font-size: 19px;
  font-weight: 650;
  line-height: 1.65;
  margin-top: 22px;
  max-width: 600px;
}
.hero-summary {
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
  margin-top: 18px;
  line-height: 1.9;
}
.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 19px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font-size: 14px;
  font-weight: 650;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}
.button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.hero-socials {
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 24px;
  color: var(--muted);
}
.hero-socials a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  font-size: 13px;
}
.hero-socials .icon {
  width: 13px;
  height: 13px;
}
.hero-socials a:hover {
  color: var(--accent);
}
.identity-orbit {
  width: 330px;
  max-width: 100%;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
}
.portrait-wrap {
  width: 86%;
  max-width: 280px;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid var(--panel);
  box-shadow: 0 16px 50px #2611291a;
}
.portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.orbit-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.ring-two {
  width: 92%;
  height: 92%;
}
.metric-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  padding-top: 26px;
  gap: 24px;
}
.metric + .metric {
  border-left: 1px solid var(--line);
  padding-left: 30px;
}
.metric span {
  display: block;
  color: var(--accent);
  font-size: 32px;
  line-height: 1.15;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.metric p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}
.panel-heading {
  margin-bottom: 36px;
  max-width: 780px;
}
.panel-heading h2 {
  max-width: 100%;
}
.panel-heading .text-link {
  margin-top: 18px;
}
.focus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
}
.focus-grid > div {
  border-top: 2px solid var(--line);
  padding-top: 20px;
}
.focus-grid span {
  font-size: 18px;
  font-weight: 650;
}
.focus-grid p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}
.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 34px;
  color: var(--secondary);
  font-size: 12px;
}
#work {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
#work .panel-heading {
  position: sticky;
  top: calc(var(--header-h) + 48px);
  margin: 0;
}
#work h2 {
  max-width: 360px;
}
.work-highlights {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 12px;
}
.work-highlights span:last-child {
  flex-basis: 100%;
  color: var(--secondary);
}
.timeline {
  border-top: 1px solid var(--line);
}
.timeline-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item time {
  color: var(--accent);
  font-size: 12px;
  line-height: 1.8;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.timeline-item h3 {
  font-size: 17px;
  line-height: 1.45;
}
.role {
  color: var(--muted);
  margin-top: 6px;
  font-size: 13px;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 300px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}
.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 30px #25102008;
}
.project-card.featured {
  border-top: 3px solid var(--accent);
  padding-top: 26px;
}
.project-card:nth-child(2) {
  border-top: 3px solid var(--secondary);
  padding-top: 26px;
}
.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 18px;
}
.card-topline span:first-child {
  color: var(--accent);
}
.project-card > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
  margin-top: 14px;
  margin-bottom: 18px;
}
.project-card details {
  margin-top: auto;
}
.project-link,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  min-height: 36px;
  border: 0;
  background: transparent;
  padding: 0;
}
.project-link {
  margin-top: 14px;
}
.project-link:hover,
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.project-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
details {
  color: var(--muted);
  font-size: 13px;
}
summary {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  width: fit-content;
  min-height: 36px;
  font-size: 12px;
  color: var(--ink);
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::before {
  content: "+";
  font-size: 18px;
  font-weight: 400;
  width: 14px;
  text-align: center;
}
details[open] > summary::before {
  content: "\2212";
}
details ul {
  padding-left: 18px;
  margin: 12px 0 6px;
}
details li + li {
  margin-top: 8px;
}
.article-list {
  display: grid;
}
.article-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.article-card:last-child {
  border-bottom: 1px solid var(--line);
}
.article-index {
  color: var(--accent);
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
}
.article-card .card-topline {
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 10px;
}
.article-card h3 {
  font-size: 24px;
}
.article-card h3 a {
  display: inline;
}
.article-card h3 a .icon {
  width: 20px;
  height: 20px;
  margin-left: 12px;
}
.article-card h3 a:hover {
  color: var(--accent);
}
.article-card p {
  max-width: 820px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}
.article-card details {
  max-width: 820px;
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
}
.contact-summary {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}
.contact-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.contact-email {
  font-size: 20px;
  font-weight: 650;
  color: var(--accent);
}
.contact-email:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}
.site-footer {
  padding: 26px max(var(--gutter), calc((100% - var(--max)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  background: var(--header);
  color: var(--muted);
  font-size: 12px;
}
.footer-links {
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links .text-link {
  color: var(--muted);
  font-size: 12px;
}
.reveal {
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}
.is-enhanced .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(16px);
}
body.is-loading .site-header,
body.is-loading main,
body.is-loading .site-footer {
  visibility: hidden;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 500ms ease;
}
.loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.loader-stage {
  display: grid;
  place-items: center;
}
.sakura-loader-scene {
  display: none;
}
html[data-theme="sakura"] .sakura-loader-scene {
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.sakura-loader-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fujiDrift 4.8s ease-out both;
}
.sakura-loader-scene > svg:not(.sakura-loader-title),
.fuji-petal,
.loader-eth-ghost {
  display: none;
}
.sakura-loader-title {
  position: absolute;
  top: 11%;
  left: 50%;
  width: min(680px, 86%);
  height: auto;
  transform: translateX(-50%);
  overflow: visible;
}
.sakura-loader-title text {
  font-family: "Snell Roundhand", "Brush Script MT", "Segoe Script", cursive;
  font-size: 116px;
  font-weight: 700;
  fill: transparent;
  stroke: #ae356b;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 980;
  stroke-dashoffset: 980;
  animation:
    titleWrite 2.5s ease 0.35s forwards,
    titleFill 0.65s ease 2.6s forwards;
}
.eth-loader {
  width: 154px;
  height: 252px;
  animation: ethBreathe 1.6s ease-in-out infinite alternate;
}
.eth-glyph {
  width: 100%;
  height: 100%;
}
.eth-face {
  fill: url(#ethSolidLeft);
  stroke: #ffffff66;
  stroke-width: 0.7;
}
.eth-top-right,
.eth-mid-right,
.eth-bottom-right {
  fill: url(#ethSolidRight);
}
.eth-mid-left,
.eth-mid-right {
  filter: brightness(0.85);
}
.eth-bottom-left,
.eth-bottom-right {
  filter: brightness(0.72);
}
.eth-particles {
  display: none;
}
html[data-theme="sakura"] .eth-loader {
  display: none;
}
.is-motion-paused *,
.is-background * {
  animation-play-state: paused !important;
}
.is-motion-paused .sakura-loader-title text {
  stroke-dashoffset: 0;
  fill: #ae356b;
  animation: none;
}
html[data-reduced-motion="true"] {
  scroll-behavior: auto;
}
html[data-reduced-motion="true"] *,
html[data-reduced-motion="true"] *::before,
html[data-reduced-motion="true"] *::after {
  animation: none !important;
  transition: none !important;
}
html[data-reduced-motion="true"] .sakura-loader-title text {
  stroke-dashoffset: 0;
  fill: #ae356b;
}
html[data-reduced-motion="true"] .sakura-field {
  display: none;
}

@keyframes petalFall {
  0% {
    transform: translate3d(0, -20px, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(40px, 50vh, 0) rotate(160deg);
  }
  100% {
    transform: translate3d(-24px, calc(100vh + 60px), 0) rotate(320deg);
  }
}
@keyframes fujiDrift {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}
@keyframes titleWrite {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes titleFill {
  to {
    fill: #ae356b;
    stroke-width: 1;
  }
}
@keyframes ethBreathe {
  to {
    transform: translateY(-10px);
  }
}

@media (min-width: 1600px) {
  .hero-section {
    min-height: min(740px, calc(100svh - var(--header-h) - 64px));
  }
}
@media (max-width: 1100px) {
  :root {
    --gutter: 28px;
  }
  .nav-shell {
    gap: 16px;
  }
  .nav-links {
    gap: 18px;
  }
  .hero-section {
    column-gap: 32px;
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .identity-orbit {
    width: 280px;
  }
  h1 {
    font-size: 88px;
  }
  .hero-subtitle {
    font-size: 17px;
  }
  #work {
    gap: 40px;
    grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  }
  .timeline-item {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
@media (max-width: 800px) {
  :root {
    --header-h: 112px;
    --gutter: 24px;
  }
  .nav-shell {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 12px;
    padding-top: 10px;
    min-height: 112px;
  }
  .nav-controls {
    grid-column: 2;
    grid-row: 1;
  }
  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links a {
    min-height: 48px;
  }
  .story-section {
    padding-block: 56px;
  }
  .hero-section {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 36px 24px;
    padding-block: 46px 30px;
  }
  .identity-orbit {
    width: 200px;
  }
  h1 {
    font-size: 64px;
  }
  h2 {
    font-size: 30px;
  }
  .hero-subtitle {
    font-size: 16px;
  }
  .hero-summary {
    font-size: 15px;
  }
  .focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
  #work {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  #work .panel-heading {
    position: static;
  }
  #work h2 {
    max-width: none;
  }
  .work-highlights {
    gap: 12px 20px;
    margin-top: 18px;
  }
  .work-highlights span:last-child {
    flex-basis: auto;
  }
  .timeline-item {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .metric + .metric {
    padding-left: 18px;
  }
  .metric-grid {
    gap: 18px;
  }
  .metric span {
    font-size: 28px;
  }
  .project-card {
    padding: 22px;
    min-height: 330px;
  }
  .project-card.featured,
  .project-card:nth-child(2) {
    padding-top: 20px;
  }
  .project-card h3 {
    font-size: 20px;
  }
  .article-card h3 {
    font-size: 21px;
  }
}
@media (max-width: 560px) {
  :root {
    --gutter: 20px;
  }
  .sakura-tree-backdrop {
    background-image: linear-gradient(90deg, #fffafcf2, #fffafcd9),
      url("assets/sakura-tree-bg.jpg");
  }
  .brand {
    font-size: 16px;
    gap: 8px;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
  .language-toggle {
    padding-inline: 6px;
  }
  .nav-controls {
    gap: 2px;
  }
  .nav-controls .icon-button {
    border: 0;
    width: 36px;
  }
  .nav-links {
    gap: 16px;
  }
  .nav-links a {
    font-size: 12px;
  }
  .hero-section {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 22px 12px;
    padding-block: 34px 28px;
  }
  .hero-copy {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .hero-copy .eyebrow {
    padding-right: 112px;
    margin-bottom: 16px;
    font-size: 11px;
    min-height: 20px;
  }
  .identity-orbit {
    width: 96px;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    margin-top: -3px;
  }
  .portrait-wrap {
    border-width: 3px;
    max-width: 90%;
  }
  .ring-two {
    display: none;
  }
  h1 {
    font-size: 52px;
    max-width: calc(100% - 105px);
    min-height: 56px;
  }
  h2 {
    font-size: 28px;
  }
  .hero-subtitle {
    font-size: 16px;
    margin-top: 26px;
  }
  .hero-summary {
    font-size: 14px;
    margin-top: 14px;
  }
  .hero-actions {
    gap: 10px;
    margin-top: 24px;
  }
  .hero-actions .button {
    flex: 1;
    padding-inline: 12px;
  }
  .hero-socials {
    gap: 24px;
    margin-top: 18px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 24px;
    padding-top: 22px;
  }
  .metric + .metric {
    padding-left: 0;
    border-left: 0;
  }
  .metric span {
    font-size: 28px;
  }
  .metric p {
    font-size: 11px;
    margin-top: 6px;
  }
  .story-section:not(.hero-section) {
    padding-block: 44px;
  }
  .panel-heading {
    margin-bottom: 28px;
  }
  .eyebrow {
    margin-bottom: 12px;
  }
  .focus-grid {
    gap: 24px 18px;
  }
  .focus-grid span {
    font-size: 16px;
  }
  .focus-grid p {
    font-size: 12px;
  }
  .skill-cloud {
    gap: 10px 16px;
    font-size: 11px;
    margin-top: 28px;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 7px;
    padding-block: 22px;
  }
  .timeline-item h3 {
    font-size: 17px;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .project-card {
    min-height: 0;
  }
  .project-card details {
    margin-top: 0;
  }
  .article-card {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    padding-block: 24px;
  }
  .article-index {
    font-size: 16px;
  }
  .article-card h3 {
    font-size: 20px;
  }
  .article-card p {
    font-size: 13px;
  }
  .contact-email {
    font-size: 18px;
  }
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 22px;
    gap: 8px;
  }
  .footer-links {
    justify-content: space-between;
    width: 100%;
  }
}
@media (max-width: 360px) {
  :root {
    --gutter: 16px;
  }
  h1 {
    font-size: 44px;
  }
  .hero-copy .eyebrow {
    max-width: 230px;
  }
  .nav-links {
    gap: 14px;
  }
  .brand-mark {
    display: none;
  }
  .contact-email {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .sakura-field {
    display: none !important;
  }
  .sakura-loader-title text {
    stroke-dashoffset: 0;
    fill: #ae356b;
  }
}
