:root {
  color-scheme: dark;
  --void: #090a0c;
  --ink: #101114;
  --panel: rgba(246, 241, 226, 0.92);
  --paper: #f6f1e2;
  --paper-soft: #ded6be;
  --text: #f7f0df;
  --text-dim: rgba(247, 240, 223, 0.68);
  --dark-text: #111216;
  --dark-dim: rgba(17, 18, 22, 0.66);
  --line: rgba(247, 240, 223, 0.17);
  --dark-line: rgba(17, 18, 22, 0.16);
  --red: #f04a32;
  --acid: #c8ff4d;
  --cyan: #62d8c9;
  --blue: #3254d6;
  --gold: #d6a647;
  --radius: 8px;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.34);
  --sans: "Avenir Next", "Gill Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "STSong", serif;
  --mono: "SF Mono", "Menlo", "Consolas", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 12%, rgba(98, 216, 201, 0.19), transparent 26rem),
    radial-gradient(circle at 84% 24%, rgba(240, 74, 50, 0.19), transparent 22rem),
    linear-gradient(90deg, rgba(247, 240, 223, 0.055) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(247, 240, 223, 0.045) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--void);
  font-family: var(--sans);
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(115deg, transparent 0 44%, rgba(247, 240, 223, 0.5) 45%, transparent 46% 100%);
  background-size: 180px 180px;
  mix-blend-mode: screen;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a,
button {
  color: inherit;
}

a {
  text-decoration: none;
}

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

img {
  max-width: 100%;
}

.boot-skipped .boot {
  display: none;
}

body.booting {
  overflow: hidden;
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: block;
  overflow: hidden;
  background: #060709;
  perspective: 1100px;
  transition: opacity 360ms ease, visibility 360ms ease;
}

.boot.is-click-ready {
  cursor: pointer;
}

.boot::before,
.boot::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.boot::before {
  inset: 0;
  z-index: 4;
  opacity: 0.16;
  background:
    repeating-linear-gradient(0deg, rgba(247, 240, 223, 0.2) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, transparent, rgba(200, 255, 77, 0.28), transparent);
  mix-blend-mode: screen;
  animation: bootStatic 1.4s steps(2, end) infinite;
}

.boot::after {
  left: -12%;
  right: -12%;
  top: -18%;
  z-index: 5;
  height: 26%;
  background:
    linear-gradient(180deg, transparent, rgba(200, 255, 77, 0.22), rgba(98, 216, 201, 0.12), transparent);
  filter: blur(10px);
  transform: translateY(-160%) rotate(-3deg);
  animation: bootSweep 4.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.boot.is-done {
  opacity: 0;
  visibility: hidden;
}

.boot-hud {
  position: absolute;
  top: 14px;
  left: 18px;
  right: 18px;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(200, 255, 77, 0.9);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  pointer-events: none;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(200, 255, 77, 0.26);
}

.boot-hud i {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  height: 2px;
  overflow: hidden;
  background: rgba(247, 240, 223, 0.13);
}

.boot-hud i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--acid), var(--cyan), var(--red));
  transform: scaleX(0);
  transform-origin: left;
  animation: bootProgress 4.6s linear forwards;
}

.eyebrow {
  display: block;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.boot-bento {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  background:
    radial-gradient(circle at 18% 18%, rgba(98, 216, 201, 0.16), transparent 28rem),
    radial-gradient(circle at 82% 24%, rgba(240, 74, 50, 0.16), transparent 28rem),
    #060709;
  transform-origin: center;
  transform-style: preserve-3d;
}

.bento-cell {
  position: relative;
  --exit-x: 0vw;
  --exit-y: 0vh;
  --exit-r: 0deg;
  --cell-pointer-x: 0px;
  --cell-pointer-y: 0px;
  --cell-hover-y: 0px;
  --cell-z: 0px;
  --cell-scale: 1;
  --cell-tilt-x: 0deg;
  --cell-tilt-y: 0deg;
  --image-shift-x: 0px;
  --image-shift-y: 0px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(247, 240, 223, 0.12);
  border-radius: var(--radius);
  background: #111216;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  opacity: 0;
  filter: blur(8px);
  clip-path: inset(16% round var(--radius));
  transform: translate3d(0, 16px, 0) scale(0.92);
  animation: bentoReveal 500ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-style: preserve-3d;
  will-change: opacity, transform, filter, clip-path;
}

.boot.is-ready:not(.is-exiting) .bento-cell {
  animation: none;
  opacity: 1;
  filter: blur(0);
  clip-path: inset(0 round var(--radius));
  transform:
    translate3d(
      var(--cell-pointer-x),
      calc(var(--cell-pointer-y) + var(--cell-hover-y)),
      var(--cell-z)
    )
    rotateX(var(--cell-tilt-x))
    rotateY(var(--cell-tilt-y))
    scale(var(--cell-scale));
  transition:
    transform 260ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 220ms ease,
    box-shadow 220ms ease,
    filter 220ms ease;
}

.boot.has-tilt-input.is-ready:not(.is-exiting) .bento-cell {
  transition:
    transform 120ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 220ms ease,
    box-shadow 220ms ease,
    filter 220ms ease;
}

.bento-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(247, 240, 223, 0.045) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(247, 240, 223, 0.035) 1px, transparent 1px) 0 0 / 28px 28px;
  opacity: 0.56;
  mix-blend-mode: screen;
  animation: bentoCellScan 4.8s linear infinite;
}

.bento-cell img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.06) translate3d(var(--image-shift-x), var(--image-shift-y), 0);
  transition: transform 620ms cubic-bezier(0.16, 1, 0.3, 1), filter 320ms ease;
  will-change: transform;
}

.bento-cell-xhs {
  grid-row: 1 / 3;
  grid-column: 1 / 2;
  --exit-x: -58vw;
  --exit-y: -28vh;
  --exit-r: -14deg;
}

.bento-cell-gallery {
  grid-row: 1;
  grid-column: 2;
  --exit-x: -24vw;
  --exit-y: -62vh;
  --exit-r: 11deg;
}

.bento-cell-quiz {
  grid-row: 1;
  grid-column: 3;
  --exit-x: 14vw;
  --exit-y: -62vh;
  --exit-r: -10deg;
}

.bento-cell-time {
  grid-row: 1;
  grid-column: 4;
  --exit-x: 58vw;
  --exit-y: -32vh;
  --exit-r: 13deg;
}

.bento-cell-taste {
  grid-row: 2;
  grid-column: 2;
  --exit-x: -40vw;
  --exit-y: -2vh;
  --exit-r: -17deg;
}

.bento-cell-balance {
  grid-row: 2;
  grid-column: 3 / 5;
  --exit-x: 68vw;
  --exit-y: 4vh;
  --exit-r: 12deg;
}

.bento-cell-review {
  grid-row: 3;
  grid-column: 1;
  --exit-x: -58vw;
  --exit-y: 44vh;
  --exit-r: 12deg;
}

.bento-cell-mothers {
  grid-row: 3;
  grid-column: 2;
  --exit-x: -22vw;
  --exit-y: 66vh;
  --exit-r: -14deg;
}

.bento-cell-tokyo {
  grid-row: 3;
  grid-column: 3;
  --exit-x: 20vw;
  --exit-y: 66vh;
  --exit-r: 18deg;
}

.bento-cell-identity {
  grid-row: 3;
  grid-column: 4;
  --exit-x: 58vw;
  --exit-y: 46vh;
  --exit-r: -12deg;
}

.bento-cell-xhs img {
  object-position: 50% 16%;
}

.bento-cell-quiz img,
.bento-cell-time img,
.bento-cell-review img,
.bento-cell-mothers img {
  object-position: 50% 8%;
}

.bento-cell-taste img,
.bento-cell-tokyo img {
  object-position: 50% 30%;
}

.bento-cell-balance img {
  object-position: 50% 42%;
}

.boot:not(.is-exiting) .bento-cell:hover {
  z-index: 7;
  --cell-hover-y: -7px;
  --cell-z: 64px;
  --cell-scale: 1.03;
  border-color: rgba(200, 255, 77, 0.48);
  box-shadow: 0 26px 86px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(200, 255, 77, 0.18);
}

.boot:not(.is-exiting) .bento-cell:hover img {
  filter: saturate(1.12) contrast(1.05);
}

.bento-mosaic {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
}

.bento-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 42px 12px 12px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.46);
}

.bento-label strong {
  font-size: clamp(0.82rem, 1.18vw, 1.06rem);
  font-weight: 900;
  line-height: 1.2;
}

.bento-label span {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.68rem, 0.86vw, 0.78rem);
  line-height: 1.32;
}

.bento-cell-identity {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border-color: rgba(200, 255, 77, 0.3);
  background:
    linear-gradient(135deg, rgba(200, 255, 77, 0.08), transparent 44%),
    linear-gradient(90deg, rgba(247, 240, 223, 0.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(247, 240, 223, 0.045) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--ink);
  text-align: center;
}

.bento-cell-identity::after {
  opacity: 0;
}

.bento-kicker {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bento-name {
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 3.4rem);
  font-weight: 900;
  line-height: 1;
}

.bento-enter {
  min-height: 40px;
  margin-top: 8px;
  padding: 0 24px;
  border: 1px solid var(--acid);
  border-radius: var(--radius);
  background: transparent;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 0 0 rgba(200, 255, 77, 0);
  animation: enterPulse 1.6s ease-in-out 1.35s infinite;
  transition: background 200ms ease, color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.bento-enter:hover,
.bento-enter:focus-visible {
  transform: translateY(-2px);
  background: var(--acid);
  color: var(--dark-text);
  outline: none;
}

.bento-cell[data-bento="1"] { animation-delay: 0ms; }
.bento-cell[data-bento="2"] { animation-delay: 100ms; }
.bento-cell[data-bento="3"] { animation-delay: 200ms; }
.bento-cell[data-bento="4"] { animation-delay: 300ms; }
.bento-cell[data-bento="5"] { animation-delay: 400ms; }
.bento-cell[data-bento="6"] { animation-delay: 500ms; }
.bento-cell[data-bento="7"] { animation-delay: 600ms; }
.bento-cell[data-bento="8"] { animation-delay: 700ms; }
.bento-cell[data-bento="9"] { animation-delay: 800ms; }
.bento-cell[data-bento="10"] { animation-delay: 900ms; }

.boot.is-exiting .bento-cell {
  animation: bentoExit 980ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
  pointer-events: none;
}

.boot.is-exiting .boot-bento {
  pointer-events: none;
}

.boot.is-exiting .boot-hud,
.boot.is-exiting::before,
.boot.is-exiting::after {
  opacity: 0;
  transition: opacity 240ms ease;
}

.boot.is-exiting .bento-cell[data-bento="1"] { animation-delay: 0ms; }
.boot.is-exiting .bento-cell[data-bento="2"] { animation-delay: 36ms; }
.boot.is-exiting .bento-cell[data-bento="3"] { animation-delay: 72ms; }
.boot.is-exiting .bento-cell[data-bento="4"] { animation-delay: 108ms; }
.boot.is-exiting .bento-cell[data-bento="5"] { animation-delay: 144ms; }
.boot.is-exiting .bento-cell[data-bento="6"] { animation-delay: 180ms; }
.boot.is-exiting .bento-cell[data-bento="7"] { animation-delay: 216ms; }
.boot.is-exiting .bento-cell[data-bento="8"] { animation-delay: 252ms; }
.boot.is-exiting .bento-cell[data-bento="9"] { animation-delay: 288ms; }
.boot.is-exiting .bento-cell[data-bento="10"] { animation-delay: 324ms; }

.transition-layer {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  pointer-events: none;
  visibility: hidden;
  background: var(--red);
  transform: translateY(100%);
}

.transition-layer.is-active {
  visibility: visible;
  animation: pageWipe 780ms cubic-bezier(0.76, 0, 0.24, 1) both;
}

.transition-layer span {
  color: var(--void);
  font-family: var(--mono);
  font-size: clamp(2rem, 8vw, 7rem);
  font-weight: 900;
}

.topbar {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 120;
  width: min(1120px, calc(100% - 32px));
  min-height: 58px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 10, 12, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.24);
}

.brand-link,
.nav button,
.nav a {
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
}

.brand-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--dark-text);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.nav {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.nav button,
.nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: var(--text-dim);
}

.nav button:hover,
.nav button:focus-visible,
.nav button.is-active,
.nav a:hover,
.nav a:focus-visible,
.nav a.is-active,
.brand-link:hover,
.brand-link:focus-visible {
  border-color: rgba(247, 240, 223, 0.28);
  color: var(--text);
  background: rgba(247, 240, 223, 0.08);
  outline: none;
}

.site-shell {
  min-height: 100vh;
}

.page {
  display: none;
  width: min(1180px, calc(100% - 36px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 122px 0 56px;
  animation: pageEnter 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page.is-active {
  display: block;
}

.home-page {
  position: relative;
  display: none;
  align-content: center;
}

.home-page.is-active {
  display: grid;
}

.home-orbit {
  position: absolute;
  inset: 120px 0 0;
  pointer-events: none;
}

.home-orbit span {
  position: absolute;
  top: calc(24% + var(--i) * 10%);
  left: calc(6% + var(--i) * 17%);
  color: rgba(247, 240, 223, 0.15);
  font-family: var(--mono);
  font-size: clamp(2rem, 8vw, 7.8rem);
  font-weight: 900;
  transform: rotate(calc(-11deg + var(--i) * 6deg));
}

.home-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(28px, 6vw, 74px);
  align-items: center;
}

.home-layout > * {
  min-width: 0;
}

.portrait-card {
  position: relative;
  height: clamp(460px, 70vh, 680px);
  min-height: clamp(460px, 70vh, 680px);
  border: 1px solid rgba(247, 240, 223, 0.32);
  border-radius: var(--radius);
  overflow: hidden;
  background: #151515;
  box-shadow: var(--shadow);
}

.portrait-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(9, 10, 12, 0.03), transparent 38%, rgba(9, 10, 12, 0.32)),
    linear-gradient(135deg, rgba(200, 255, 77, 0.12), transparent 32%),
    linear-gradient(315deg, rgba(240, 74, 50, 0.12), transparent 42%);
  pointer-events: none;
}

.portrait-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 36%;
  filter: contrast(1.02) saturate(0.98);
}

.portrait-scan {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(200, 255, 77, 0.18), transparent);
  height: 34%;
  pointer-events: none;
  animation: portraitScan 3.4s ease-in-out infinite;
}

.home-copy {
  position: relative;
}

.home-copy h1,
.page-head h2 {
  margin: 6px 0 24px;
  font-family: var(--serif);
  font-size: clamp(5rem, 13vw, 11rem);
  font-weight: 900;
  line-height: 0.9;
}

.home-statement {
  max-width: 680px;
  margin-bottom: 28px;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.9vw, 2.3rem);
  line-height: 1.56;
}

.home-tags,
.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-tags span,
.skill-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid rgba(247, 240, 223, 0.22);
  border-radius: var(--radius);
  background: rgba(247, 240, 223, 0.06);
  color: var(--text-dim);
  max-width: 100%;
}

.portal-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 38px;
}

.portal-card {
  min-height: 176px;
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(247, 240, 223, 0.06);
  color: var(--text);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.portal-card:hover,
.portal-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--acid);
  background: rgba(200, 255, 77, 0.08);
  outline: none;
}

.portal-card span,
.work-card span,
.card-label {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-card strong {
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.1;
}

.portal-card em {
  color: var(--text-dim);
  font-style: normal;
}

.page-head {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.page-head h2 {
  font-size: clamp(3.8rem, 10vw, 8.5rem);
}

.page-head p:not(.eyebrow) {
  max-width: 780px;
  color: var(--text-dim);
  font-size: 1.08rem;
}

.profile-board {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr 0.9fr;
  gap: 14px;
  margin-bottom: 16px;
}

.info-card,
.experience-card,
.work-card,
.contact-card {
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--dark-text);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.info-card {
  min-height: 210px;
  padding: 20px;
}

.info-card h3 {
  margin: 12px 0 8px;
  font-size: 1.45rem;
}

.info-card p {
  margin-bottom: 0;
  color: var(--dark-dim);
}

.school-line {
  color: var(--dark-text) !important;
  font-weight: 800;
}

.intro-card {
  background:
    linear-gradient(135deg, rgba(240, 74, 50, 0.14), transparent 42%),
    var(--panel);
}

.skills-card {
  background:
    linear-gradient(135deg, rgba(98, 216, 201, 0.22), transparent 48%),
    var(--panel);
}

.skills-card .skill-cloud {
  margin-top: 22px;
}

.skills-card .skill-cloud span {
  border-color: var(--dark-line);
  background: rgba(17, 18, 22, 0.06);
  color: var(--dark-text);
}

.experience-console {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 16px;
  align-items: start;
}

.category-rail {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 10px;
}

.rail-item {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(247, 240, 223, 0.06);
  color: var(--text-dim);
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.rail-item:hover,
.rail-item:focus-visible,
.rail-item.is-active {
  transform: translateX(4px);
  border-color: var(--acid);
  background: rgba(200, 255, 77, 0.08);
  color: var(--text);
  outline: none;
}

.rail-item strong {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--mono);
}

.experience-stack {
  display: grid;
  gap: 12px;
}

.category-title {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 0 4px 6px;
}

.category-title span {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.9rem;
}

.category-title h3 {
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.experience-card {
  overflow: hidden;
  transform-origin: top center;
  transition: opacity 240ms ease, transform 240ms ease;
}

.experience-card.is-filtered {
  display: none;
}

.experience-card.is-highlighted {
  outline: 2px solid var(--acid);
  box-shadow: 0 0 0 7px rgba(200, 255, 77, 0.1), var(--shadow);
}

.experience-trigger {
  width: 100%;
  min-height: 116px;
  display: grid;
  grid-template-columns: minmax(145px, 1fr) auto minmax(145px, 1fr);
  grid-template-areas:
    "time title role"
    "result result result";
  gap: 10px 16px;
  align-items: end;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  color: var(--dark-text);
  text-align: left;
}

.experience-trigger:hover,
.experience-trigger:focus-visible {
  background: rgba(17, 18, 22, 0.045);
  outline: none;
}

.experience-trigger .time,
.experience-trigger .role {
  color: var(--dark-dim);
  font-family: var(--mono);
  font-size: 0.82rem;
  white-space: nowrap;
}

.experience-trigger .time {
  grid-area: time;
}

.experience-trigger .title {
  grid-area: title;
  justify-self: center;
  text-align: center;
  font-size: clamp(1.3rem, 2.4vw, 2.1rem);
  font-weight: 900;
  line-height: 1.15;
}

.experience-trigger .role {
  grid-area: role;
  justify-self: end;
}

.experience-trigger strong {
  grid-area: result;
  justify-self: stretch;
  max-width: none;
  padding-top: 2px;
  color: var(--dark-text);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.45;
}

.experience-detail {
  max-height: 0;
  overflow: hidden;
  padding: 0 18px;
  color: var(--dark-dim);
  border-top: 1px solid transparent;
  transition: max-height 280ms ease, padding 240ms ease, border-color 240ms ease;
}

.experience-card.is-expanded .experience-detail {
  max-height: 760px;
  padding: 0 18px 18px;
  border-color: var(--dark-line);
}

.experience-detail p {
  margin: 14px 0 0;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.detail-actions button,
.copy-button {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--dark-text);
  border-radius: var(--radius);
  background: var(--dark-text);
  color: var(--paper);
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.detail-actions button:hover,
.detail-actions button:focus-visible,
.copy-button:hover,
.copy-button:focus-visible {
  transform: translateY(-2px);
  background: var(--red);
  color: var(--paper);
  outline: none;
}

.work-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.work-filter-button {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(247, 240, 223, 0.06);
  color: var(--text-dim);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.work-filter-button:hover,
.work-filter-button:focus-visible,
.work-filter-button.is-active {
  transform: translateY(-2px);
  border-color: var(--acid);
  background: rgba(200, 255, 77, 0.08);
  color: var(--text);
  outline: none;
}

.work-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
  align-items: start;
}

.work-column {
  display: grid;
  gap: 14px;
  min-width: 0;
  align-content: start;
}

.work-column.is-empty {
  display: none;
}

.work-matrix.is-filtered {
  grid-template-columns: 1fr;
}

.work-matrix.is-filtered .work-column:not(.is-empty) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.work-card {
  min-height: 240px;
  display: grid;
  width: 100%;
  align-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--dark-text);
  text-align: left;
  transition: transform 220ms ease, opacity 220ms ease, box-shadow 220ms ease;
}

.work-card[data-open-url] {
  cursor: pointer;
}

.work-card:hover,
.work-card:focus-within,
.work-card:focus-visible {
  transform: translateY(-5px);
  outline: none;
}

.work-card.is-hidden {
  display: none;
}

.work-card.is-focused {
  outline: 2px solid var(--acid);
  box-shadow: 0 0 0 7px rgba(200, 255, 77, 0.12), var(--shadow);
}

.work-card h3 {
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  line-height: 1.12;
}

.work-card p {
  margin-bottom: 0;
  color: var(--dark-dim);
}

.gallery-work-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  align-content: stretch;
  gap: 0;
  padding: 0;
  border-color: rgba(247, 240, 223, 0.22);
  background: #07080a;
  color: var(--text);
}

.gallery-work-visual {
  display: grid;
  place-items: center;
  min-height: 430px;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 22%, rgba(240, 74, 50, 0.24), transparent 34%),
    #050507;
}

.gallery-work-visual img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
  object-position: center;
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-work-card.is-gallery-portrait-cover .gallery-work-visual img {
  max-height: none;
  object-fit: cover;
  object-position: 50% 22%;
}

.gallery-work-card:hover .gallery-work-visual img,
.gallery-work-card:focus-visible .gallery-work-visual img {
  transform: scale(1.025);
}

.gallery-work-copy {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
  background:
    linear-gradient(135deg, rgba(240, 74, 50, 0.16), transparent 44%),
    rgba(9, 10, 12, 0.96);
}

.gallery-work-card span {
  color: var(--acid);
}

.gallery-work-card h3 {
  max-width: 420px;
  color: var(--text);
}

.gallery-work-card p {
  max-width: 560px;
  color: rgba(247, 240, 223, 0.78);
}

.project-work-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  align-content: start;
  gap: 0;
  padding: 0;
  grid-template-rows: auto auto;
  background: rgba(246, 241, 226, 0.94);
}

.project-work-card::after {
  content: "OPEN";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 4px 8px;
  border: 1px solid rgba(17, 18, 22, 0.2);
  border-radius: 999px;
  background: rgba(246, 241, 226, 0.82);
  color: var(--dark-text);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.project-work-card.has-work-actions::after {
  content: "APP";
}

.project-work-card.is-balance-cover::after {
  content: "PLAY";
  border-color: rgba(247, 240, 223, 0.28);
  background: rgba(5, 5, 5, 0.72);
  color: #f7f0df;
}

.project-work-card:hover::after,
.project-work-card:focus-visible::after,
.project-work-card:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.project-work-visual {
  display: grid;
  place-items: center;
  min-height: 270px;
  margin: 0;
  padding: 12px;
  overflow: hidden;
  border-bottom: 1px solid rgba(17, 18, 22, 0.12);
  background:
    linear-gradient(90deg, rgba(17, 18, 22, 0.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(17, 18, 22, 0.06) 1px, transparent 1px) 0 0 / 28px 28px,
    #ebe4d1;
  aspect-ratio: 16 / 9;
}

.project-work-card.is-portrait-cover .project-work-visual {
  background:
    radial-gradient(circle at 50% 12%, rgba(98, 216, 201, 0.18), transparent 34%),
    linear-gradient(90deg, rgba(50, 84, 214, 0.08) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(rgba(50, 84, 214, 0.08) 1px, transparent 1px) 0 0 / 30px 30px,
    #f2f4fb;
}

.project-work-card.is-skill-cover .project-work-visual {
  min-height: 430px;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(circle at 52% 18%, rgba(196, 46, 31, 0.09), transparent 28%),
    linear-gradient(90deg, rgba(17, 18, 22, 0.06) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(rgba(17, 18, 22, 0.05) 1px, transparent 1px) 0 0 / 36px 36px,
    #f7f3ea;
}

.project-work-card.is-video-cover .project-work-visual {
  min-height: 430px;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 50% 28%, rgba(237, 28, 36, 0.2), transparent 28%),
    linear-gradient(90deg, rgba(247, 240, 223, 0.08) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgba(247, 240, 223, 0.06) 1px, transparent 1px) 0 0 / 32px 32px,
    #203d41;
}

.project-work-card.is-balance-cover .project-work-visual {
  min-height: 340px;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 52% 42%, rgba(237, 28, 36, 0.24), transparent 28%),
    linear-gradient(118deg, transparent 0 56%, rgba(237, 28, 36, 0.18) 57%, transparent 72%),
    linear-gradient(90deg, rgba(247, 240, 223, 0.08) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgba(247, 240, 223, 0.06) 1px, transparent 1px) 0 0 / 32px 32px,
    #050505;
}

.project-work-card.is-time-cover .project-work-visual {
  min-height: 330px;
  aspect-ratio: 13 / 10;
  background:
    radial-gradient(circle at 56% 8%, rgba(108, 92, 231, 0.1), transparent 32%),
    linear-gradient(90deg, rgba(108, 92, 231, 0.06) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(rgba(17, 18, 22, 0.04) 1px, transparent 1px) 0 0 / 30px 30px,
    #faf9f4;
}

.project-work-card.is-xhs-cover .project-work-visual {
  min-height: 430px;
  aspect-ratio: 3 / 5;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 36, 86, 0.12), transparent 32%),
    linear-gradient(90deg, rgba(255, 36, 86, 0.07) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(rgba(22, 19, 16, 0.05) 1px, transparent 1px) 0 0 / 30px 30px,
    #fffdfb;
}

.project-work-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.project-work-card.is-balance-cover .project-work-visual img {
  object-fit: cover;
}

.project-work-card.is-skill-cover .project-work-visual img {
  object-position: 50% 0%;
}

.project-work-card.is-review-cover .project-work-visual img {
  object-fit: cover;
  object-position: 9% 50%;
}

.project-work-card.is-xhs-cover .project-work-visual img {
  object-position: 50% 23%;
}

.project-work-card.is-time-cover .project-work-visual img {
  object-position: 50% 8%;
}

.project-work-card:hover .project-work-visual img,
.project-work-card:focus-visible .project-work-visual img,
.project-work-card:focus-within .project-work-visual img {
  transform: scale(1.025);
}

.project-work-copy {
  display: grid;
  gap: 10px;
  padding: 18px 20px 20px;
}

.project-work-card h3 {
  max-width: 520px;
}

.project-work-card p {
  max-width: 600px;
}

.project-work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.project-work-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(17, 18, 22, 0.16);
  border-radius: var(--radius);
  background: rgba(17, 18, 22, 0.06);
  color: var(--dark-text);
  font-size: 0.88rem;
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-work-actions a:hover,
.project-work-actions a:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(17, 18, 22, 0.42);
  background: rgba(17, 18, 22, 0.1);
  outline: none;
}

body.skill-detail-body {
  color-scheme: light;
  color: #161310;
  background:
    radial-gradient(circle at 18% 12%, rgba(196, 46, 31, 0.08), transparent 24rem),
    linear-gradient(90deg, rgba(22, 19, 16, 0.055) 1px, transparent 1px) 0 0 / 54px 54px,
    linear-gradient(rgba(22, 19, 16, 0.045) 1px, transparent 1px) 0 0 / 54px 54px,
    #f7f3ea;
}

body.skill-detail-body::before {
  opacity: 0.08;
  background-image:
    linear-gradient(110deg, transparent 0 47%, rgba(196, 46, 31, 0.5) 48%, transparent 49% 100%);
}

.skill-topbar {
  position: sticky;
  top: 18px;
  z-index: 40;
  width: min(100% - 36px, 1240px);
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px auto 0;
  padding: 10px 14px;
  border: 1px solid rgba(22, 19, 16, 0.16);
  border-radius: var(--radius);
  background: rgba(247, 243, 234, 0.82);
  color: #161310;
  box-shadow: 0 16px 44px rgba(22, 19, 16, 0.08);
  backdrop-filter: blur(18px);
}

.skill-topbar span {
  color: rgba(22, 19, 16, 0.62);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.skill-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(196, 46, 31, 0.3);
  border-radius: var(--radius);
  color: #c42e1f;
  background: rgba(255, 255, 255, 0.48);
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.skill-back:hover,
.skill-back:focus-visible {
  transform: translateY(-2px);
  color: #f7f3ea;
  background: #c42e1f;
  outline: none;
}

.skill-detail-shell {
  width: min(100% - 36px, 1240px);
  margin: 0 auto;
  padding: 34px 0 90px;
}

.skill-hero {
  min-height: calc(100vh - 116px);
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(420px, 0.94fr);
  gap: 34px;
  align-items: center;
  padding: 20px 0 42px;
  border-bottom: 1px solid rgba(22, 19, 16, 0.14);
}

.skill-hero-copy {
  display: grid;
  gap: 20px;
  align-content: center;
}

.skill-kicker {
  width: fit-content;
  margin: 0;
  padding: 5px 9px;
  border-left: 2px solid #c42e1f;
  color: #c42e1f;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.skill-hero h1 {
  max-width: 680px;
  font-family: var(--serif);
  font-size: clamp(4.8rem, 12vw, 11rem);
  line-height: 0.95;
}

.skill-hero-copy p:not(.skill-kicker) {
  max-width: 560px;
  margin-bottom: 0;
  color: rgba(22, 19, 16, 0.68);
  font-size: 1.08rem;
  line-height: 1.9;
}

.skill-cover-panel {
  min-height: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(22, 19, 16, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 252, 245, 0.76);
  box-shadow: 0 28px 80px rgba(22, 19, 16, 0.12);
}

.skill-cover-panel img {
  width: 100%;
  max-height: calc(100vh - 168px);
  display: block;
  object-fit: contain;
  border-radius: 5px;
}

.skill-mechanics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 38px 0 18px;
  border-bottom: 1px solid rgba(22, 19, 16, 0.14);
}

.skill-mechanics article {
  min-height: 250px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(22, 19, 16, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 252, 245, 0.58);
  box-shadow: 0 18px 54px rgba(22, 19, 16, 0.07);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.skill-mechanics article:hover {
  transform: translateY(-4px);
  border-color: rgba(196, 46, 31, 0.34);
  background: rgba(255, 252, 245, 0.82);
}

.skill-mechanics span {
  color: #c42e1f;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 900;
}

.skill-mechanics h2 {
  max-width: 220px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

.skill-mechanics p {
  margin-bottom: 0;
  color: rgba(22, 19, 16, 0.66);
}

.skill-reader {
  display: grid;
  grid-template-columns: 230px minmax(0, 820px);
  gap: 56px;
  align-items: start;
  padding-top: 54px;
}

.skill-outline {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(22, 19, 16, 0.18);
}

.skill-outline span {
  color: #c42e1f;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.skill-outline nav {
  display: grid;
  gap: 8px;
}

.skill-outline a {
  color: rgba(22, 19, 16, 0.64);
  font-size: 0.92rem;
  line-height: 1.45;
}

.skill-outline a:hover,
.skill-outline a:focus-visible {
  color: #c42e1f;
  outline: none;
}

.skill-markdown {
  display: grid;
  gap: 18px;
  padding-bottom: 60px;
  font-size: 1.02rem;
  line-height: 1.9;
}

.skill-markdown p,
.skill-markdown li {
  color: rgba(22, 19, 16, 0.72);
}

.skill-md-entry {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgba(22, 19, 16, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 252, 245, 0.68);
  color: #161310;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.skill-md-entry:hover,
.skill-md-entry:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(196, 46, 31, 0.34);
  background: rgba(255, 252, 245, 0.9);
  box-shadow: 0 18px 44px rgba(22, 19, 16, 0.08);
  outline: none;
}

.skill-md-entry span {
  color: #c42e1f;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.skill-md-entry strong {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.04;
}

.skill-md-entry p {
  margin-bottom: 0;
  color: rgba(22, 19, 16, 0.66);
}

.skill-markdown h1,
.skill-markdown h2,
.skill-markdown h3 {
  color: #161310;
  scroll-margin-top: 112px;
}

.skill-markdown h1 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
}

.skill-markdown h2 {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(22, 19, 16, 0.12);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.skill-markdown h3 {
  margin-top: 18px;
  font-size: 1.25rem;
}

.skill-markdown ul,
.skill-markdown ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.4em;
}

.skill-markdown strong {
  color: #161310;
}

.skill-markdown code {
  padding: 0.1em 0.35em;
  border: 1px solid rgba(22, 19, 16, 0.14);
  border-radius: 5px;
  background: rgba(22, 19, 16, 0.06);
  font-family: var(--mono);
  font-size: 0.92em;
}

.skill-loading {
  color: rgba(22, 19, 16, 0.62);
}

body.xhs-detail-body {
  color-scheme: light;
  color: #171311;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 36, 86, 0.12), transparent 24rem),
    radial-gradient(circle at 86% 20%, rgba(200, 255, 77, 0.13), transparent 20rem),
    linear-gradient(90deg, rgba(23, 19, 17, 0.05) 1px, transparent 1px) 0 0 / 52px 52px,
    linear-gradient(rgba(23, 19, 17, 0.042) 1px, transparent 1px) 0 0 / 52px 52px,
    #f7f2e8;
}

body.xhs-detail-body::before {
  opacity: 0.08;
  background-image:
    linear-gradient(112deg, transparent 0 47%, rgba(255, 36, 86, 0.7) 48%, transparent 49% 100%);
}

.xhs-topbar {
  position: sticky;
  top: 18px;
  z-index: 40;
  width: min(100% - 36px, 1240px);
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px auto 0;
  padding: 10px 14px;
  border: 1px solid rgba(23, 19, 17, 0.16);
  border-radius: var(--radius);
  background: rgba(247, 242, 232, 0.84);
  box-shadow: 0 16px 44px rgba(23, 19, 17, 0.08);
  backdrop-filter: blur(18px);
}

.xhs-back,
.xhs-profile-link,
.xhs-primary-link,
.xhs-secondary-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 36, 86, 0.32);
  border-radius: var(--radius);
  color: #d7194a;
  background: rgba(255, 255, 255, 0.48);
  font-weight: 900;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.xhs-profile-link,
.xhs-primary-link {
  color: #fffdfb;
  background: #d7194a;
}

.xhs-back:hover,
.xhs-back:focus-visible,
.xhs-profile-link:hover,
.xhs-profile-link:focus-visible,
.xhs-primary-link:hover,
.xhs-primary-link:focus-visible,
.xhs-secondary-link:hover,
.xhs-secondary-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(23, 19, 17, 0.24);
  color: #fffdfb;
  background: #171311;
  outline: none;
}

.xhs-detail-shell {
  width: min(100% - 36px, 1240px);
  margin: 0 auto;
  padding: 34px 0 92px;
}

.xhs-hero {
  min-height: calc(100vh - 116px);
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 0.66fr);
  gap: clamp(24px, 5vw, 66px);
  align-items: center;
  padding-bottom: 46px;
  border-bottom: 1px solid rgba(23, 19, 17, 0.14);
}

.xhs-hero-copy {
  display: grid;
  gap: 22px;
}

.xhs-hero h1 {
  max-width: 790px;
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: clamp(4.1rem, 9.5vw, 8.6rem);
  line-height: 0.94;
}

.xhs-intro {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(23, 19, 17, 0.68);
  font-size: clamp(1.14rem, 2vw, 1.45rem);
}

.xhs-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.xhs-metrics article {
  min-height: 132px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(23, 19, 17, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 253, 251, 0.7);
}

.xhs-metrics span,
.xhs-outline span,
.xhs-strategy-card span {
  color: #d7194a;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.xhs-metrics strong {
  font-size: clamp(1.8rem, 3.3vw, 2.8rem);
  line-height: 1;
}

.xhs-metrics em {
  color: rgba(23, 19, 17, 0.56);
  font-style: normal;
  font-weight: 800;
}

.xhs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.xhs-traffic-panel {
  min-height: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(23, 19, 17, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 253, 251, 0.76);
  box-shadow: 0 28px 80px rgba(23, 19, 17, 0.12);
}

.xhs-traffic-panel img {
  width: 100%;
  max-height: calc(100vh - 168px);
  display: block;
  object-fit: contain;
  border-radius: 5px;
}

.xhs-strategy {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-top: 54px;
}

.xhs-outline {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(23, 19, 17, 0.18);
}

.xhs-outline nav {
  display: grid;
  gap: 8px;
}

.xhs-outline a {
  color: rgba(23, 19, 17, 0.64);
  font-size: 0.92rem;
  line-height: 1.45;
}

.xhs-outline a:hover,
.xhs-outline a:focus-visible {
  color: #d7194a;
  outline: none;
}

.xhs-strategy-stack {
  display: grid;
  gap: 14px;
}

.xhs-strategy-card {
  display: grid;
  gap: 14px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(23, 19, 17, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 253, 251, 0.68);
  box-shadow: 0 18px 54px rgba(23, 19, 17, 0.06);
}

.xhs-strategy-card h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
}

.xhs-strategy-card h3 {
  margin: 10px 0 0;
  color: #171311;
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  line-height: 1.45;
}

.xhs-strategy-card p,
.xhs-strategy-card li {
  color: rgba(23, 19, 17, 0.68);
}

.xhs-strategy-card strong {
  color: #171311;
}

.xhs-strategy-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 1.25em;
}

.xhs-punchline {
  color: #171311 !important;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.42;
}

body.video-detail-body {
  color-scheme: dark;
  background:
    radial-gradient(circle at 70% 26%, rgba(237, 28, 36, 0.18), transparent 24rem),
    radial-gradient(circle at 18% 74%, rgba(98, 216, 201, 0.12), transparent 22rem),
    linear-gradient(90deg, rgba(247, 240, 223, 0.045) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(247, 240, 223, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    #061011;
}

body.video-detail-body::before {
  opacity: 0.1;
  background-image:
    linear-gradient(116deg, transparent 0 45%, rgba(237, 28, 36, 0.5) 46%, transparent 47% 100%);
}

.video-topbar {
  position: sticky;
  top: 18px;
  z-index: 40;
  width: min(100% - 36px, 1240px);
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px auto 0;
  padding: 10px 14px;
  border: 1px solid rgba(247, 240, 223, 0.18);
  border-radius: var(--radius);
  background: rgba(6, 16, 17, 0.78);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.video-topbar span {
  color: rgba(247, 240, 223, 0.62);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.video-back {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(237, 28, 36, 0.46);
  border-radius: var(--radius);
  background: rgba(247, 240, 223, 0.06);
  color: #f7f0df;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.video-back:hover,
.video-back:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(247, 240, 223, 0.44);
  background: #ed1c24;
  outline: none;
}

.video-detail-shell {
  width: min(100% - 36px, 1240px);
  margin: 0 auto;
  padding: 34px 0 86px;
}

.video-hero {
  min-height: calc(100vh - 116px);
  display: grid;
  grid-template-columns: minmax(260px, 0.44fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
}

.video-title-block {
  min-height: min(620px, calc(100vh - 172px));
  display: grid;
  align-content: space-between;
  gap: 28px;
  padding: 24px 0;
}

.video-title-block h1 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 11vw, 9rem);
  line-height: 0.92;
}

.video-title-block p:not(.eyebrow) {
  max-width: 360px;
  margin-bottom: 0;
  color: rgba(247, 240, 223, 0.68);
  font-size: 1.12rem;
}

.video-player-panel {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(247, 240, 223, 0.2);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 18%, rgba(237, 28, 36, 0.16), transparent 32%),
    #030607;
  box-shadow: var(--shadow);
}

.video-player-panel video {
  width: 100%;
  max-height: calc(100vh - 160px);
  display: block;
  object-fit: contain;
  border-radius: 5px;
  background: #030607;
}

.ai-gallery {
  display: flex;
  flex-direction: column;
  margin-top: 22px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 110px;
}

.ai-gallery.is-pulsing {
  animation: galleryPulse 920ms ease both;
}

.gallery-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.7fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 14px;
}

.gallery-head h2,
.gallery-head h3 {
  margin-top: 6px;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.95;
}

.gallery-head p:not(.eyebrow) {
  margin-bottom: 8px;
  color: var(--text-dim);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 190px;
  gap: 12px;
}

.gallery-item {
  position: relative;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(247, 240, 223, 0.18);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(247, 240, 223, 0.06);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  border-color: rgba(200, 255, 77, 0.62);
  outline: none;
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), filter 220ms ease;
}

.cover-item img {
  object-fit: contain;
  padding: 12px;
  background: #050507;
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: contrast(1.04) saturate(1.04);
}

.gallery-feature {
  grid-column: span 2;
  grid-row: span 3;
}

.gallery-wide {
  grid-column: span 2;
}

.gallery-tall {
  grid-row: span 2;
}

.portrait-gallery-head {
  order: -3;
  margin-top: 0;
  scroll-margin-top: 110px;
}

.portrait-lab-shell {
  order: -2;
  display: grid;
  grid-template-columns: minmax(340px, 0.86fr) minmax(0, 1.14fr);
  gap: 16px;
  margin-bottom: 14px;
}

.portrait-stage-card,
.portrait-inspector {
  border: 1px solid rgba(247, 240, 223, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(240, 74, 50, 0.1), transparent 42%),
    rgba(247, 240, 223, 0.055);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.24);
}

.portrait-stage-card {
  min-height: 620px;
  display: grid;
  grid-template-rows: 1fr auto;
  margin: 0;
  padding: 14px;
  overflow: hidden;
}

.portrait-stage-card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: 50% 34%;
  border-radius: calc(var(--radius) - 2px);
  background: #050507;
  transition: opacity 220ms ease, transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.portrait-stage-card.is-switching img {
  opacity: 0.42;
  transform: scale(1.015);
}

.portrait-stage-card figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
}

.portrait-stage-card figcaption span,
.portrait-meta-grid span {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.portrait-stage-card figcaption button,
.portrait-filter button {
  min-height: 40px;
  border: 1px solid rgba(247, 240, 223, 0.24);
  border-radius: var(--radius);
  background: rgba(247, 240, 223, 0.08);
  color: var(--text);
  font-weight: 800;
}

.portrait-stage-card figcaption button {
  padding: 0 13px;
}

.portrait-stage-card figcaption button:hover,
.portrait-stage-card figcaption button:focus-visible,
.portrait-filter button:hover,
.portrait-filter button:focus-visible,
.portrait-filter button.is-active {
  border-color: var(--acid);
  background: rgba(200, 255, 77, 0.08);
  outline: none;
}

.portrait-inspector {
  min-height: 620px;
  display: grid;
  align-content: space-between;
  gap: 24px;
  padding: clamp(20px, 3.8vw, 42px);
}

.portrait-inspector h3 {
  margin-top: 6px;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.92;
}

.portrait-inspector p:not(.eyebrow) {
  max-width: 620px;
  color: var(--text-dim);
  font-size: 1.08rem;
}

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

.portrait-meta-grid div {
  min-height: 120px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(247, 240, 223, 0.16);
  border-radius: var(--radius);
  background: rgba(9, 10, 12, 0.34);
}

.portrait-meta-grid strong {
  font-size: 1.05rem;
  line-height: 1.45;
}

.portrait-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portrait-filter button {
  padding: 0 12px;
  color: var(--text-dim);
}

.portrait-filter button.is-active {
  color: var(--text);
}

.gallery-portrait {
  grid-row: span 2;
}

.portrait-gallery-grid {
  order: -1;
  margin-bottom: 54px;
}

.gallery-portrait.is-active {
  border-color: var(--acid);
  box-shadow: 0 0 0 1px rgba(200, 255, 77, 0.28);
}

.gallery-portrait.is-hidden {
  display: none;
}

.gallery-portrait img {
  object-position: 50% 34%;
}

.gallery-document.lightbox-open {
  overflow: hidden;
}

.standalone-gallery {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 122px 0 70px;
}

.gallery-hero {
  min-height: calc(100svh - 122px);
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(340px, 0.68fr);
  gap: clamp(24px, 6vw, 72px);
  align-items: center;
  padding-bottom: 36px;
}

.gallery-hero-copy h1 {
  margin: 8px 0 26px;
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.92;
}

.gallery-hero-copy p:not(.eyebrow) {
  max-width: 690px;
  color: var(--text-dim);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
}

.gallery-back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(247, 240, 223, 0.06);
  color: var(--text);
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.gallery-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.gallery-hero-actions .gallery-back {
  margin-top: 0;
}

.gallery-jump {
  border-color: rgba(200, 255, 77, 0.38);
  color: var(--acid);
}

.gallery-back:hover,
.gallery-back:focus-visible {
  transform: translateY(-2px);
  border-color: var(--acid);
  background: rgba(200, 255, 77, 0.08);
  outline: none;
}

.gallery-hero-cover {
  position: relative;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(247, 240, 223, 0.24);
  border-radius: var(--radius);
  overflow: hidden;
  background: #050507;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.gallery-hero-cover img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(720px, 70vh);
  object-fit: contain;
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-hero-cover span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(247, 240, 223, 0.24);
  border-radius: var(--radius);
  background: rgba(9, 10, 12, 0.72);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.gallery-hero-cover:hover img,
.gallery-hero-cover:focus-visible img {
  transform: scale(1.035);
}

.gallery-hero-cover:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
}

.portrait-hero-cover img {
  max-height: min(760px, 72vh);
}

.standalone-gallery-section {
  margin-top: 0;
  padding-top: 44px;
}

.gallery-page-grid {
  grid-auto-rows: 220px;
}

.lightbox {
  width: min(1180px, calc(100vw - 32px));
  height: min(880px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid rgba(247, 240, 223, 0.22);
  border-radius: var(--radius);
  background: rgba(9, 10, 12, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

.lightbox-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 22px;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 148px);
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close,
.lightbox-nav,
.lightbox-meta a {
  min-height: 42px;
  border: 1px solid rgba(247, 240, 223, 0.24);
  border-radius: var(--radius);
  background: rgba(247, 240, 223, 0.08);
  color: var(--text);
  font-weight: 800;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 0 13px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  padding: 0 12px;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-close:hover,
.lightbox-close:focus-visible,
.lightbox-nav:hover,
.lightbox-nav:focus-visible,
.lightbox-meta a:hover,
.lightbox-meta a:focus-visible {
  border-color: var(--acid);
  background: rgba(200, 255, 77, 0.08);
  outline: none;
}

.lightbox-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
}

.lightbox-meta a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  text-decoration: none;
}

.contact-panel {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.contact-options {
  display: grid;
  gap: 10px;
  align-content: start;
}

.contact-option {
  min-height: 124px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(247, 240, 223, 0.06);
  color: var(--text-dim);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.contact-option span {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-option strong {
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1;
}

.contact-option small {
  font-size: 0.92rem;
}

.contact-option:hover,
.contact-option:focus-visible,
.contact-option.is-active {
  transform: translateY(-2px);
  border-color: var(--acid);
  background: rgba(200, 255, 77, 0.08);
  color: var(--text);
  outline: none;
}

.contact-card {
  min-height: 360px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
  padding: clamp(24px, 5vw, 56px);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -90px;
  top: 50%;
  border: 1px solid rgba(240, 74, 50, 0.46);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow:
    0 0 0 36px rgba(240, 74, 50, 0.06),
    0 0 0 74px rgba(50, 84, 214, 0.05);
}

.contact-card h3 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.contact-card p {
  max-width: 620px;
  color: var(--dark-dim);
  font-size: 1.08rem;
}

.contact-card-wechat p,
.contact-card.is-wechat p {
  color: var(--dark-text);
  font-family: var(--mono);
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  font-weight: 900;
}

.contact-card-resume::before,
.contact-card.is-resume::before {
  border-radius: var(--radius);
  transform: translateY(-50%) rotate(-8deg);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 180;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid rgba(200, 255, 77, 0.4);
  border-radius: var(--radius);
  background: rgba(9, 10, 12, 0.88);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@keyframes bentoReveal {
  to {
    opacity: 1;
    filter: blur(0);
    clip-path: inset(0 round var(--radius));
    transform:
      translate3d(
        var(--cell-pointer-x),
        calc(var(--cell-pointer-y) + var(--cell-hover-y)),
        var(--cell-z)
      )
      rotateX(var(--cell-tilt-x))
      rotateY(var(--cell-tilt-y))
      scale(var(--cell-scale));
  }
}

@keyframes bentoExit {
  0% {
    opacity: 1;
    filter: blur(0);
    clip-path: inset(0 round var(--radius));
    transform:
      translate3d(
        var(--cell-pointer-x),
        calc(var(--cell-pointer-y) + var(--cell-hover-y)),
        var(--cell-z)
      )
      rotateX(var(--cell-tilt-x))
      rotateY(var(--cell-tilt-y))
      scale(var(--cell-scale));
  }
  24% {
    opacity: 1;
    filter: blur(1px) saturate(1.16);
    transform: translate3d(0, 0, 96px) rotate(0deg) scale(1.08);
  }
  to {
    opacity: 0;
    filter: blur(12px) saturate(0.7);
    clip-path: inset(20% round var(--radius));
    transform: translate3d(var(--exit-x), var(--exit-y), 0) scale(0.86) rotate(var(--exit-r));
  }
}

@keyframes bootStatic {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(2px);
  }
}

@keyframes bootSweep {
  0% {
    opacity: 0;
    transform: translateY(-160%) rotate(-3deg);
  }
  18%,
  76% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(520%) rotate(-3deg);
  }
}

@keyframes bootProgress {
  to {
    transform: scaleX(1);
  }
}

@keyframes bentoCellScan {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 56px 0, 0 56px;
  }
}

@keyframes enterPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(200, 255, 77, 0);
  }
  50% {
    box-shadow: 0 0 28px rgba(200, 255, 77, 0.22);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageWipe {
  0% {
    transform: translateY(100%);
  }
  46%,
  58% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-100%);
  }
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes portraitScan {
  0%,
  100% {
    transform: translateY(-60%);
    opacity: 0;
  }
  20%,
  80% {
    opacity: 1;
  }
  50% {
    transform: translateY(240%);
  }
}

@keyframes galleryPulse {
  0% {
    filter: none;
  }
  35% {
    filter: drop-shadow(0 0 28px rgba(200, 255, 77, 0.22));
  }
  100% {
    filter: none;
  }
}

@media (max-width: 960px) {
  .topbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    transform: none;
    border-width: 0 0 1px;
    border-radius: 0;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .nav {
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav button,
  .nav a {
    white-space: nowrap;
  }

  .page,
  .standalone-gallery {
    width: min(100% - 24px, 720px);
    padding-top: 28px;
  }

  .home-layout,
  .profile-board,
  .experience-console,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .contact-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-option {
    min-height: 92px;
  }

  .home-layout,
  .home-copy,
  .home-tags {
    width: 100%;
    max-width: min(100%, 360px);
    overflow: hidden;
  }

  .home-statement {
    max-width: min(100%, 360px);
    overflow-wrap: anywhere;
  }

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

  .work-matrix {
    grid-template-columns: 1fr;
  }

  .gallery-work-card,
  .project-work-card {
    width: 100%;
  }

  .project-work-visual {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .project-work-card.is-skill-cover .project-work-visual,
  .project-work-card.is-xhs-cover .project-work-visual,
  .project-work-card.is-time-cover .project-work-visual,
  .project-work-card.is-video-cover .project-work-visual {
    min-height: 0;
    aspect-ratio: 3 / 4;
  }

  .project-work-card.is-balance-cover .project-work-visual {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .gallery-work-visual {
    min-height: 0;
  }

  .skill-detail-shell,
  .skill-topbar,
  .xhs-detail-shell,
  .xhs-topbar,
  .video-detail-shell,
  .video-topbar {
    width: min(100% - 24px, 720px);
  }

  .skill-hero,
  .skill-reader,
  .skill-mechanics,
  .xhs-hero,
  .xhs-strategy,
  .video-hero {
    grid-template-columns: 1fr;
  }

  .skill-hero,
  .xhs-hero,
  .video-hero {
    min-height: auto;
    padding-top: 20px;
  }

  .xhs-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .xhs-traffic-panel img {
    max-height: none;
  }

  .xhs-outline {
    position: static;
  }

  .video-title-block {
    min-height: auto;
    padding: 10px 0 0;
  }

  .video-player-panel video {
    max-height: none;
  }

  .skill-cover-panel img {
    max-height: none;
  }

  .skill-outline {
    position: static;
  }

  .skill-mechanics article {
    min-height: 190px;
  }

  .gallery-head {
    grid-template-columns: 1fr;
  }

  .portrait-lab-shell {
    grid-template-columns: 1fr;
  }

  .portrait-stage-card,
  .portrait-inspector {
    min-height: auto;
  }

  .portrait-stage-card {
    height: min(760px, 118vw);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 168px;
  }

  .gallery-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 34px 0 28px;
  }

  .gallery-hero-cover {
    height: auto;
    min-height: 0;
  }

  .lightbox {
    width: calc(100vw - 18px);
    height: calc(100vh - 18px);
  }

  .lightbox-shell {
    padding: 14px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 74px;
    transform: none;
  }

  .category-rail {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rail-item {
    min-height: 64px;
  }

  .experience-trigger {
    grid-template-columns: 1fr;
    grid-template-areas:
      "time"
      "title"
      "role"
      "result";
    align-items: start;
  }

  .experience-trigger .role {
    justify-self: start;
  }

  .experience-trigger strong {
    justify-self: start;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .boot {
    perspective: 760px;
    touch-action: none;
  }

  .boot-hud {
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    font-size: 0.58rem;
  }

  .boot-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(172px, 0.9fr);
    grid-auto-rows: clamp(82px, 12.5dvh, 118px);
    align-content: start;
    gap: 6px;
    height: 100svh;
    min-height: 100svh;
    padding: calc(48px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
    overflow: hidden;
    background:
      radial-gradient(circle at 50% 4%, rgba(200, 255, 77, 0.17), transparent 16rem),
      radial-gradient(circle at 20% 72%, rgba(98, 216, 201, 0.13), transparent 20rem),
      #060709;
  }

  .boot-bento .bento-cell {
    grid-row: auto !important;
    grid-column: auto !important;
    min-height: 0;
  }

  .boot-bento .bento-cell-identity {
    order: -1;
    grid-column: 1 / -1 !important;
    min-height: 172px;
    padding: 18px;
    border-color: rgba(200, 255, 77, 0.44);
    background:
      linear-gradient(135deg, rgba(200, 255, 77, 0.12), transparent 48%),
      linear-gradient(90deg, rgba(247, 240, 223, 0.09) 1px, transparent 1px) 0 0 / 24px 24px,
      linear-gradient(rgba(247, 240, 223, 0.07) 1px, transparent 1px) 0 0 / 24px 24px,
      rgba(9, 10, 12, 0.96);
  }

  .boot-bento .bento-cell-identity {
    animation-delay: 0ms !important;
  }

  .bento-label {
    padding: 26px 8px 8px;
  }

  .bento-label strong {
    font-size: clamp(0.72rem, 3.3vw, 0.86rem);
  }

  .bento-label span {
    display: none;
  }

  .bento-kicker {
    font-size: 0.68rem;
  }

  .bento-name {
    font-size: clamp(2.9rem, 15vw, 4.8rem);
  }

  .bento-enter {
    min-height: 46px;
    width: min(100%, 220px);
    margin-top: 12px;
    font-size: 0.9rem;
    background: rgba(200, 255, 77, 0.08);
    box-shadow: 0 0 0 1px rgba(200, 255, 77, 0.16), 0 0 34px rgba(200, 255, 77, 0.14);
  }

  .boot.is-exiting .bento-cell {
    animation-duration: 760ms;
  }

  .site-shell {
    touch-action: pan-y;
  }
}

@media (max-width: 620px) {
  body {
    background-size: auto, auto, 36px 36px, 36px 36px, auto;
  }

  body::before {
    background-size: 132px 132px;
  }

  .topbar {
    padding: 7px 10px 9px;
    gap: 8px;
    background: rgba(9, 10, 12, 0.9);
  }

  .brand-link {
    min-height: 36px;
    padding: 0;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    font-size: 0.76rem;
  }

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

  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding-bottom: 0;
  }

  .nav button,
  .nav a {
    min-height: 40px;
    justify-content: center;
    padding: 0 5px;
    font-size: clamp(0.78rem, 3.5vw, 0.92rem);
    white-space: nowrap;
  }

  .page,
  .standalone-gallery {
    width: 100%;
    padding: 22px 14px 44px;
  }

  .works-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .home-copy h1,
  .page-head h2,
  .gallery-hero-copy h1 {
    font-size: clamp(3.3rem, 17vw, 4.9rem);
    line-height: 0.92;
  }

  .works-page .page-head {
    gap: 8px;
    margin-bottom: 20px;
  }

  .works-page .page-head h2 {
    margin-bottom: 12px;
    font-size: clamp(3.8rem, 19vw, 5.1rem);
  }

  .page-head p:not(.eyebrow) {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .home-statement {
    font-size: 1.22rem;
  }

  .portal-card,
  .info-card,
  .work-card {
    min-height: auto;
  }

  .work-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .work-filter-button {
    min-height: 42px;
    padding: 0 8px;
    justify-content: center;
    font-size: 0.95rem;
  }

  .work-matrix,
  .work-column,
  .work-matrix.is-filtered .work-column:not(.is-empty) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-width: 0;
  }

  .work-card {
    overflow: hidden;
    border-radius: 8px;
  }

  .work-card h3 {
    font-size: clamp(1.32rem, 7vw, 1.72rem);
  }

  .work-card p {
    font-size: 0.94rem;
    line-height: 1.65;
  }

  .project-work-copy,
  .gallery-work-copy {
    gap: 8px;
    padding: 14px;
  }

  .project-work-card::after {
    top: 10px;
    right: 10px;
    opacity: 1;
    transform: none;
    font-size: 0.62rem;
  }

  .gallery-work-visual {
    min-height: 0;
    height: auto;
    padding: 8px;
    aspect-ratio: 16 / 10;
  }

  .gallery-work-visual img {
    max-height: none;
    object-fit: cover;
    border-radius: 6px;
  }

  .project-work-visual {
    padding: 8px;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .project-work-card.is-portrait-cover .project-work-visual,
  .project-work-card.is-xhs-cover .project-work-visual,
  .project-work-card.is-skill-cover .project-work-visual,
  .project-work-card.is-time-cover .project-work-visual,
  .project-work-card.is-video-cover .project-work-visual {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .project-work-card.is-balance-cover .project-work-visual {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .project-work-visual img,
  .project-work-card.is-balance-cover .project-work-visual img {
    object-fit: cover;
  }

  .project-work-card.is-xhs-cover .project-work-visual img {
    object-position: 50% 9%;
  }

  .project-work-card.is-portrait-cover .project-work-visual img {
    object-position: 50% 15%;
  }

  .project-work-card.is-skill-cover .project-work-visual img {
    object-position: 50% 0%;
  }

  .project-work-card.is-review-cover .project-work-visual img {
    object-position: 9% 50%;
  }

  .project-work-card.is-video-cover .project-work-visual img {
    object-position: 50% 34%;
  }

  .project-work-card.is-time-cover .project-work-visual img {
    object-fit: contain;
    object-position: 50% 8%;
  }

  .gallery-work-card.is-gallery-portrait-cover .gallery-work-visual img {
    object-fit: cover;
    object-position: 50% 24%;
  }

  .skill-topbar,
  .xhs-topbar,
  .video-topbar {
    top: 10px;
  }

  .skill-topbar span,
  .video-topbar span {
    display: none;
  }

  .skill-hero h1,
  .xhs-hero h1,
  .video-title-block h1 {
    font-size: clamp(4.2rem, 24vw, 6.5rem);
  }

  .xhs-metrics {
    grid-template-columns: 1fr;
  }

  .xhs-strategy {
    gap: 28px;
    padding-top: 34px;
  }

  .skill-reader {
    gap: 28px;
    padding-top: 34px;
  }

  .skill-markdown {
    font-size: 0.98rem;
  }

  .portrait-card {
    height: 430px;
    min-height: 430px;
  }

  .portrait-image {
    object-position: 50% 32%;
  }

  .category-rail {
    grid-template-columns: 1fr;
  }

  .gallery-hero-cover {
    height: auto;
    min-height: 0;
  }

  .gallery-page-grid {
    grid-auto-rows: 150px;
  }

  .portrait-meta-grid {
    grid-template-columns: 1fr;
  }

  .portrait-inspector h3 {
    font-size: clamp(2.7rem, 17vw, 4.8rem);
  }

  .gallery-feature,
  .gallery-wide,
  .gallery-tall,
  .gallery-portrait {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-portrait {
    grid-row: span 2;
  }

  .lightbox-meta {
    display: grid;
  }
}

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