:root {
  --ink: #171a1f;
  --ink-soft: #3d434d;
  --muted: #6e7580;
  --accent: #087d73;
  --accent-dark: #05655d;
  --navy: #102a43;
  --surface: #ffffff;
  --surface-soft: #f5f5f7;
  --surface-tint: #edf5f4;
  --line: #d9dde3;
  --line-soft: #e8eaed;
  --page: 1180px;
  --section-space: clamp(76px, 9vw, 124px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 62px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

a,
button {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

:focus-visible {
  outline: 3px solid rgba(8, 125, 115, 0.28);
  outline-offset: 3px;
}

.page-shell {
  width: min(var(--page), calc(100% - 48px));
  margin-inline: auto;
}


body.entry-gate-active {
  overflow: hidden;
}

.entry-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(28px, 6vw, 72px) 24px;
  color: #162033;
  background: #f7fbff;
  opacity: 1;
  transition: opacity 520ms var(--ease), transform 520ms var(--ease), visibility 520ms var(--ease);
}

.entry-gate::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(8, 125, 115, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 113, 227, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 82%);
  pointer-events: none;
}

.entry-gate::after {
  position: absolute;
  inset: auto 0 0;
  height: 28vh;
  content: "";
  background: #e9f4ff;
  clip-path: polygon(0 34%, 19% 20%, 42% 36%, 67% 17%, 100% 31%, 100% 100%, 0 100%);
  pointer-events: none;
}

.entry-gate.is-leaving {
  visibility: hidden;
  opacity: 0;
  transform: translateY(-14px) scale(1.012);
  pointer-events: none;
}

.entry-gate[hidden] {
  display: none;
}

.entry-gate-stage {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(760px, 100%);
  justify-items: center;
  gap: clamp(18px, 4vw, 30px);
  text-align: center;
}

.entry-visual {
  position: relative;
  width: min(420px, 74vw);
  aspect-ratio: 1;
}

.entry-visual::before {
  position: absolute;
  right: 12%;
  bottom: 8%;
  left: 12%;
  height: 13%;
  content: "";
  background: rgba(22, 32, 51, 0.1);
  border-radius: 50%;
  filter: blur(8px);
  transform: scaleX(0.92);
  animation: entry-shadow 2.8s ease-in-out infinite alternate;
}

.entry-avatar {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 24px 24px rgba(22, 32, 51, 0.16));
  animation: entry-float 2.8s ease-in-out infinite alternate;
  will-change: transform;
}

.entry-avatar .chibi-poses {
  width: 100%;
  height: 100%;
}

.entry-avatar .chibi-pose {
  transform: scale(0.94) translateY(8px);
  transition: opacity 260ms ease, transform 420ms var(--ease);
}

.entry-avatar[data-action="idle"] .chibi-pose-idle,
.entry-avatar[data-action="singing"] .chibi-pose-singing,
.entry-avatar[data-action="thinking"] .chibi-pose-thinking,
.entry-avatar[data-action="reading"] .chibi-pose-reading,
.entry-avatar[data-action="sighing"] .chibi-pose-sigh {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.entry-avatar[data-action="singing"] {
  animation-name: entry-sing;
  animation-duration: 920ms;
}

.entry-avatar[data-action="thinking"] {
  animation-name: entry-think;
  animation-duration: 1.4s;
}

.entry-avatar[data-action="reading"] {
  animation-name: entry-read;
  animation-duration: 1.8s;
}

.entry-avatar[data-action="sighing"] {
  animation-name: entry-sigh;
  animation-duration: 2s;
}

.entry-copy {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.entry-invite {
  margin: 0;
  color: #111827;
  font-size: clamp(24px, 5vw, 44px);
  font-weight: 820;
  line-height: 1.16;
}

.entry-enter-button {
  min-width: 138px;
  min-height: 48px;
  padding: 12px 32px;
  color: #fff;
  background: #0071e3;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(0, 113, 227, 0.28);
  font-size: 17px;
  font-weight: 760;
  transition: transform 180ms var(--ease), background-color 180ms ease, box-shadow 180ms ease;
}

.entry-enter-button:hover,
.entry-enter-button:focus-visible {
  background: #0063c7;
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0, 113, 227, 0.32);
}

.entry-enter-button:active {
  transform: translateY(0);
}

@keyframes entry-float {
  from { transform: translateY(4px) rotate(-0.6deg); }
  to { transform: translateY(-10px) rotate(0.8deg); }
}

@keyframes entry-sing {
  from { transform: translateY(2px) rotate(-2.4deg); }
  to { transform: translateY(-9px) rotate(2.8deg); }
}

@keyframes entry-think {
  from { transform: translateY(2px) rotate(-1deg); }
  to { transform: translateY(-11px) rotate(1.2deg); }
}

@keyframes entry-read {
  from { transform: translateY(3px) rotate(-0.6deg); }
  to { transform: translateY(-7px) rotate(0.6deg); }
}

@keyframes entry-sigh {
  from { transform: translateY(0) rotate(-0.4deg); }
  to { transform: translateY(9px) rotate(0.4deg); }
}

@keyframes entry-shadow {
  from { opacity: 0.62; transform: scaleX(0.84); }
  to { opacity: 0.38; transform: scaleX(1); }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(150%) blur(18px);
  transition: border-color 220ms ease, background-color 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line-soft);
}

.header-inner {
  display: grid;
  width: min(var(--page), calc(100% - 48px));
  min-height: 52px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-copy {
  display: grid;
  line-height: 1.08;
}

.brand-copy strong {
  font-size: 12px;
  letter-spacing: -0.01em;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.2vw, 32px);
}

.nav a {
  position: relative;
  padding: 17px 0 15px;
  color: #40454d;
  font-size: 12px;
  font-weight: 550;
  text-decoration: none;
  transition: color 160ms ease;
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 220ms var(--ease);
}

.nav a:hover,
.nav a.is-active {
  color: var(--ink);
}

.nav a:hover::after,
.nav a.is-active::after {
  transform: scaleX(1);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.lang-btn {
  min-width: 31px;
  min-height: 28px;
  padding: 3px 7px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.lang-btn.is-active {
  color: #fff;
  background: var(--ink);
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  padding: 8px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 999px;
}

.nav-toggle:hover {
  background: var(--surface-soft);
}

.nav-toggle svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.scroll-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.72fr);
  gap: clamp(54px, 8vw, 112px);
  align-items: center;
  min-height: min(820px, calc(100vh - 52px));
  padding-block: clamp(68px, 9vw, 116px);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(50px, 6.2vw, 80px);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h1 em {
  display: block;
  margin-top: 12px;
  color: #777d86;
  font-size: clamp(21px, 2.3vw, 30px);
  font-style: normal;
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1.2;
}

.lead {
  max-width: 660px;
  margin: 25px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.75vw, 21px);
  letter-spacing: -0.012em;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms var(--ease);
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--accent);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  color: var(--accent);
  background: transparent;
  border-color: var(--accent);
}

.button-secondary:hover {
  color: #fff;
  background: var(--accent);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 680px;
  margin: 42px 0 0;
}

.hero-metrics div {
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.hero-metrics div:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-metrics dt {
  color: var(--ink);
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.015em;
}

.hero-metrics dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.portrait-card {
  --image-scale: 1;
  position: relative;
  min-height: 590px;
  margin: 0;
  overflow: hidden;
  background: #17263d;
  border-radius: 26px;
  transform: scale(var(--image-scale));
  transform-origin: center center;
  will-change: transform;
}

.portrait-card::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(23, 26, 31, 0.08);
  border-radius: inherit;
}

.portrait-card img {
  width: 100%;
  height: 590px;
  object-fit: cover;
  object-position: center 46%;
  transition: transform 900ms var(--ease);
}

.portrait-card:hover img {
  transform: scale(1.018);
}

.sketch-companion {
  --cloth-x: 0px;
  --cloth-y: 0px;
  --cloth-skew: 0deg;
  --cloth-stretch: 1;
  --figure-tilt: 0deg;
  position: fixed;
  top: 110px;
  right: 12px;
  z-index: 40;
  width: clamp(250px, 20vw, 310px);
  color: #16181d;
  cursor: grab;
  filter: drop-shadow(0 12px 12px rgba(23, 26, 31, 0.1));
  opacity: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 240ms ease, filter 240ms ease;
  will-change: left, top;
}

.sketch-companion.is-ready {
  opacity: 0.96;
}

.sketch-companion:hover,
.sketch-companion:focus-visible,
.sketch-companion.is-dragging {
  filter: drop-shadow(0 16px 16px rgba(23, 26, 31, 0.16));
  opacity: 1;
}

.sketch-companion:focus-visible {
  outline: 2px solid rgba(0, 113, 227, 0.5);
  outline-offset: 4px;
  border-radius: 22px;
}

.sketch-companion.is-dragging {
  cursor: grabbing;
}

.sketch-companion svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.sketch-companion .legacy-sketch-svg {
  display: none !important;
}

.chibi-poses {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  pointer-events: none;
  transform: translate(var(--cloth-x), var(--cloth-y)) rotate(var(--figure-tilt)) skewY(var(--cloth-skew)) scaleX(var(--cloth-stretch));
  transform-origin: left center;
  transition: transform 340ms cubic-bezier(0.2, 0.8, 0.2, 1.2);
  will-change: transform;
}

.sketch-companion.is-pulling-left .chibi-poses {
  transform-origin: right center;
}

.sketch-companion.is-dragging .chibi-poses {
  transition: none;
}

.chibi-pose {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.94) translateY(5px);
  transition: opacity 220ms ease, transform 320ms var(--ease);
  user-select: none;
  -webkit-user-drag: none;
}

.sketch-companion[data-action="idle"] .chibi-pose-idle,
.sketch-companion[data-action="waving"] .chibi-pose-idle,
.sketch-companion[data-action="singing"] .chibi-pose-singing,
.sketch-companion[data-action="thinking"] .chibi-pose-thinking,
.sketch-companion[data-action="reading"] .chibi-pose-reading,
.sketch-companion[data-action="sighing"] .chibi-pose-sigh {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.sketch-companion[data-action="idle"] .chibi-pose-idle {
  animation: chibi-idle-breathe 3.4s ease-in-out infinite alternate;
}

.sketch-companion[data-action="singing"] .chibi-pose-singing {
  animation: chibi-sing-sway 900ms ease-in-out infinite alternate;
}

.sketch-companion[data-action="thinking"] .chibi-pose-thinking {
  animation: chibi-think-bob 1.25s ease-in-out infinite alternate;
}

.sketch-companion[data-action="reading"] .chibi-pose-reading {
  animation: chibi-read-breathe 1.9s ease-in-out infinite alternate;
}

.sketch-companion[data-action="sighing"] .chibi-pose-sigh {
  animation: chibi-sigh-droop 2.2s ease-in-out infinite alternate;
}

.chibi-speech-bubble {
  position: absolute;
  top: 22%;
  right: 76%;
  z-index: 2;
  min-width: 78px;
  padding: 12px 16px;
  color: #343942;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(23, 26, 31, 0.12);
  border-radius: 18px 18px 5px 18px;
  box-shadow: 0 12px 30px rgba(23, 26, 31, 0.14);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  animation: chibi-bubble-pop 260ms var(--ease) both;
}

.chibi-speech-bubble.is-invite {
  width: max-content;
  max-width: min(190px, 62vw);
  white-space: normal;
  line-height: 1.45;
  text-align: center;
}

.chibi-speech-bubble::after {
  position: absolute;
  right: -9px;
  bottom: 4px;
  width: 17px;
  height: 17px;
  content: "";
  background: inherit;
  border-right: 1px solid rgba(23, 26, 31, 0.12);
  border-bottom: 1px solid rgba(23, 26, 31, 0.12);
  transform: rotate(-34deg) skew(-10deg);
}

.sketch-companion.is-bubble-right .chibi-speech-bubble {
  right: auto;
  left: 76%;
  border-radius: 18px 18px 18px 5px;
}

.sketch-companion.is-bubble-right .chibi-speech-bubble::after {
  right: auto;
  left: -9px;
  border: 0;
  border-left: 1px solid rgba(23, 26, 31, 0.12);
  border-bottom: 1px solid rgba(23, 26, 31, 0.12);
  transform: rotate(34deg) skew(10deg);
}

.chibi-speech-bubble[hidden] {
  display: none;
}

.sketch-companion path,
.sketch-companion circle,
.sketch-companion ellipse,
.sketch-companion rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.sketch-companion .sketch-hair,
.sketch-companion .sketch-face,
.sketch-companion .sketch-shirt,
.sketch-companion .sketch-skirt,
.sketch-companion .sketch-arm,
.sketch-companion .sketch-leg,
.sketch-companion .sketch-shoe,
.sketch-companion .sketch-shorts,
.sketch-companion circle {
  fill: #fff;
}

.sketch-companion .sketch-bag path:nth-child(2) {
  fill: #fff;
}

.sketch-companion .sketch-hat path:nth-child(1),
.sketch-companion .sketch-hat path:nth-child(2) {
  fill: #fff;
}

.sketch-companion .sketch-eye {
  fill: #16181d;
}

.sketch-companion .sketch-eye-shine {
  fill: #fff;
  stroke: none;
}

.sketch-companion .sketch-hand,
.sketch-companion .sketch-earring {
  fill: #fff;
}

.sketch-singing-mouth {
  opacity: 0;
}

.sketch-sing-props,
.sketch-wave-props,
.sketch-thinking-props,
.sketch-reading-figure {
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease, transform 360ms var(--ease);
}

.sketch-sing-props ellipse {
  fill: #ff6b8a;
}

.sketch-wave-props path:first-child {
  fill: #5bd6c8;
}

.sketch-wave-props path:last-child {
  fill: #ffca55;
}

.sketch-thinking-props path:first-child {
  fill: #ffe37a;
}

.sketch-thinking-props circle {
  fill: #5bd6c8;
}

.sketch-reading-figure {
  transform: translateY(24px) scale(0.92);
  transform-origin: center bottom;
}

.sketch-reading-glasses rect {
  fill: rgba(255, 244, 210, 0.18);
  stroke: #bd9238;
  stroke-width: 2.2;
}

.sketch-reading-glasses path {
  stroke: #bd9238;
}

.sketch-book path:nth-child(1) {
  fill: #fff;
}

.sketch-book path:nth-child(2) {
  fill: #fff;
}

.sketch-companion[data-action="singing"] .sketch-figure {
  animation: sketch-sing-sway 1.05s ease-in-out infinite alternate;
}

.sketch-companion[data-action="singing"] .sketch-smile {
  opacity: 0;
}

.sketch-companion[data-action="singing"] .sketch-singing-mouth {
  fill: #fff;
  opacity: 1;
}

.sketch-companion[data-action="singing"] .sketch-sing-props {
  opacity: 1;
}

.sketch-companion[data-action="singing"] .sketch-bag {
  opacity: 0;
}

.sketch-companion[data-action="singing"] .sketch-sing-props ellipse {
  animation: sketch-mic-pulse 700ms ease-in-out infinite alternate;
}

.sketch-companion[data-action="reading"] .sketch-figure {
  opacity: 0;
  transform: translateY(26px) scale(0.88);
}

.sketch-companion[data-action="reading"] .sketch-reading-figure {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.sketch-companion[data-action="reading"] .sketch-book {
  animation: sketch-book-breathe 1.8s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center bottom;
}

.sketch-companion[data-action="waving"] .sketch-arm-left {
  animation: sketch-wave-arm 760ms ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: top center;
}

.sketch-companion[data-action="waving"] .sketch-wave-props {
  opacity: 1;
  animation: sketch-sparkle 900ms ease-in-out infinite alternate;
}

.sketch-companion[data-action="thinking"] .sketch-thinking-props {
  opacity: 1;
  animation: sketch-idea-float 1.3s ease-in-out infinite alternate;
}

.sketch-companion[data-action="thinking"] .sketch-arm-right {
  animation: sketch-think-arm 1.1s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: top center;
}

.sketch-music-notes {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.sketch-music-notes span {
  position: absolute;
  top: 38%;
  left: 14%;
  color: #ff6b8a;
  font-size: clamp(14px, 1.4vw, 21px);
  font-weight: 800;
  opacity: 0;
  text-shadow: 0 2px 7px rgba(255, 107, 138, 0.18);
}

.sketch-music-notes span:nth-child(2) {
  top: 28%;
  left: 4%;
  color: #5bd6c8;
  animation-delay: 380ms;
}

.sketch-music-notes span:nth-child(3) {
  top: 20%;
  left: 72%;
  color: #ffca55;
  animation-delay: 760ms;
}

.sketch-music-notes span:nth-child(4) {
  top: 34%;
  left: 83%;
  color: #6c8cff;
  animation-delay: 1.08s;
}

.sketch-companion[data-action="singing"] .sketch-music-notes span {
  animation-name: sketch-note-float;
  animation-duration: 1.7s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

.sketch-figure {
  transform: rotate(var(--figure-tilt));
  transform-origin: 50% 58%;
  transition: opacity 240ms ease, transform 260ms var(--ease);
}

.sketch-blouse {
  transform: translate(var(--cloth-x), var(--cloth-y)) skewY(var(--cloth-skew)) scaleX(var(--cloth-stretch));
  transform-box: fill-box;
  transform-origin: left center;
  transition: transform 340ms cubic-bezier(0.2, 0.8, 0.2, 1.2);
}

.sketch-companion.is-pulling-left .sketch-blouse {
  transform-origin: right center;
}

.sketch-skirt {
  transform: skewX(var(--figure-tilt));
  transform-box: fill-box;
  transform-origin: top center;
  transition: transform 260ms var(--ease);
}

.sketch-companion.is-dragging .sketch-figure,
.sketch-companion.is-dragging .sketch-blouse,
.sketch-companion.is-dragging .sketch-skirt {
  transition: none;
}

.sketch-action-menu {
  position: absolute;
  top: 24%;
  right: calc(100% + 12px);
  display: grid;
  width: 184px;
  gap: 8px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(23, 26, 31, 0.1);
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(23, 26, 31, 0.14);
  cursor: default;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px) scale(0.94);
  transform-origin: right center;
  transition: opacity 180ms ease, transform 220ms var(--ease);
}

.sketch-action-menu[hidden] {
  display: none !important;
}

.sketch-companion.is-menu-open .sketch-action-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.sketch-companion.is-menu-right .sketch-action-menu {
  right: auto;
  left: calc(100% + 12px);
  transform: translateX(-10px) scale(0.94);
  transform-origin: left center;
}

.sketch-companion.is-menu-open.is-menu-right .sketch-action-menu {
  transform: translateX(0) scale(1);
}

.sketch-menu-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.sketch-menu-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.sketch-menu-actions button {
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  padding: 0;
  color: #2e333c;
  background: #f2f2f5;
  border: 1px solid transparent;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 750;
  transition: transform 160ms var(--ease), border-color 160ms ease, background-color 160ms ease;
}

.sketch-menu-actions button:nth-child(2) { background: #ffe7ee; }
.sketch-menu-actions button:nth-child(3) { background: #fff2bf; }
.sketch-menu-actions button:nth-child(4) { background: #dcf7f3; }
.sketch-menu-actions button:nth-child(5) { background: #eee8ff; }
.sketch-menu-actions button:nth-child(6) { background: #e8f1ff; }

.sketch-menu-actions button:hover,
.sketch-menu-actions button:focus-visible {
  border-color: rgba(23, 26, 31, 0.14);
  outline: 0;
  transform: translateY(-2px) scale(1.04);
}

.sketch-action-menu small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.sketch-companion.is-running-away {
  pointer-events: none;
  animation: sketch-run-away 2.15s cubic-bezier(0.55, 0.05, 0.2, 1) both;
}

.sketch-companion.is-running-away .sketch-leg-left {
  animation: sketch-run-leg-left 170ms ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: top center;
}

.sketch-companion.is-running-away .sketch-leg-right {
  animation: sketch-run-leg-right 170ms ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: top center;
}

@keyframes sketch-sing-sway {
  from { transform: rotate(-2.6deg) translateY(1px); }
  to { transform: rotate(3.2deg) translateY(-2px); }
}

@keyframes sketch-mic-pulse {
  from { transform: scale(0.96); }
  to { transform: scale(1.08); }
}

@keyframes sketch-note-float {
  0% { opacity: 0; transform: translate(0, 8px) rotate(-8deg) scale(0.75); }
  28% { opacity: 1; }
  100% { opacity: 0; transform: translate(7px, -34px) rotate(12deg) scale(1.15); }
}

@keyframes sketch-book-breathe {
  from { transform: translateY(0) rotate(-1deg); }
  to { transform: translateY(-3px) rotate(1deg); }
}

@keyframes sketch-wave-arm {
  from { transform: rotate(132deg) scaleY(0.68); }
  to { transform: rotate(150deg) scaleY(0.68); }
}

@keyframes sketch-sparkle {
  from { transform: scale(0.82) rotate(-4deg); opacity: 0.45; }
  to { transform: scale(1.08) rotate(5deg); opacity: 1; }
}

@keyframes sketch-idea-float {
  from { transform: translateY(2px) rotate(-2deg); }
  to { transform: translateY(-5px) rotate(2deg); }
}

@keyframes sketch-think-arm {
  from { transform: rotate(145deg) scaleY(0.62); }
  to { transform: rotate(154deg) scaleY(0.62); }
}

@keyframes chibi-idle-breathe {
  from { transform: translateY(1px) scale(0.995); }
  to { transform: translateY(-3px) scale(1.008); }
}

@keyframes chibi-sing-sway {
  from { transform: translateY(1px) rotate(-2.4deg) scale(0.995); }
  to { transform: translateY(-4px) rotate(2.8deg) scale(1.01); }
}

@keyframes chibi-think-bob {
  from { transform: translateY(1px) rotate(-1deg); }
  to { transform: translateY(-5px) rotate(1.2deg); }
}

@keyframes chibi-read-breathe {
  from { transform: translateY(1px) rotate(-0.6deg); }
  to { transform: translateY(-3px) rotate(0.6deg); }
}

@keyframes chibi-sigh-droop {
  from { transform: translateY(1px) rotate(-0.5deg); }
  to { transform: translateY(4px) rotate(0.5deg); }
}

@keyframes chibi-bubble-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.82); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sketch-run-away {
  0% { opacity: 1; transform: translateX(0) rotate(0); }
  9% { transform: translateX(-12px) rotate(-5deg); }
  43% { opacity: 1; transform: translateX(115vw) rotate(8deg); }
  44% { opacity: 0; transform: translateX(115vw) rotate(8deg); }
  55% { opacity: 0; transform: translateX(-115vw) rotate(-7deg); }
  66% { opacity: 1; transform: translateX(-90vw) rotate(-5deg); }
  100% { opacity: 1; transform: translateX(0) rotate(0); }
}

@keyframes sketch-run-leg-left {
  from { transform: rotate(18deg); }
  to { transform: rotate(-20deg); }
}

@keyframes sketch-run-leg-right {
  from { transform: rotate(-20deg); }
  to { transform: rotate(18deg); }
}

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

.companion-confirm-dialog,
.portfolio-chat-dialog {
  color: var(--ink);
  background: #fff;
  border: 0;
  box-shadow: 0 28px 90px rgba(18, 25, 35, 0.24);
}

.companion-confirm-dialog::backdrop,
.portfolio-chat-dialog::backdrop {
  background: rgba(20, 25, 34, 0.3);
  backdrop-filter: blur(12px);
}

.companion-confirm-dialog[open],
.portfolio-chat-dialog[open] {
  animation: companion-dialog-in 260ms var(--ease) both;
}

.companion-confirm-dialog {
  width: min(440px, calc(100vw - 30px));
  padding: 30px;
  overflow: visible;
  border-radius: 28px;
  text-align: center;
}

.companion-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: #505761;
  background: #f2f3f5;
  border: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms var(--ease), background-color 180ms ease;
}

.companion-dialog-close:hover,
.companion-dialog-close:focus-visible {
  background: #e7e9ec;
  outline: 0;
  transform: rotate(8deg) scale(1.05);
}

.companion-confirm-avatar {
  width: 128px;
  height: 128px;
  margin: -76px auto 6px;
  object-fit: contain;
  filter: drop-shadow(0 12px 14px rgba(23, 26, 31, 0.12));
}

.companion-confirm-dialog .eyebrow {
  margin: 0 0 5px;
}

.companion-confirm-dialog h2 {
  margin: 0;
  font-size: clamp(27px, 4vw, 35px);
  letter-spacing: -0.04em;
}

.companion-confirm-dialog > p:not(.eyebrow) {
  max-width: 340px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.companion-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.button-ghost {
  color: #505761;
  background: #f2f3f5;
  border-color: rgba(23, 26, 31, 0.08);
}

.button-ghost:hover {
  background: #e8eaed;
}

.portfolio-chat-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  padding: 0;
  overflow: hidden;
  border-radius: 30px;
}

.portfolio-chat-shell {
  display: grid;
  max-height: min(820px, calc(100vh - 28px));
  grid-template-rows: auto auto minmax(180px, 1fr) auto auto auto;
}

.portfolio-chat-header {
  position: relative;
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 13px;
  padding: 18px 64px 14px 24px;
  background: linear-gradient(135deg, #f4fbfa, #f7f9ff);
  border-bottom: 1px solid rgba(23, 26, 31, 0.07);
}

.portfolio-chat-header img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.portfolio-chat-header span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portfolio-chat-header h2 {
  margin: 2px 0 0;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.portfolio-chat-scope {
  margin: 0;
  padding: 10px 24px;
  color: #59616d;
  background: #fff9e5;
  border-bottom: 1px solid #f5e8b6;
  font-size: 12px;
  line-height: 1.55;
}

.portfolio-chat-messages {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  gap: 14px;
  padding: 22px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fafbfc;
}

.portfolio-chat-message {
  display: flex;
  max-width: 84%;
  flex-direction: column;
  gap: 4px;
  align-self: flex-end;
}

.portfolio-chat-message.is-assistant {
  align-self: flex-start;
}

.portfolio-chat-message span {
  padding-inline: 7px;
  color: #8a919b;
  font-size: 10px;
  font-weight: 700;
}

.portfolio-chat-message p {
  margin: 0;
  padding: 11px 14px;
  color: #fff;
  background: var(--accent);
  border-radius: 18px 18px 4px 18px;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.portfolio-chat-message.is-assistant p {
  color: #353b44;
  background: #fff;
  border: 1px solid rgba(23, 26, 31, 0.08);
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 5px 16px rgba(23, 26, 31, 0.05);
}

.portfolio-chat-message.is-typing p {
  color: #7b828c;
  font-size: 18px;
  letter-spacing: 0.18em;
}

.portfolio-chat-suggestions {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  overflow-x: auto;
  background: #fff;
  border-top: 1px solid rgba(23, 26, 31, 0.07);
  scrollbar-width: none;
}

.portfolio-chat-suggestions::-webkit-scrollbar {
  display: none;
}

.portfolio-chat-suggestions button {
  flex: 0 0 auto;
  padding: 8px 12px;
  color: #4b535e;
  background: #f3f5f7;
  border: 1px solid rgba(23, 26, 31, 0.08);
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms var(--ease);
}

.portfolio-chat-suggestions button:hover,
.portfolio-chat-suggestions button:focus-visible {
  color: var(--accent);
  border-color: rgba(0, 137, 123, 0.35);
  outline: 0;
  transform: translateY(-1px);
}

.portfolio-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 18px;
  background: #fff;
  border-top: 1px solid rgba(23, 26, 31, 0.07);
}

.portfolio-chat-form input {
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  color: var(--ink);
  background: #f5f6f8;
  border: 1px solid transparent;
  border-radius: 15px;
  font: inherit;
  font-size: 14px;
  outline: 0;
}

.portfolio-chat-form input:focus {
  background: #fff;
  border-color: rgba(0, 137, 123, 0.48);
  box-shadow: 0 0 0 4px rgba(0, 137, 123, 0.08);
}

.portfolio-chat-form button {
  min-width: 70px;
  padding: 0 16px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 15px;
  font-weight: 700;
  cursor: pointer;
}

.portfolio-chat-form button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.portfolio-chat-note {
  padding: 0 20px 14px;
  color: #9298a1;
  background: #fff;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

@keyframes companion-dialog-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: clamp(80px, 9vw, 120px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.overview-card {
  display: grid;
  min-height: 160px;
  align-content: center;
  gap: 7px;
  padding: 26px clamp(20px, 2.6vw, 34px);
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  transition: background-color 220ms ease;
}

.overview-card:first-child {
  border-left: 0;
}

.overview-card:hover,
.overview-card:focus-visible {
  background: var(--surface-soft);
}

.overview-card span,
.card-kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.overview-card strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.012em;
  line-height: 1.35;
}

.overview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.content-shell {
  overflow: visible;
}

.portfolio-section {
  position: relative;
  padding-block: var(--section-space);
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 54px;
}

.portfolio-section:first-child {
  border-top: 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-head-row {
  display: flex;
  max-width: none;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 740;
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.section-intro {
  max-width: 670px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

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

.featured-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.featured-grid .work-card {
  grid-template-columns: minmax(210px, 0.38fr) minmax(0, 1fr);
  min-height: 250px;
  padding: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.featured-grid .work-card:last-child {
  border-bottom: 1px solid var(--line);
}

.featured-grid .work-card::before {
  display: grid;
  align-items: start;
  padding: 34px 24px 34px 0;
  color: var(--accent);
  content: attr(data-index);
  font-size: 12px;
  font-weight: 750;
}

.featured-grid .card-body {
  padding: 34px 0;
}

.featured-grid .card-title {
  max-width: 760px;
  font-size: clamp(25px, 3vw, 38px);
}

.featured-grid .card-summary {
  max-width: 780px;
  font-size: 16px;
}

.work-card,
.bento-card {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: 22px;
  transition: transform 320ms var(--ease), border-color 220ms ease;
}

.work-card:hover,
.work-card:focus-visible,
.bento-card:hover,
.bento-card:focus-visible {
  border-color: rgba(23, 26, 31, 0.1);
  transform: translateY(-4px);
}

.featured-grid .work-card:hover,
.featured-grid .work-card:focus-visible {
  border-color: var(--line);
  transform: none;
}

.work-card.has-image {
  grid-template-rows: 190px 1fr;
}

.card-image,
.bento-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
  transition: transform 700ms var(--ease);
}

.work-card:hover .card-image,
.bento-card:hover .bento-image {
  transform: scale(1.025);
}

.card-body,
.bento-card {
  padding: 27px;
}

.card-title {
  margin: 9px 0 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.02em;
  line-height: 1.36;
}

.card-summary {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.card-foot > span:last-child {
  transition: transform 220ms var(--ease);
}

.work-card:hover .card-foot > span:last-child,
.bento-card:hover .card-foot > span:last-child {
  transform: translate(3px, -3px);
}

.compact-section {
  display: grid;
  grid-template-columns: minmax(320px, 0.66fr) minmax(0, 1.34fr);
  gap: clamp(44px, 7vw, 92px);
  align-items: start;
}

.compact-section .section-head {
  position: sticky;
  top: 94px;
  margin-bottom: 0;
}

.compact-section .section-head h2 {
  font-size: clamp(38px, 4vw, 50px);
  white-space: nowrap;
}

.workflow-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.workflow-grid .work-card {
  min-height: 240px;
  align-content: end;
  padding: clamp(26px, 4vw, 42px);
  background: var(--surface-soft);
}

.workflow-grid .card-body {
  padding: 0;
}

.workflow-grid .card-title {
  max-width: 620px;
  font-size: clamp(24px, 3.2vw, 36px);
}

.automation-showcase {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
  margin-top: 54px;
  padding: clamp(36px, 6vw, 70px);
  color: #fff;
  background: var(--navy);
  border: 1px solid transparent;
  border-radius: 28px;
  cursor: pointer;
  scroll-margin-top: 78px;
}

.automation-showcase:hover,
.automation-showcase:focus-visible {
  border-color: rgba(120, 217, 208, 0.48);
}

.automation-showcase:hover .automation-window,
.automation-showcase:focus-visible .automation-window {
  border-color: rgba(120, 217, 208, 0.42);
}

.automation-kicker {
  margin: 0 0 13px;
  color: #78d9d0;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.automation-copy h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 720;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.automation-copy > p:not(.automation-kicker):not(.automation-note) {
  margin: 18px 0 0;
  color: #c3cfda;
  font-size: 15px;
}

.automation-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 30px;
}

.automation-metrics div {
  padding: 0 15px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.automation-metrics div:first-child {
  padding-left: 0;
  border-left: 0;
}

.automation-metrics strong {
  display: block;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.automation-metrics span {
  display: block;
  margin-top: 7px;
  color: #aebdca;
  font-size: 10px;
  line-height: 1.4;
}

.automation-note {
  margin: 25px 0 0;
  color: #8194a6;
  font-size: 10px;
}

.automation-open-hint {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  color: #78d9d0;
  font-size: 12px;
  font-weight: 650;
}

.automation-open-hint > span:last-child {
  transition: transform 220ms var(--ease);
}

.automation-showcase:hover .automation-open-hint > span:last-child,
.automation-showcase:focus-visible .automation-open-hint > span:last-child {
  transform: translate(3px, -3px);
}

.automation-window {
  overflow: hidden;
  background: #081522;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  transition: border-color 220ms ease;
}

.automation-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 12px 16px;
  color: #d9e2ea;
  background: #13283b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.automation-window-bar small {
  color: #7f93a4;
  font-size: 9px;
}

.automation-window-body {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(240px, 1.2fr);
  min-height: 380px;
}

.automation-tree {
  padding: 25px 20px;
  color: #8fa5b8;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  line-height: 1.75;
}

.automation-tree p {
  margin: 0;
  white-space: nowrap;
}

.automation-tree b {
  color: #dce6ee;
  font-weight: 650;
}

.automation-tree .tree-gap {
  margin-top: 13px;
}

.automation-flow {
  display: grid;
  align-content: center;
  gap: 0;
  padding: 24px;
}

.automation-flow > div {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.automation-flow > div span {
  color: #62cfc5;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.automation-flow > div strong {
  color: #d9e3ea;
  font-size: 12px;
  font-weight: 550;
}

.automation-flow pre {
  margin: 20px 0 0;
  overflow-x: auto;
  color: #91a6b7;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.automation-flow code span {
  color: #62cfc5;
}

#education .static-grid {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

#education .work-card {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
}

#education .work-card:first-child {
  border-left: 0;
}

#education .work-card:hover,
#education .work-card:focus-visible {
  background: var(--surface-soft);
  border-color: var(--line);
  transform: none;
}

#education .card-body {
  padding: 34px;
}

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

.research-grid .work-card:first-child {
  grid-column: span 2;
  min-height: 470px;
  align-content: end;
  background: var(--navy);
}

.research-grid .work-card:first-child .card-body {
  align-self: end;
  padding: clamp(32px, 5vw, 54px);
}

.research-grid .work-card:first-child .card-kicker,
.research-grid .work-card:first-child .card-foot {
  color: #77d4cb;
}

.research-grid .work-card:first-child .card-title {
  max-width: 720px;
  color: #fff;
  font-size: clamp(29px, 4vw, 48px);
  line-height: 1.16;
}

.research-grid .work-card:first-child .card-summary {
  max-width: 720px;
  color: #c5d0da;
  font-size: 16px;
}

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

.bento-card {
  min-height: 460px;
  align-content: end;
  padding: clamp(28px, 4vw, 42px);
}

.bento-card.large,
.bento-card.tall {
  grid-column: auto;
}

.bento-card .bento-image {
  width: calc(100% + clamp(56px, 8vw, 84px));
  height: 230px;
  margin: calc(clamp(28px, 4vw, 42px) * -1) calc(clamp(28px, 4vw, 42px) * -1) 30px;
}

.bento-card .card-title {
  font-size: clamp(24px, 3vw, 34px);
}

.award-spotlight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.award-spotlight .work-card {
  grid-template-rows: 360px 1fr;
  min-height: 620px;
  background: var(--surface-soft);
}

.award-spotlight .card-image {
  height: 360px;
  padding: 22px;
  object-fit: contain;
  background: #f1eee7;
}

.award-spotlight .card-body {
  padding: 30px;
}

.award-spotlight .card-title {
  font-size: clamp(23px, 2.5vw, 31px);
}

.award-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 36px 0 18px;
}

.award-rail-head strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 680;
}

.work-card.media-certificate .card-image {
  object-fit: contain;
  background: #f1eee7;
}

.rail-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.rail-btn {
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: #e8e8ed;
  border: 0;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  transition: background-color 180ms ease, transform 180ms var(--ease);
}

.rail-btn:hover {
  background: #dcdce1;
  transform: scale(1.04);
}

.card-rail {
  display: grid;
  grid-auto-columns: minmax(290px, 34%);
  grid-auto-flow: column;
  gap: 16px;
  overflow-x: auto;
  padding: 3px 3px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}

.card-rail .work-card {
  min-height: 390px;
  background: var(--surface-soft);
  scroll-snap-align: start;
}

.campus-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.campus-highlights article {
  min-width: 0;
  padding: clamp(28px, 4vw, 46px) clamp(24px, 4vw, 48px) clamp(30px, 4.5vw, 52px) 0;
}

.campus-highlights article + article {
  padding-right: 0;
  padding-left: clamp(24px, 4vw, 48px);
  border-left: 1px solid var(--line);
}

.campus-highlights span {
  display: block;
  margin-bottom: 24px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.campus-highlights h3 {
  max-width: 520px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(23px, 2.7vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.22;
}

.campus-highlights p {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.campus-carousel-controls {
  width: max-content;
  margin: 0 0 18px auto;
}

.campus-carousel {
  position: relative;
  margin-inline: calc((100vw - min(100vw - 48px, var(--page))) / -2);
  padding-inline: max(24px, calc((100vw - var(--page)) / 2));
  overflow: hidden;
}

.campus-track {
  display: grid;
  grid-auto-columns: clamp(300px, 34vw, 440px);
  grid-auto-flow: column;
  gap: 16px;
  overflow-x: auto;
  padding: 3px max(24px, calc((100vw - var(--page)) / 2)) 24px 0;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y;
}

.campus-track::-webkit-scrollbar {
  display: none;
}

.campus-slide {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  padding: 0;
  color: #fff;
  text-align: left;
  background: #1c1c1e;
  border: 0;
  border-radius: 22px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  isolation: isolate;
  transform: translateZ(0);
}

.campus-slide::after {
  position: absolute;
  inset: 35% 0 0;
  z-index: 1;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.78));
  content: "";
  pointer-events: none;
}

.campus-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease), opacity 220ms ease;
}

.campus-slide:hover img,
.campus-slide:focus-visible img {
  transform: scale(1.035);
}

.campus-slide:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.45);
  outline-offset: 3px;
}

.campus-slide-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: grid;
  gap: 7px;
  padding: clamp(24px, 3vw, 34px);
}

.campus-slide-caption small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
  line-height: 1.4;
  text-transform: uppercase;
}

.campus-slide-caption strong {
  max-width: 330px;
  color: #fff;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.modal-media img.is-campus {
  padding: 18px;
  object-fit: contain;
  background: #111216;
}

.skills-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.skills-grid .work-card {
  min-height: 270px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.skills-grid .work-card:nth-child(2n) {
  border-right: 0;
}

.skills-grid .work-card:hover,
.skills-grid .work-card:focus-visible {
  background: var(--surface-soft);
  border-color: var(--line);
  transform: none;
}

.skills-grid .card-body {
  padding: 34px;
}

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-block: clamp(84px, 10vw, 132px);
  padding: clamp(44px, 7vw, 76px);
  color: #fff;
  background: var(--navy);
  border-radius: 28px;
}

.contact-panel .eyebrow {
  color: #77d4cb;
}

.contact-panel h2 {
  max-width: 780px;
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 720;
  letter-spacing: -0.042em;
  line-height: 1.08;
}

.contact-panel p:not(.eyebrow) {
  margin: 15px 0 0;
  color: #bcc9d5;
  font-size: 14px;
}

.button-light {
  flex: 0 0 auto;
  color: var(--ink);
  background: #fff;
}

.button-light:hover {
  color: #fff;
  background: var(--accent);
}

.detail-modal {
  width: min(900px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(8, 18, 30, 0.24);
}

.detail-modal.is-rich {
  width: min(1080px, calc(100vw - 32px));
  max-height: min(880px, calc(100vh - 24px));
}

.detail-modal[open] {
  animation: modal-in 300ms var(--ease) both;
}

.detail-modal::backdrop {
  background: rgba(8, 15, 24, 0.58);
  animation: backdrop-in 240ms ease both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 3;
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: #e8e8ed;
  border: 0;
  border-radius: 50%;
  font-size: 23px;
  line-height: 1;
}

.modal-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  min-height: 510px;
}

.modal-media {
  min-height: 100%;
  background: var(--surface-soft);
  border-right: 1px solid var(--line-soft);
}

.modal-media:empty {
  display: none;
}

.modal-grid:has(.modal-media:empty) {
  grid-template-columns: 1fr;
}

.modal-media img {
  width: 100%;
  height: 100%;
  min-height: 510px;
  object-fit: cover;
}

.modal-media img.is-certificate {
  padding: 20px;
  object-fit: contain;
  background: #f1eee7;
}

.modal-content {
  overflow-y: auto;
  padding: 54px 40px 40px;
}

.modal-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.modal-content h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.modal-content > p:not(.modal-kicker) {
  margin: 18px 0 0;
  color: var(--ink-soft);
}

.modal-content ul {
  display: grid;
  gap: 12px;
  margin: 25px 0 0;
  padding: 0;
  list-style: none;
}

.detail-modal.is-rich #modalFacts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 28px;
  padding: 20px 0;
  background: var(--surface-soft);
  border-radius: 14px;
}

.detail-modal.is-rich #modalFacts li {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding: 0 20px;
  color: var(--ink);
  border-left: 1px solid var(--line);
  font-size: 13px;
  font-weight: 620;
}

.detail-modal.is-rich #modalFacts li:first-child {
  border-left: 0;
}

.detail-modal.is-rich #modalFacts li::before {
  display: none;
}

.modal-sections {
  margin-top: 34px;
}

.modal-sections:empty {
  display: none;
}

.modal-detail-section {
  padding: 31px 0;
  border-top: 1px solid var(--line);
}

.modal-detail-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.28;
}

.modal-detail-section > p {
  margin: 13px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
}

.modal-detail-section ul {
  gap: 10px;
  margin-top: 18px;
}

.modal-detail-section li {
  color: #4b535e;
  line-height: 1.72;
}

.modal-detail-section pre {
  margin: 20px 0 0;
  overflow-x: auto;
  padding: 20px;
  color: #b9cfdd;
  background: #0c1c2b;
  border-radius: 13px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.75;
  white-space: pre;
}

.modal-content li {
  position: relative;
  padding-left: 17px;
  color: #4a515c;
  font-size: 14px;
}

.modal-content li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  content: "";
  background: var(--accent);
  border-radius: 50%;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 27px;
}

.modal-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 25px max(24px, calc((100% - var(--page)) / 2));
  color: #858b94;
  background: var(--surface-soft);
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
}

[data-reveal] {
  opacity: 1;
  transform: translateY(34px);
  transition: transform 720ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .header-inner {
    gap: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .nav {
    gap: 16px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    gap: 46px;
  }

  .portrait-card,
  .portrait-card img {
    min-height: 520px;
    height: 520px;
  }

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

  .research-grid .work-card:first-child {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .entry-gate {
    padding: 28px 18px;
  }

  .entry-visual {
    width: min(360px, 80vw);
  }


  .page-shell,
  .header-inner {
    width: min(100% - 32px, var(--page));
  }

  .header-inner {
    grid-template-columns: auto 1fr auto;
    min-height: 48px;
  }

  .nav-toggle {
    display: block;
    justify-self: end;
  }

  .nav {
    position: fixed;
    top: 48px;
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 14px 24px 30px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line-soft);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 220ms ease, transform 220ms var(--ease);
  }

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

  .nav a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 16px;
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav a::after {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 46px;
    min-height: auto;
    padding-block: 64px 52px;
  }

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

  .portrait-card {
    width: min(100%, 620px);
    min-height: auto;
  }

  .portrait-card img {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 11;
    object-position: center 43%;
  }

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

  .overview-card {
    min-height: 132px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .overview-card:first-child {
    border-top: 0;
  }

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

  .featured-grid .work-card::before {
    display: none;
  }

  .compact-section {
    display: block;
  }

  .compact-section .section-head {
    position: static;
    margin-bottom: 38px;
  }

  .compact-section .section-head h2 {
    white-space: normal;
  }

  .automation-showcase {
    grid-template-columns: 1fr;
    margin-top: 38px;
  }

  .automation-copy {
    max-width: 680px;
  }

  .research-grid,
  .bento-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .award-spotlight {
    grid-template-columns: 1fr;
  }

  .campus-carousel {
    margin-inline: calc((100vw - min(100vw - 32px, var(--page))) / -2);
    padding-left: 16px;
  }

  .campus-track {
    grid-auto-columns: minmax(300px, 68vw);
    padding-right: 32px;
  }

  .research-grid .work-card:first-child {
    grid-column: auto;
    min-height: 430px;
  }

  #education .static-grid {
    grid-template-columns: 1fr;
  }

  #education .work-card {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  #education .work-card:first-child {
    border-top: 0;
  }

  .skills-grid .work-card,
  .skills-grid .work-card:nth-child(2n) {
    border-right: 0;
  }

  .card-rail {
    grid-auto-columns: minmax(280px, 82vw);
  }

  .contact-panel {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .modal-media {
    min-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .modal-media img {
    min-height: 240px;
    max-height: 340px;
  }
}

@media (max-width: 560px) {
  .entry-gate-stage {
    gap: 16px;
  }

  .entry-visual {
    width: min(310px, 88vw);
  }

  .entry-enter-button {
    width: min(220px, 100%);
  }


  .page-shell,
  .header-inner {
    width: min(100% - 24px, var(--page));
  }

  .brand-copy {
    display: none;
  }

  .hero {
    gap: 38px;
    padding-block: 48px 42px;
  }

  h1 {
    font-size: clamp(43px, 14vw, 58px);
  }

  .lead {
    font-size: 16px;
  }

  .hero-actions .button {
    flex: 1 1 140px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 13px;
    margin-top: 34px;
  }

  .hero-metrics div,
  .hero-metrics div:first-child {
    padding: 0 0 0 14px;
    border-left: 2px solid var(--line);
  }

  .portrait-card {
    border-radius: 20px;
  }

  .portrait-card img {
    aspect-ratio: 4 / 5;
  }

  .overview {
    margin-bottom: 58px;
  }

  .portfolio-section {
    padding-block: 68px;
  }

  .section-head {
    margin-bottom: 30px;
  }

  .section-head h2 {
    font-size: 38px;
  }

  .section-head-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .featured-grid .card-body,
  #education .card-body,
  .skills-grid .card-body {
    padding: 28px 0;
  }

  #education .work-card:hover,
  #education .work-card:focus-visible,
  .skills-grid .work-card:hover,
  .skills-grid .work-card:focus-visible {
    background: transparent;
  }

  .workflow-grid .work-card,
  .bento-card {
    min-height: 310px;
    border-radius: 18px;
  }

  .research-grid .work-card:first-child {
    min-height: 390px;
  }

  .award-spotlight .work-card {
    grid-template-rows: 310px 1fr;
    min-height: 520px;
  }

  .award-spotlight .card-image {
    height: 310px;
    padding: 14px;
  }

  .campus-highlights {
    grid-template-columns: 1fr;
    margin-bottom: 24px;
  }

  .campus-highlights article,
  .campus-highlights article + article {
    padding: 28px 0 30px;
    border-left: 0;
  }

  .campus-highlights article + article {
    border-top: 1px solid var(--line);
  }

  .campus-highlights span {
    margin-bottom: 18px;
  }

  .campus-carousel-controls {
    margin-bottom: 14px;
  }

  .campus-carousel {
    margin-inline: calc((100vw - min(100vw - 24px, var(--page))) / -2);
    padding-left: 12px;
  }

  .campus-track {
    grid-auto-columns: minmax(274px, 82vw);
    gap: 12px;
    padding-right: 24px;
  }

  .campus-slide {
    border-radius: 18px;
  }

  .campus-slide-caption {
    padding: 24px;
  }

  .campus-slide-caption strong {
    font-size: 22px;
  }

  .sketch-companion {
    top: auto;
    right: 8px;
    bottom: 10px;
    width: 160px;
  }

  .chibi-speech-bubble {
    top: 16%;
    min-width: 66px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .companion-confirm-dialog {
    width: calc(100vw - 24px);
    padding: 28px 20px 22px;
    border-radius: 22px;
  }

  .companion-confirm-avatar {
    width: 104px;
    height: 104px;
    margin-top: -62px;
  }

  .portfolio-chat-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 22px;
  }

  .portfolio-chat-shell {
    max-height: calc(100vh - 12px);
    grid-template-rows: auto auto minmax(160px, 1fr) auto auto auto;
  }

  .portfolio-chat-header {
    min-height: 78px;
    padding: 12px 54px 10px 15px;
  }

  .portfolio-chat-header img {
    width: 54px;
    height: 54px;
  }

  .portfolio-chat-header h2 {
    font-size: 19px;
  }

  .portfolio-chat-scope {
    padding-inline: 15px;
  }

  .portfolio-chat-messages {
    min-height: 190px;
    padding: 16px 14px;
  }

  .portfolio-chat-message {
    max-width: 92%;
  }

  .portfolio-chat-suggestions {
    padding: 10px 14px;
  }

  .portfolio-chat-form {
    padding: 10px;
  }

  .portfolio-chat-form button {
    min-width: 60px;
    padding-inline: 12px;
  }

  .automation-showcase {
    gap: 30px;
    padding: 30px 20px 20px;
    border-radius: 20px;
  }

  .automation-copy h3 {
    font-size: 31px;
  }

  .automation-metrics {
    margin-top: 25px;
  }

  .automation-metrics div {
    padding-inline: 10px;
  }

  .automation-window {
    border-radius: 14px;
  }

  .automation-window-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .automation-window-body {
    grid-template-columns: 1fr;
  }

  .automation-tree {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }

  .automation-flow {
    padding: 20px;
  }

  .contact-panel {
    margin-block: 60px;
    padding: 34px 24px;
    border-radius: 22px;
  }

  .button-light {
    width: 100%;
  }

  .modal-content {
    padding: 54px 22px 28px;
  }

  .detail-modal.is-rich #modalFacts {
    grid-template-columns: 1fr;
  }

  .detail-modal.is-rich #modalFacts li,
  .detail-modal.is-rich #modalFacts li:first-child {
    min-height: 54px;
    padding: 13px 18px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .detail-modal.is-rich #modalFacts li:first-child {
    border-top: 0;
  }

  .modal-detail-section {
    padding: 26px 0;
  }

  .modal-detail-section pre {
    margin-inline: -4px;
    padding: 16px;
    font-size: 10px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry-avatar,
  .entry-visual::before {
    animation: none !important;
  }


  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}


/* Entry interaction v3 */
body.entry-gate-active {
  overflow: hidden;
}

.entry-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(16px, 4vw, 42px) 18px;
  color: #1d1d1f;
  background: #f5f5f7;
  overflow: hidden;
}

.entry-gate::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 24% 22%, rgba(0, 113, 227, 0.16), transparent 30%),
    radial-gradient(circle at 78% 20%, rgba(255, 214, 102, 0.22), transparent 28%),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 68%, #e9eef7 100%);
  pointer-events: none;
}

.entry-gate::after {
  position: absolute;
  right: -12vw;
  bottom: -9vh;
  left: -12vw;
  height: 30vh;
  content: "";
  background: rgba(255, 255, 255, 0.74);
  border-radius: 50% 50% 0 0;
  filter: blur(2px);
  pointer-events: none;
}

.entry-gate.is-leaving {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.entry-gate[hidden] {
  display: none !important;
}

.entry-scene {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  min-height: min(760px, calc(100dvh - 36px));
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto;
  align-items: end;
  justify-items: center;
  isolation: isolate;
}

.entry-ambient {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(38px);
  opacity: 0.42;
  pointer-events: none;
}

.entry-ambient-a {
  width: min(360px, 42vw);
  aspect-ratio: 1;
  left: 11%;
  top: 18%;
  background: #b8e2ff;
}

.entry-ambient-b {
  width: min(330px, 38vw);
  aspect-ratio: 1;
  right: 10%;
  top: 24%;
  background: #ffd98a;
}

.entry-person-shell {
  position: relative;
  z-index: 4;
  width: min(460px, 60vw);
  height: min(590px, 62dvh);
  align-self: end;
  margin-bottom: -4px;
  pointer-events: none;
}

.entry-person-image {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: auto;
  height: 100%;
  max-width: 120%;
  object-fit: contain;
  transform: translateX(-50%) translateY(0) scale(1);
  transform-origin: 50% 90%;
  filter: drop-shadow(0 24px 26px rgba(29, 29, 31, 0.16));
  opacity: 1;
  transition: opacity 220ms ease, transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 520ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.entry-scene.is-engaged .entry-person-image {
  transform: translateX(-50%) translateY(-8px) scale(1.018);
  filter: drop-shadow(0 30px 32px rgba(29, 29, 31, 0.2));
}

.entry-person-shadow {
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 70%;
  height: 32px;
  background: rgba(29, 29, 31, 0.14);
  border-radius: 50%;
  filter: blur(16px);
  transform: translateX(-50%);
}

.entry-object {
  --x: 50%;
  --y: 50%;
  --w: 120px;
  --rot: 0deg;
  --pop-rot: 5deg;
  position: absolute;
  z-index: 8;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  aspect-ratio: 1;
  padding: 0;
  color: #1d1d1f;
  background: transparent;
  border: 0;
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--rot)) scale(1);
  transform-origin: 50% 70%;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 260ms ease;
}

.entry-object:hover,
.entry-object:focus-visible,
.entry-object.is-active {
  z-index: 12;
  outline: 0;
  transform: translate(-50%, calc(-50% - 18px)) rotate(var(--pop-rot)) scale(1.08);
  filter: saturate(1.08);
}

.entry-object-shadow {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 64%;
  height: 18px;
  background: rgba(29, 29, 31, 0.14);
  border-radius: 50%;
  filter: blur(10px);
  transform: translateX(-50%) scale(0.78);
  transition: transform 260ms ease, opacity 260ms ease;
}

.entry-object:hover .entry-object-shadow,
.entry-object:focus-visible .entry-object-shadow,
.entry-object.is-active .entry-object-shadow {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.entry-object-ipad { --x: 72%; --y: 35%; --w: 190px; --rot: -8deg; --pop-rot: 6deg; }
.entry-object-airpods { --x: 31%; --y: 43%; --w: 104px; --rot: -5deg; --pop-rot: -9deg; }
.entry-object-bouquet { --x: 40%; --y: 29%; --w: 128px; --rot: 4deg; --pop-rot: 8deg; }
.entry-object-brushes { --x: 24%; --y: 61%; --w: 112px; --rot: -14deg; --pop-rot: 12deg; }
.entry-object-spark { --x: 78%; --y: 58%; --w: 96px; --rot: 7deg; --pop-rot: -8deg; }

.entry-ipad-shape,
.entry-airpods-shape,
.entry-bouquet-shape,
.entry-brushes-shape,
.entry-spark-shape {
  position: absolute;
  inset: 10%;
  display: block;
}

.entry-ipad-shape {
  border: 8px solid #20242b;
  border-radius: 18px;
  background: linear-gradient(135deg, #0d1024, #2e6bff 42%, #ffd6a8 78%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.2), 0 18px 26px rgba(29,29,31,.2);
  transform: perspective(260px) rotateX(52deg) rotateZ(-8deg);
}

.entry-airpods-shape i {
  position: absolute;
  top: 20%;
  width: 28%;
  height: 58%;
  background: #fff;
  border: 1px solid rgba(29,29,31,.08);
  border-radius: 999px 999px 44% 44%;
  box-shadow: 0 14px 18px rgba(29,29,31,.16);
}

.entry-airpods-shape i:first-child { left: 24%; transform: rotate(-10deg); }
.entry-airpods-shape i:last-child { right: 24%; transform: rotate(10deg); }

.entry-bouquet-shape::before {
  position: absolute;
  left: 48%;
  top: 38%;
  width: 9%;
  height: 48%;
  content: "";
  background: #6f8c4f;
  border-radius: 999px;
  transform: rotate(-18deg);
}

.entry-bouquet-shape i {
  position: absolute;
  width: 34%;
  aspect-ratio: 1;
  background: radial-gradient(circle at 34% 32%, #fff2f5, #f5aebd 72%);
  border-radius: 58% 42% 54% 46%;
  box-shadow: 0 10px 16px rgba(230, 136, 155, .24);
}

.entry-bouquet-shape i:nth-child(1) { left: 18%; top: 18%; transform: rotate(-18deg); }
.entry-bouquet-shape i:nth-child(2) { left: 46%; top: 14%; transform: rotate(18deg); }
.entry-bouquet-shape i:nth-child(3) { left: 34%; top: 42%; transform: rotate(4deg); }

.entry-brushes-shape i {
  position: absolute;
  left: 42%;
  top: 10%;
  width: 12%;
  height: 78%;
  background: linear-gradient(#f5d19b 0 45%, #181a1f 45% 100%);
  border-radius: 999px;
  transform-origin: 50% 88%;
  box-shadow: 0 14px 18px rgba(29,29,31,.18);
}

.entry-brushes-shape i:nth-child(1) { transform: rotate(-20deg); }
.entry-brushes-shape i:nth-child(2) { transform: rotate(3deg); }
.entry-brushes-shape i:nth-child(3) { transform: rotate(24deg); }

.entry-spark-shape {
  inset: 24%;
  background: #0071e3;
  clip-path: polygon(50% 0, 61% 36%, 100% 50%, 61% 64%, 50% 100%, 39% 64%, 0 50%, 39% 36%);
  box-shadow: 0 0 28px rgba(0, 113, 227, .38);
}

.entry-copy {
  position: relative;
  z-index: 18;
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: -6px;
  padding-bottom: clamp(18px, 4vh, 34px);
  text-align: center;
}

.entry-title-button {
  max-width: min(920px, calc(100vw - 36px));
  padding: 0;
  color: #111827;
  background: transparent;
  border: 0;
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 840;
  line-height: 1.08;
  letter-spacing: 0;
  cursor: pointer;
}


.entry-title-button span {
  display: block;
}

.entry-title-button span + span {
  margin-top: 0.02em;
}

.entry-title-button:hover,
.entry-title-button:focus-visible {
  color: #000;
  outline: 0;
}

.entry-hint {
  margin: 0;
  color: #7b818c;
  font-size: clamp(13px, 1.45vw, 17px);
  font-weight: 650;
  letter-spacing: 0;
}

.entry-enter-button {
  min-width: 136px;
  min-height: 48px;
  padding: 12px 32px;
  color: #fff;
  background: #0071e3;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(0, 113, 227, 0.28);
  font-size: 17px;
  font-weight: 760;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease, box-shadow 180ms ease;
}

.entry-enter-button:hover,
.entry-enter-button:focus-visible {
  background: #0063c7;
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0, 113, 227, 0.32);
}

@media (max-width: 820px) {
  .entry-scene {
    min-height: min(760px, calc(100dvh - 22px));
    grid-template-rows: minmax(360px, 1fr) auto;
  }

  .entry-person-shell {
    width: min(390px, 78vw);
    height: min(520px, 57dvh);
  }

  .entry-object-ipad { --x: 73%; --y: 34%; --w: 128px; }
  .entry-object-airpods { --x: 20%; --y: 43%; --w: 78px; }
  .entry-object-bouquet { --x: 36%; --y: 28%; --w: 92px; }
  .entry-object-brushes { --x: 22%; --y: 64%; --w: 82px; }
  .entry-object-spark { --x: 82%; --y: 61%; --w: 74px; }
}

@media (max-width: 520px) {
  .entry-gate {
    padding: 14px 12px;
  }

  .entry-scene {
    min-height: calc(100dvh - 20px);
    grid-template-rows: minmax(340px, 1fr) auto;
  }

  .entry-person-shell {
    width: min(340px, 86vw);
    height: min(470px, 54dvh);
  }

  .entry-copy {
    gap: 10px;
    padding-bottom: 18px;
  }

  .entry-title-button {
    max-width: 350px;
    font-size: 30px;
    line-height: 1.12;
  }

  .entry-hint {
    max-width: 320px;
    font-size: 13px;
    line-height: 1.45;
  }

  .entry-enter-button {
    width: min(220px, 100%);
  }
}


/* Entry interaction v4: page-images layout */
body.entry-gate-active {
  overflow: hidden;
}

.entry-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100dvh;
  padding: clamp(16px, 3.2vh, 34px) 18px 0;
  color: #1d1d1f;
  background: #f5f5f7;
  overflow: hidden;
}

.entry-gate::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 30% 56%, rgba(185, 226, 255, 0.58), transparent 24%),
    radial-gradient(circle at 75% 59%, rgba(255, 226, 151, 0.46), transparent 24%),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 58%, #eef2f8 100%);
  pointer-events: none;
}

.entry-gate::after {
  display: none;
}

.entry-intro {
  position: relative;
  z-index: 20;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.entry-title-button {
  max-width: min(1120px, calc(100vw - 32px));
  padding: 0;
  color: #111113;
  background: transparent;
  border: 0;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: 0;
  cursor: pointer;
}

.entry-title-button:hover,
.entry-title-button:focus-visible {
  color: #000;
  outline: 0;
}

.entry-hint {
  max-width: min(720px, calc(100vw - 36px));
  margin: 0;
  color: #737780;
  font-size: clamp(14px, 1.7vw, 21px);
  font-weight: 720;
  line-height: 1.35;
  letter-spacing: 0;
}

.entry-enter-button {
  min-width: 126px;
  min-height: 46px;
  padding: 11px 34px;
  color: #fff;
  background: #0071e3;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(0, 113, 227, 0.26);
  font-size: 17px;
  font-weight: 760;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease, box-shadow 180ms ease;
}

.entry-enter-button:hover,
.entry-enter-button:focus-visible {
  background: #0063c7;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0, 113, 227, 0.32);
  outline: 0;
}

.entry-scene {
  position: relative;
  z-index: 1;
  align-self: end;
  width: min(1120px, 100%);
  min-height: min(650px, 70dvh);
  margin: 0 auto;
  display: block;
  isolation: isolate;
}

.entry-ambient {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.54;
  pointer-events: none;
}

.entry-ambient-a {
  width: min(390px, 45vw);
  aspect-ratio: 1;
  left: 16%;
  top: 25%;
  background: #cbe9ff;
}

.entry-ambient-b {
  width: min(360px, 40vw);
  aspect-ratio: 1;
  right: 11%;
  top: 31%;
  background: #ffe4a6;
}

.entry-person-shell {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: -14px;
  width: min(500px, 48vw);
  height: min(600px, 66dvh);
  margin: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

.entry-person-image {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: auto;
  height: 100%;
  max-width: 142%;
  object-fit: contain;
  transform: translateX(-50%) translateY(0) scale(1);
  transform-origin: 50% 90%;
  filter: drop-shadow(0 24px 26px rgba(29, 29, 31, 0.16));
  opacity: 1;
  transition: opacity 200ms ease, transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 520ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.entry-scene.is-engaged .entry-person-image {
  transform: translateX(-50%) translateY(-7px) scale(1.015);
  filter: drop-shadow(0 30px 32px rgba(29, 29, 31, 0.2));
}

.entry-person-shadow {
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 74%;
  height: 34px;
  background: rgba(29, 29, 31, 0.14);
  border-radius: 50%;
  filter: blur(16px);
  transform: translateX(-50%);
}

.entry-object {
  --x: 50%;
  --y: 50%;
  --w: 120px;
  --rot: 0deg;
  --pop-rot: 5deg;
  position: absolute;
  z-index: 9;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  aspect-ratio: 1;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--rot)) scale(1);
  transform-origin: 50% 72%;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 260ms ease;
}

.entry-object:hover,
.entry-object:focus-visible,
.entry-object.is-active {
  z-index: 14;
  outline: 0;
  transform: translate(-50%, calc(-50% - 18px)) rotate(var(--pop-rot)) scale(1.07);
  filter: saturate(1.06);
}

.entry-object-image {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 16px 18px rgba(29, 29, 31, 0.16));
}

.entry-object-shadow {
  position: absolute;
  left: 50%;
  bottom: 7%;
  z-index: 1;
  width: 64%;
  height: 18px;
  background: rgba(29, 29, 31, 0.13);
  border-radius: 50%;
  filter: blur(10px);
  transform: translateX(-50%) scale(0.78);
  transition: transform 260ms ease, opacity 260ms ease;
}

.entry-object:hover .entry-object-shadow,
.entry-object:focus-visible .entry-object-shadow,
.entry-object.is-active .entry-object-shadow {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.entry-object-brushes { --x: 25%; --y: 45%; --w: 92px; --rot: -12deg; --pop-rot: 10deg; }
.entry-object-airpods { --x: 30%; --y: 75%; --w: 150px; --rot: -3deg; --pop-rot: -8deg; }
.entry-object-bouquet { --x: 43%; --y: 68%; --w: 138px; --rot: 4deg; --pop-rot: 8deg; z-index: 11; }
.entry-object-ipad { --x: 72%; --y: 42%; --w: 236px; --rot: -8deg; --pop-rot: 6deg; }
.entry-object-camera { --x: 72%; --y: 76%; --w: 150px; --rot: 5deg; --pop-rot: -7deg; z-index: 12; }

@media (max-width: 820px) {
  .entry-gate {
    padding: 18px 12px 0;
  }

  .entry-title-button {
    font-size: clamp(30px, 8vw, 54px);
    line-height: 1.08;
  }

  .entry-hint {
    max-width: 360px;
    font-size: 14px;
  }

  .entry-enter-button {
    min-height: 44px;
    padding: 10px 30px;
  }

  .entry-scene {
    min-height: min(570px, 63dvh);
  }

  .entry-person-shell {
    width: min(360px, 76vw);
    height: min(500px, 55dvh);
  }

  .entry-object-brushes { --x: 18%; --y: 43%; --w: 66px; }
  .entry-object-airpods { --x: 23%; --y: 75%; --w: 106px; }
  .entry-object-bouquet { --x: 39%; --y: 67%; --w: 98px; }
  .entry-object-ipad { --x: 75%; --y: 42%; --w: 138px; }
  .entry-object-camera { --x: 79%; --y: 76%; --w: 104px; }
}

@media (max-width: 520px) {
  .entry-gate {
    padding: 16px 10px 0;
  }

  .entry-intro {
    gap: 8px;
  }

  .entry-title-button {
    max-width: 360px;
    font-size: 29px;
    line-height: 1.12;
  }

  .entry-hint {
    max-width: 310px;
    font-size: 13px;
    line-height: 1.4;
  }

  .entry-enter-button {
    width: min(210px, 100%);
  }

  .entry-scene {
    min-height: min(510px, 61dvh);
  }

  .entry-person-shell {
    width: min(320px, 82vw);
    height: min(440px, 51dvh);
    bottom: -8px;
  }

  .entry-object-brushes { --x: 15%; --y: 42%; --w: 52px; }
  .entry-object-airpods { --x: 20%; --y: 77%; --w: 86px; }
  .entry-object-bouquet { --x: 39%; --y: 68%; --w: 78px; }
  .entry-object-ipad { --x: 78%; --y: 43%; --w: 112px; }
  .entry-object-camera { --x: 82%; --y: 77%; --w: 82px; }
}
