:root {
  --ui-scale: 1;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.76);
  --paper: #0b8db0;
  --paper-strong: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.3);
  --accent: #f05a42;
  --accent-2: rgba(226, 252, 255, 0.95);
  --gold: #f2c879;
  --gold-soft: rgba(242, 200, 121, 0.62);
  --night: #0b2430;
  --night-soft: #123949;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-strong: rgba(255, 255, 255, 0.16);
  --glass-dark: rgba(255, 255, 255, 0.06);
  --shadow: 0 24px 80px rgba(0, 80, 110, 0.14);
}

.section-lead {
  max-width: 760px;
  margin: 14px auto 0;
  color: rgba(233, 238, 247, 0.72);
  font-size: 1rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 24px;
}

.resume-link.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #e9eef7;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.engine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.engine-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 22px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)),
    rgba(13, 19, 38, 0.86);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
}

.engine-card.featured-engine {
  border-color: rgba(109, 242, 197, 0.42);
  box-shadow: 0 20px 70px rgba(72, 220, 181, 0.16);
}

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

.project-card {
  gap: 18px;
  border-radius: 22px;
}

.project-card .engine-head {
  padding-bottom: 4px;
}

.project-intro {
  min-height: 5.2em;
  color: rgba(233, 238, 247, 0.78);
  font-size: 0.98rem;
}

.project-role,
.project-proof {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.055);
}

.project-role b,
.project-proof b,
.project-stack b {
  color: #fff6db;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.project-role span,
.project-proof span {
  color: rgba(233, 238, 247, 0.76);
  line-height: 1.65;
}

.project-stack {
  display: grid;
  gap: 9px;
}

.project-stack p {
  display: grid;
  grid-template-columns: minmax(64px, 0.22fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 9px;
}

.project-stack p:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.project-stack span {
  color: rgba(233, 238, 247, 0.7);
  font-size: 0.9rem;
  line-height: 1.62;
}

.project-card .card-actions {
  margin-top: auto;
}

.engine-head {
  display: grid;
  gap: 8px;
}

.engine-head span,
.vibe-card span {
  color: #6df2c5;
}

.engine-head span {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.engine-head strong {
  color: #fff;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.28;
}

.engine-card p {
  margin: 0;
  color: rgba(233, 238, 247, 0.72);
  line-height: 1.75;
}

.mini-flow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  margin-top: auto;
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.mini-flow b,
.mini-flow i {
  min-width: 0;
  font-size: 0.86rem;
  line-height: 1.55;
}

.mini-flow b {
  color: #fff;
}

.mini-flow i {
  color: rgba(233, 238, 247, 0.68);
  font-style: normal;
}

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

.card-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 10px 14px;
  color: #e9eef7;
  background: rgba(255, 255, 255, 0.055);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.card-link:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 242, 197, 0.46);
  background: rgba(109, 242, 197, 0.09);
}

.card-link.primary {
  border-color: transparent;
  background: #6df2c5;
  color: #081120;
}

.training-grid .vibe-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

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

.methodology-section,
.results-section {
  scroll-margin-top: 82px;
}

.methodology-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: stretch;
}

.section-heading.align-left {
  margin-right: auto;
  margin-left: 0;
  text-align: left;
}

.methodology-panel {
  display: grid;
  gap: 14px;
}

.methodology-panel article {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.methodology-panel strong {
  display: block;
  color: #6df2c5;
  font-size: 1.08rem;
}

.methodology-panel p {
  margin: 10px 0 0;
  color: rgba(233, 238, 247, 0.72);
  line-height: 1.75;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.result-grid article {
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)),
    rgba(13, 19, 38, 0.72);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.result-grid strong {
  display: block;
  color: #f2c879;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1;
}

.result-grid span {
  display: block;
  margin-top: 12px;
  color: rgba(233, 238, 247, 0.75);
  line-height: 1.55;
}

.resume-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.resume-grid article {
  min-height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 22px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(7, 17, 31, 0.78);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.resume-grid span {
  color: #6df2c5;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resume-grid h3 {
  margin: 14px 0 10px;
  color: #fff;
  font-size: 1.2rem;
}

.resume-grid p {
  margin: 0;
  color: rgba(233, 238, 247, 0.72);
  line-height: 1.72;
}

@media (max-width: 1020px) {
  .engine-grid,
  .business-grid,
  .resume-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 720px) {
  .section-lead {
    text-align: left;
  }

  .engine-grid,
  .business-grid,
  .result-grid,
  .resume-grid {
    grid-template-columns: 1fr;
  }

  .engine-card {
    border-radius: 20px;
    padding: 18px;
  }

  #engines.section-block {
    padding-top: 58px;
  }

  #engines .section-heading {
    margin-bottom: 22px;
  }

  #engines .eyebrow {
    font-size: 20px;
    line-height: 1.05;
    letter-spacing: 0.06em;
  }

  #engines h2 {
    font-size: 34px;
    line-height: 1.02;
  }

  #engines .section-lead {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.65;
  }

  .project-grid {
    gap: 14px;
  }

  .project-card {
    gap: 12px;
    border-radius: 18px;
    padding: 16px;
  }

  .project-card .engine-head {
    gap: 5px;
    padding-bottom: 0;
  }

  .project-card .engine-head span {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .project-card .engine-head strong {
    font-size: 1.18rem;
    line-height: 1.25;
  }

  .project-intro {
    min-height: auto;
    font-size: 0.92rem;
    line-height: 1.62;
  }

  .project-role,
  .project-proof {
    gap: 6px;
    border-radius: 14px;
    padding: 11px 12px;
  }

  .project-role b,
  .project-proof b,
  .project-stack b {
    font-size: 0.78rem;
    letter-spacing: 0.03em;
  }

  .project-role span,
  .project-proof span,
  .project-stack span {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .project-stack {
    gap: 7px;
  }

  .project-stack p {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-bottom: 7px;
  }

  .project-card .card-actions {
    gap: 8px;
  }

  .project-card .card-link {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 0.84rem;
  }

  .project-card .card-link::after {
    margin-left: 5px;
  }

  .mj-evolution-section {
    padding: 42px 0;
  }

  .mj-evolution-entry {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 18px;
    padding: 18px;
  }

  .mj-evolution-entry .card-link {
    width: 100%;
  }

  .filter-link {
    width: 100%;
    margin-left: 0;
  }

  .mini-flow {
    grid-template-columns: 1fr;
  }

  .methodology-panel article,
  .result-grid article {
    border-radius: 20px;
    padding: 18px;
  }
}

@media (max-width: 420px) {
  #engines .eyebrow {
    font-size: 18px;
  }

  #engines h2 {
    font-size: 32px;
  }

  .project-card {
    padding: 15px;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Aptos", "Segoe UI", "Microsoft YaHei", sans-serif;
  isolation: isolate;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("assets/space-bg.png");
  background-position: center;
  background-size: cover;
  filter: brightness(0.88) saturate(1.04) contrast(1.05);
  animation: waterDrift 18s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 47% 42%, rgba(255, 207, 126, 0.12), transparent 28%),
    radial-gradient(circle at 50% 50%, transparent 34%, rgba(2, 9, 14, 0.28) 100%),
    linear-gradient(180deg, rgba(2, 7, 12, 0.14), rgba(3, 9, 14, 0.04) 42%, rgba(2, 7, 12, 0.2));
}

@keyframes waterDrift {
  from {
    transform: scale(1) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.05) translate3d(-2.4%, -1.6%, 0);
  }
}

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

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 24px;
  z-index: 20;
  width: min(1134px, calc(100% - 72px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 24px auto 0;
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  background: rgba(6, 14, 22, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    0 18px 48px rgba(0, 75, 102, 0.1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(6, 14, 22, 0.34);
  border-color: rgba(255, 255, 255, 0.3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #1d3440;
  background: linear-gradient(135deg, #ffe7b8, #f4cd8a);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(242, 200, 121, 0.16);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a {
  position: relative;
  min-height: 36px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

.nav-links a:first-child {
  color: var(--gold);
}

.nav-links a:first-child::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: 2px;
  left: 13px;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
}

.nav-links a:hover {
  border-color: rgba(255, 255, 255, 0.72);
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.section-shell {
  width: min(1188px, calc(100% - 96px));
  margin: 0 auto;
}

main,
.section-shell,
.hero {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(297px, 342px) minmax(0, 738px);
  gap: 46px;
  align-items: stretch;
  align-content: start;
  justify-content: center;
  min-height: min(960px, calc(100vh - 132px));
  padding: clamp(82px, 10vh, 122px) 0 clamp(34px, 5vh, 58px);
  transform: translateY(0);
}

.hero-copy {
  width: 100%;
  min-width: 0;
}

.hero-card {
  color: var(--white);
  text-shadow: 0 2px 20px rgba(0, 42, 58, 0.34);
}

.hero-card,
.capability-card {
  padding: clamp(24px, 4vw, 42px);
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.capability-card {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 34px 0 34px 30px;
  color: var(--white);
  text-shadow: 0 2px 18px rgba(0, 20, 30, 0.52);
}

.capability-card::before {
  content: "";
  position: absolute;
  top: 54px;
  bottom: 24px;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(242, 200, 121, 0.64), transparent);
}

.capability-card::after {
  content: "";
  position: absolute;
  top: 72px;
  bottom: 36px;
  left: -4px;
  width: 9px;
  background:
    radial-gradient(circle, var(--gold) 0 2px, transparent 3px) center top / 9px 25% repeat-y;
  opacity: 0.9;
}

.capability-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 2px;
  color: rgba(255, 236, 197, 0.96);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.capability-title span {
  width: 18px;
  height: 1px;
  background: var(--gold-soft);
}

.capability-list {
  display: grid;
  flex: 1;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 22px;
  align-content: stretch;
}

.capability-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 0;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 232, 184, 0.28);
  border-radius: 18px;
  background: rgba(10, 12, 14, 0.34);
  color: var(--white);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 16px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.capability-item:hover {
  transform: translateX(6px);
  background: rgba(24, 20, 16, 0.44);
  box-shadow:
    0 0 0 1px rgba(242, 200, 121, 0.18),
    0 20px 46px rgba(0, 0, 0, 0.22);
}

.capability-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(255, 232, 184, 0.28);
  border-radius: 16px;
  color: rgba(255, 224, 170, 0.98);
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 24px rgba(242, 200, 121, 0.06);
}

.capability-icon svg,
.resume-link svg,
.script-link svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.capability-icon svg {
  width: 36px;
  height: 36px;
}

.capability-icon [href="#icon-video"] {
  fill: rgba(255, 224, 170, 0.22);
}

.capability-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.capability-copy strong {
  font-size: 21px;
}

.capability-copy small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.capability-arrow {
  color: rgba(255, 226, 175, 0.92);
  font-size: 34px;
  line-height: 1;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(255, 226, 175, 0.96);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4.6vw, 58px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.pixel-title {
  color: rgba(255, 248, 232, 0.98);
  font-family: "NSimSun", "SimSun", "Courier New", monospace;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.95),
    0 0 18px rgba(255, 219, 166, 0.36),
    0 8px 34px rgba(0, 0, 0, 0.58);
  -webkit-font-smoothing: none;
  font-smooth: never;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .pixel-title {
    color: transparent;
    background:
      linear-gradient(rgba(255, 250, 236, 0.98), rgba(255, 244, 218, 0.84)),
      repeating-linear-gradient(90deg, transparent 0 7px, rgba(255, 255, 255, 0.34) 7px 8px),
      repeating-linear-gradient(0deg, transparent 0 7px, rgba(255, 255, 255, 0.28) 7px 8px);
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow:
      0 0 20px rgba(255, 219, 166, 0.36),
      0 8px 34px rgba(0, 0, 0, 0.62);
  }
}

h2 {
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 80px);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.18;
}

.hero-subtitle {
  margin-bottom: 24px;
  font-size: clamp(21px, 2.4vw, 30px);
  color: var(--white);
  font-weight: 900;
}

.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-text,
.section-heading p,
.about-copy p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.78;
}

.resume-link {
  position: absolute;
  top: clamp(92px, 14vh, 132px);
  right: 24px;
  display: inline-flex;
  min-width: 236px;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 14px 22px;
  border: 1px solid rgba(255, 232, 184, 0.3);
  border-radius: 16px;
  color: var(--white);
  background: rgba(10, 12, 14, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 46px rgba(0, 0, 0, 0.18);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 2px 18px rgba(0, 20, 30, 0.5);
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.resume-link:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 200, 121, 0.58);
  background: rgba(24, 20, 16, 0.46);
}

.resume-link span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 232, 184, 0.28);
  border-radius: 10px;
  color: rgba(255, 224, 170, 0.98);
  background: rgba(255, 255, 255, 0.06);
}

.resume-link.primary {
  border-color: transparent;
  color: #081120;
  background: #6df2c5;
  text-shadow: none;
}

.resume-link.primary span {
  border-color: rgba(8, 17, 32, 0.18);
  color: #081120;
  background: rgba(255, 255, 255, 0.28);
}

.resume-link svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.9;
}

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

.button,
.filter-chip {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid rgba(255, 232, 184, 0.28);
  border-radius: 999px;
  background: rgba(10, 12, 14, 0.34);
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: none;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.filter-chip:hover {
  transform: translateY(-2px);
}

.button.primary,
.filter-chip.active {
  color: rgba(255, 236, 197, 0.98);
  background: rgba(24, 20, 16, 0.46);
  border-color: rgba(242, 200, 121, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 18px rgba(242, 200, 121, 0.08),
    0 0 0 1px rgba(242, 200, 121, 0.12),
    0 0 24px rgba(242, 200, 121, 0.16);
}

.section-block {
  padding: 88px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.46);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-heading.compact {
  margin-bottom: 0;
}

.mj-evolution-section {
  --mj-bg: #071015;
  --mj-panel: #101a21;
  --mj-panel-soft: #14232c;
  --mj-line: rgba(234, 228, 210, 0.16);
  --mj-text: #f7f1df;
  --mj-muted: rgba(247, 241, 223, 0.66);
  --mj-green: #83f5bd;
  --mj-amber: #f5c36d;
  --mj-blue: #7dd3fc;
  --mj-red: #f39a86;
  padding: 54px 0;
}

.mj-evolution-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(109, 242, 197, 0.26);
  border-radius: 24px;
  padding: clamp(20px, 3vw, 32px);
  background:
    linear-gradient(135deg, rgba(109, 242, 197, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(7, 17, 31, 0.76);
}

.mj-evolution-controls {
  display: grid;
  grid-template-columns: auto 150px 110px;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
}

.mj-size-options {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(48px, 1fr));
  gap: 4px;
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-radius: 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.045);
}

.mj-size-options button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(233, 238, 247, 0.72);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.mj-size-options button.is-active {
  background: var(--mj-green);
  color: #071015;
}

.mj-evolution-entry h2 {
  margin: 8px 0 10px;
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.mj-evolution-entry p:last-child {
  max-width: 760px;
  margin: 0;
  color: rgba(233, 238, 247, 0.74);
  line-height: 1.75;
}

.mj-native-body {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border-radius: 24px;
  border: 1px solid var(--mj-line);
  padding: clamp(12px, 1.6vw, 16px);
  background:
    radial-gradient(circle at 18% 0%, rgba(131, 245, 189, 0.14), transparent 22rem),
    rgba(7, 16, 21, 0.88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.mj-evolution-section:not(.has-output) .mj-native-body {
  display: none;
}

.mj-evolution-section .generation {
  margin: 0;
  color: var(--mj-green);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.mj-evolution-section .preview {
  display: none;
}

.mj-evolution-section .status {
  min-height: 18px;
  margin: 0;
  color: var(--mj-muted);
  font-size: 12px;
  line-height: 1.45;
}

.mj-evolution-section .jobs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.mj-evolution-section .job {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--mj-line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.mj-evolution-section .job-head {
  position: absolute;
  top: 18px;
  right: 18px;
  left: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.mj-evolution-section .job h2 {
  margin: 0;
  color: var(--mj-text);
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.mj-evolution-section .badge {
  border: 1px solid rgba(131, 245, 189, 0.24);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(7, 16, 21, 0.72);
  color: var(--mj-muted);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.mj-evolution-section .badge.running {
  color: var(--mj-amber);
}

.mj-evolution-section .badge.done {
  color: var(--mj-green);
}

.mj-evolution-section .badge.error {
  color: var(--mj-red);
}

.mj-evolution-section .image-box {
  display: grid;
  min-height: 0;
  overflow: hidden;
  border: 1px dashed var(--mj-line);
  border-radius: 11px;
  aspect-ratio: 4 / 5;
  place-items: center;
  color: var(--mj-muted);
  background: var(--mj-panel-soft);
}

.mj-evolution-section .image-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mj-evolution-section .ops {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mj-evolution-section .ops button,
.mj-evolution-section .gallery-actions button,
.mj-evolution-section .gallery-actions a,
.mj-evolution-section .gallery-close {
  min-height: 32px;
  border: 1px solid var(--mj-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--mj-text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.mj-evolution-section button {
  cursor: pointer;
}

.mj-evolution-section button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.mj-evolution-section .evolve-button {
  padding: 0 12px;
  border-color: rgba(131, 245, 189, 0.45);
  background: rgba(131, 245, 189, 0.14);
}

.mj-evolution-section .rollback-button {
  padding: 0 12px;
  border-color: rgba(245, 195, 109, 0.38);
  background: rgba(245, 195, 109, 0.11);
  color: var(--mj-amber);
}

.mj-evolution-section .download-button {
  padding: 0 12px;
  border-color: rgba(125, 211, 252, 0.45);
  background: rgba(125, 211, 252, 0.12);
}

.mj-evolution-section .mj-actions {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  border: 1px solid var(--mj-line);
  border-radius: 10px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.mj-evolution-section .mj-actions-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--mj-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mj-evolution-section .mj-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.mj-evolution-section .mj-action-button {
  min-height: 28px;
  border-radius: 8px;
  font-size: 11px;
}

.mj-evolution-section .mj-action-button.upscale {
  border-color: rgba(245, 195, 109, 0.34);
  color: var(--mj-amber);
}

.mj-evolution-section .mj-action-button.variation {
  border-color: rgba(131, 245, 189, 0.34);
  color: var(--mj-green);
}

.mj-evolution-section .mj-action-button.jimeng-upscale {
  border-color: rgba(125, 211, 252, 0.38);
  background: rgba(125, 211, 252, 0.1);
}

.mj-evolution-section .mj-action-button.reroll {
  grid-column: 1 / -1;
}

.mj-evolution-section .mj-action-empty,
.mj-evolution-section .job-direction,
.mj-evolution-section .job-error,
.mj-evolution-section .jimeng-result-note,
.mj-evolution-section .jimeng-result-error {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
}

.mj-evolution-section .mj-action-empty,
.mj-evolution-section .job-direction,
.mj-evolution-section .jimeng-result-note {
  color: var(--mj-muted);
}

.mj-evolution-section .job-error,
.mj-evolution-section .jimeng-result-error {
  color: var(--mj-red);
}

.mj-evolution-section .jimeng-result {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 10px;
  padding: 7px;
  background: rgba(125, 211, 252, 0.07);
}

.mj-evolution-section .jimeng-result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--mj-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.mj-evolution-section .jimeng-result-title::-webkit-details-marker {
  display: none;
}

.mj-evolution-section .jimeng-result-image {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  overflow: hidden;
  border: 1px dashed rgba(125, 211, 252, 0.35);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.mj-evolution-section .jimeng-result .download-button {
  min-height: 30px;
  white-space: nowrap;
}

.mj-evolution-section .gallery-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.48);
}

.mj-evolution-section .gallery-backdrop[hidden],
.mj-evolution-section .gallery-drawer[hidden] {
  display: none;
}

.mj-evolution-section .gallery-drawer {
  position: fixed;
  top: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 81;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(420px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 18px;
  background: rgba(7, 16, 21, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
}

.mj-evolution-section .gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--mj-line);
  padding: 14px;
}

.mj-evolution-section .gallery-head h2 {
  margin: 0;
  color: var(--mj-text);
  font-size: 18px;
  letter-spacing: 0;
}

.mj-evolution-section .gallery-close {
  width: 38px;
  min-height: 38px;
  border-radius: 999px;
}

.mj-evolution-section .gallery-list {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 14px;
}

.mj-evolution-section .gallery-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--mj-line);
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.mj-evolution-section .gallery-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.mj-evolution-section .gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--mj-muted);
  font-size: 12px;
  font-weight: 800;
}

.mj-evolution-section .gallery-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.mj-evolution-section .gallery-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.mj-evolution-section details {
  color: var(--mj-muted);
  font-size: 12px;
}

.mj-evolution-section summary {
  cursor: pointer;
}

.mj-evolution-section pre {
  max-height: 190px;
  overflow: auto;
  margin-bottom: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 980px) {
  .mj-evolution-entry {
    align-items: flex-start;
    flex-direction: column;
  }

  .mj-evolution-controls {
    width: 100%;
    grid-template-columns: 1fr 150px 110px;
  }

  .mj-evolution-section .jobs {
    grid-template-columns: 1fr;
  }

  .mj-evolution-section .image-box {
    min-height: 220px;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 720px) {
  .mj-evolution-section {
    padding: 42px 0;
  }

  .mj-evolution-entry {
    border-radius: 18px;
    padding: 18px;
  }

  .mj-evolution-controls {
    grid-template-columns: 1fr;
  }

  .mj-size-options {
    width: 100%;
  }

  .mj-evolution-entry .card-link {
    width: 100%;
  }

  .mj-native-body {
    border-radius: 18px;
  }

  .mj-evolution-section .mj-action-grid,
  .mj-evolution-section .gallery-actions {
    grid-template-columns: 1fr;
  }

  .mj-evolution-section .gallery-drawer {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: calc(100vh - 36px);
  }
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 12px 18px;
  border: 1px solid rgba(109, 242, 197, 0.38);
  border-radius: 999px;
  background: rgba(109, 242, 197, 0.12);
  color: #e9fff8;
  font-size: 0.95rem;
  font-weight: 900;
}

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

.work-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  border: 1px solid rgba(255, 232, 184, 0.18);
  border-radius: 18px;
  background: rgba(10, 12, 14, 0.36);
  overflow: hidden;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
  backdrop-filter: none;
}

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

.media-placeholder {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.46), transparent 20%),
    linear-gradient(135deg, rgba(8, 122, 134, 0.92), transparent 52%),
    linear-gradient(315deg, rgba(240, 90, 66, 0.78), transparent 46%),
    linear-gradient(135deg, var(--night), #17485a);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 900;
}

.work-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: #101416;
  cursor: pointer;
  overflow: hidden;
}

.work-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.work-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(0, 0, 0, 0.42));
  pointer-events: none;
}

.work-media:hover img {
  transform: scale(1.035);
  filter: brightness(1.06);
}

.work-media.image-only {
  cursor: default;
}

.work-media.image-only:hover img {
  transform: none;
  filter: none;
}

.play-badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  padding: 8px 13px;
  border: 1px solid rgba(255, 232, 184, 0.34);
  border-radius: 999px;
  color: var(--white);
  background: rgba(10, 12, 14, 0.42);
  font-size: 13px;
  font-weight: 900;
}

.work-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.tag {
  align-self: flex-start;
  margin-bottom: 16px;
  padding: 6px 10px;
  border: 1px solid rgba(8, 122, 134, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.work-content p,
.work-content li,
.tool-stack p,
.ability-showcase p,
.ability-showcase li {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.68;
}

.work-content ul {
  margin: auto 0 0;
  padding-left: 18px;
}

.script-link {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 10px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 232, 184, 0.3);
  border-radius: 999px;
  color: var(--white);
  background: rgba(10, 12, 14, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 34px rgba(0, 0, 0, 0.16);
  font-size: 13px;
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.script-link:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 200, 121, 0.58);
  background: rgba(24, 20, 16, 0.46);
}

.script-link span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(255, 232, 184, 0.28);
  border-radius: 7px;
  color: rgba(255, 224, 170, 0.98);
  background: rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
}

.script-link svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.9;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(1, 4, 7, 0.76);
}

.video-modal.is-open {
  display: flex;
}

.video-modal-panel {
  position: relative;
  width: min(1080px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 232, 184, 0.24);
  border-radius: 18px;
  background: rgba(10, 12, 14, 0.92);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.video-modal-panel h3 {
  margin: 0 44px 16px 0;
  color: var(--white);
}

.video-modal video {
  display: block;
  width: 100%;
  max-height: 76vh;
  border-radius: 12px;
  background: #000;
}

.video-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: start;
}

.text-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--accent);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 5px;
}

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

.tool-stack article,
.ability-panel {
  scroll-margin-top: 96px;
}

.tool-stack article,
.ability-panel {
  padding: 22px;
  border: 1px solid rgba(255, 232, 184, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.08), transparent 46%),
    rgba(10, 12, 14, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 46px rgba(0, 0, 0, 0.18);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.tool-stack span {
  display: block;
  margin-bottom: 16px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.vibe-section .section-heading {
  margin-bottom: 28px;
}

.vibe-section .eyebrow {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  letter-spacing: 0.08em;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.42);
}

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

.vibe-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(255, 232, 184, 0.18);
  border-radius: 18px;
  background: rgba(10, 12, 14, 0.36);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
}

.vibe-card:first-child {
  grid-column: span 2;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  grid-template-rows: none;
}

.vibe-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 238px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.vibe-card:not(:first-child) img {
  aspect-ratio: 16 / 9;
}

.vibe-card div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
}

.vibe-card span {
  display: block;
  margin-bottom: 14px;
  color: rgba(255, 226, 175, 0.96);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vibe-card h3 {
  margin-bottom: 12px;
}

.vibe-card p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  line-height: 1.72;
}

.ability-showcase {
  display: grid;
  gap: 22px;
}

.ability-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: center;
}

.operation-panel {
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.45fr);
}

.ability-copy span {
  display: block;
  margin-bottom: 12px;
  color: rgba(255, 226, 175, 0.96);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ability-copy h3 {
  margin-bottom: 16px;
  font-size: 30px;
}

.ability-copy ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.ability-copy li::marker {
  color: var(--gold);
}

.ability-copy mark {
  color: #ffdd8a;
  background: transparent;
  font-weight: 900;
}

.ability-copy strong {
  color: var(--white);
}

.ability-media {
  min-width: 0;
  justify-self: end;
  width: 100%;
}

.ability-media.single img,
.ability-media figure img {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 232, 184, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.ability-media.single img {
  max-height: 340px;
  object-fit: contain;
  object-position: top center;
}

#data-analysis .ability-media.single img {
  max-width: 320px;
}

.ability-media.pair {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  align-items: start;
  justify-self: end;
}

.ability-media figure {
  margin: 0;
}

.ability-media.pair img {
  height: 200px;
  object-fit: contain;
  object-position: top center;
}

.ability-media.pair img.doc-image {
  height: auto;
  max-height: none;
  aspect-ratio: 1280 / 624;
}

.ability-media.pair figure:first-child img {
  object-fit: contain;
}

.ability-media.single {
  display: flex;
  justify-content: flex-end;
}

.ability-media.single img {
  width: auto;
  max-width: 100%;
}

.operation-panel .ability-media.single img {
  max-height: 330px;
}

.ability-media figcaption {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  text-align: center;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.6fr) minmax(0, 1.4fr);
  gap: 40px;
}

.contact-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(8, 122, 134, 0.82), rgba(11, 36, 48, 0.92)),
    var(--night);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.contact-card button,
.contact-card a,
.contact-card span {
  padding-bottom: 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: inherit;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.contact-card a {
  text-decoration: none;
}

.contact-card span {
  border-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
  cursor: default;
}

.hero-contact-card {
  width: min(100%, 520px);
  margin-top: 28px;
  padding: 22px 24px;
  background:
    linear-gradient(135deg, rgba(5, 77, 86, 0.9), rgba(8, 28, 38, 0.94)),
    var(--night);
}

.hero-contact-card button,
.hero-contact-card a,
.hero-contact-card span {
  font-size: 17px;
  line-height: 1.35;
}

.copy-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  padding: 11px 16px;
  border: 1px solid rgba(255, 232, 184, 0.28);
  border-radius: 999px;
  color: var(--white);
  background: rgba(10, 12, 14, 0.74);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
  color: rgba(233, 238, 247, 0.68);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(233, 238, 247, 0.34);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.72);
}

@media (min-width: 961px) {
  :root {
    --ui-scale: 0.9;
  }

  .site-header,
  main {
    zoom: var(--ui-scale);
  }

  .hero {
    min-height: calc((100vh - 76px) / var(--ui-scale));
  }
}

@media (max-width: 960px) {
  .hero,
  .split-section,
  .about-section {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 1;
  }

  .capability-card {
    order: 2;
  }

  .vibe-grid,
  .vibe-card:first-child {
    grid-template-columns: 1fr;
  }

  .ability-panel,
  .ability-media.pair {
    grid-template-columns: 1fr;
  }

  .vibe-card:first-child {
    grid-column: span 1;
  }

  .capability-card {
    width: 100%;
    padding-left: 30px;
  }

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

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

  .resume-link {
    position: static;
    width: fit-content;
    margin-bottom: 8px;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    width: min(100% - 28px, 1180px);
    padding: 10px 12px;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px;
  }

  .brand {
    flex-shrink: 0;
    gap: 8px;
    font-size: 11px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .nav-links a {
    min-height: 30px;
    padding: 7px 5px;
    font-size: 11px;
    white-space: nowrap;
  }

  .nav-links a:first-child::after {
    right: 5px;
    left: 5px;
  }

  .section-shell {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    min-height: auto;
    padding-top: 32px;
    transform: none;
  }

  .hero-card,
  .capability-card {
    padding-right: 0;
    padding-left: 0;
  }

  .work-grid,
  .vibe-grid,
  .ability-showcase {
    grid-template-columns: 1fr;
  }

  .vibe-card img,
  .vibe-card:first-child img {
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .vibe-card div {
    padding: 20px;
  }

  .ability-panel {
    padding: 20px;
  }

  .ability-media,
  .ability-media.single,
  .ability-media.pair {
    width: 100%;
    justify-self: stretch;
  }

  .ability-media.single img,
  #data-analysis .ability-media.single img,
  .operation-panel .ability-media.single img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
  }

  .ability-media.pair img,
  .ability-media.pair img.doc-image {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
  }

  .capability-list {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 10px;
  }

  .capability-item {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
  }

  .capability-icon {
    width: 40px;
    height: 40px;
  }

  .capability-icon svg {
    width: 25px;
    height: 25px;
  }

  .capability-copy {
    gap: 3px;
  }

  .capability-copy strong {
    font-size: 15px;
    line-height: 1.2;
  }

  .capability-copy small {
    font-size: 11px;
    line-height: 1.3;
  }

  .capability-arrow {
    display: none;
  }

  .media-placeholder {
    min-height: 190px;
  }
}

.hero-actions .resume-link {
  position: static;
  top: auto;
  right: auto;
  min-width: auto;
  min-height: 48px;
  padding: 12px 18px;
  font-size: 16px;
}

.hero-actions .resume-link.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #e9eef7;
  border-color: rgba(255, 255, 255, 0.16);
}

.hero-copy .pixel-title {
  max-width: 780px;
  letter-spacing: 0;
}

.hero-copy .hero-subtitle {
  max-width: 820px;
}

.hero-identity {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 18px;
}

.hero-identity p {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  margin: 0;
  border: 1px solid rgba(255, 232, 184, 0.24);
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(10, 12, 14, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-identity strong {
  color: #fff6db;
  font-size: 15px;
}

.hero-identity span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

@media (max-width: 720px) {
  .hero-identity {
    display: grid;
  }

  .hero-identity p {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 720px) {
  .hero-copy .pixel-title {
    max-width: 100%;
    font-size: clamp(38px, 10.5vw, 46px);
    line-height: 1.06;
    overflow-wrap: anywhere;
  }

  .hero-copy .hero-subtitle {
    max-width: 100%;
    font-size: 20px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .hero-contact-card {
    width: 100%;
    margin-top: 20px;
    padding: 20px;
  }

  .hero-contact-card button,
  .hero-contact-card a,
  .hero-contact-card span {
    font-size: 16px;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .capability-list {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .capability-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }
}

/* Technical resume homepage refresh */
:root {
  --resume-bg: #070a11;
  --resume-bg-2: #0b1220;
  --resume-panel: rgba(15, 23, 34, 0.9);
  --resume-panel-soft: rgba(255, 255, 255, 0.05);
  --resume-border: rgba(224, 232, 240, 0.14);
  --resume-border-strong: rgba(125, 211, 252, 0.34);
  --resume-text: #f7f2e8;
  --resume-muted: rgba(225, 232, 240, 0.76);
  --resume-faint: rgba(225, 232, 240, 0.55);
  --resume-accent: #7dd3fc;
  --resume-mint: #80f7c8;
  --resume-warm: #f0c979;
  --resume-rose: #f6a192;
  --resume-shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
}

body {
  background: var(--resume-bg);
}

body::before {
  background:
    linear-gradient(115deg, rgba(125, 211, 252, 0.12), transparent 24%),
    linear-gradient(245deg, rgba(240, 201, 121, 0.1), transparent 26%),
    linear-gradient(180deg, #111827 0%, #070a11 44%, #0b1220 100%);
  filter: none;
  animation: none;
}

body::after {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%);
  opacity: 0.72;
}

.site-header,
main {
  zoom: 1;
}

.site-header {
  top: 14px;
  width: min(1188px, calc(100% - 48px));
  margin-top: 14px;
  border-radius: 12px;
  background: rgba(7, 13, 21, 0.86);
  border-color: var(--resume-border);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.18);
}

.site-header.is-scrolled {
  background: rgba(7, 13, 21, 0.94);
  border-color: rgba(109, 242, 197, 0.22);
}

.section-shell {
  width: min(1188px, calc(100% - 48px));
}

.resume-hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 22px;
  min-height: auto;
  align-items: stretch;
  justify-content: center;
  padding: 54px 0 30px;
}

.resume-hero-main,
.resume-hero-panel {
  min-width: 0;
  border: 1px solid var(--resume-border);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    linear-gradient(180deg, rgba(125, 211, 252, 0.055), transparent 34%),
    var(--resume-panel);
  box-shadow: var(--resume-shadow);
}

.resume-hero-main {
  padding: clamp(28px, 4vw, 42px);
}

.resume-hero-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.resume-hero .pixel-title {
  max-width: 100%;
  margin-bottom: 10px;
  color: var(--resume-text);
  background: none;
  font-family: "Aptos", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: clamp(46px, 6vw, 72px);
  font-weight: 900;
  line-height: 0.98;
  text-shadow: none;
  -webkit-text-fill-color: currentColor;
  -webkit-font-smoothing: antialiased;
  font-smooth: auto;
}

.resume-hero .eyebrow {
  color: var(--resume-warm);
}

.resume-hero .hero-subtitle {
  max-width: 760px;
  margin-bottom: 14px;
  color: #fff;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.18;
  text-wrap: balance;
}

.resume-hero .hero-text {
  max-width: 760px;
  margin: 0;
  color: var(--resume-muted);
  font-size: 16px;
  line-height: 1.78;
}

.resume-hero .hero-identity {
  margin: 22px 0 0;
}

.resume-hero .hero-identity p {
  min-height: 40px;
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.resume-hero .hero-identity strong {
  color: #fff;
}

.resume-hero .hero-identity span {
  color: var(--resume-muted);
}

.resume-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.resume-cta-row .resume-link,
.hero-actions .resume-link {
  position: static;
  inset: auto;
  min-width: auto;
  min-height: 44px;
  margin: 0;
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
  font-size: 15px;
}

.resume-cta-row .resume-link.primary {
  background: linear-gradient(135deg, var(--resume-mint), var(--resume-accent));
  color: #06111a;
}

.resume-cta-row .resume-link.ghost {
  color: var(--resume-muted);
  background: transparent;
}

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

.resume-metrics article {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 14px;
  background: var(--resume-panel-soft);
}

.resume-metrics strong {
  display: block;
  color: var(--resume-mint);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.resume-render {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 14px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(125, 211, 252, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(3, 8, 14, 0.46);
}

.resume-render::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 24px 24px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent);
  pointer-events: none;
}

.render-head,
.render-flow,
.render-bars {
  position: relative;
  z-index: 1;
}

.render-head {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--resume-warm);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.render-head span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--resume-mint);
  box-shadow: 0 0 18px rgba(128, 247, 200, 0.36);
}

.render-flow {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.render-flow span {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  padding: 7px 9px;
  color: rgba(247, 242, 232, 0.9);
  background: rgba(7, 10, 17, 0.54);
  font-size: 12px;
  font-weight: 800;
}

.render-flow i {
  height: 1px;
  background: linear-gradient(90deg, rgba(125, 211, 252, 0.2), rgba(128, 247, 200, 0.72));
}

.render-bars {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.render-bars span {
  display: block;
  width: var(--w);
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--resume-accent), var(--resume-mint));
  opacity: 0.86;
}

.resume-metrics span {
  display: block;
  margin-top: 7px;
  color: var(--resume-muted);
  font-size: 13px;
  line-height: 1.5;
}

.resume-stack-summary {
  display: grid;
  gap: 10px;
}

.resume-stack-summary p {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 12px;
}

.resume-stack-summary b {
  color: #fff6db;
  font-size: 13px;
}

.resume-stack-summary span {
  color: var(--resume-muted);
  font-size: 14px;
  line-height: 1.65;
}

.hero-contact-card {
  width: 100%;
  margin-top: 0;
  padding: 16px;
  border-radius: 12px;
  background: rgba(3, 10, 16, 0.44);
  box-shadow: none;
}

.hero-contact-card button,
.hero-contact-card a,
.hero-contact-card span {
  font-size: 15px;
}

#engines.section-block {
  padding-top: 28px;
}

.vibe-section .section-heading.compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: none;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.vibe-section .section-heading.compact::after {
  content: "全部 7 个代表项目，按面试浏览节奏压缩展示。";
  max-width: 420px;
  color: var(--resume-faint);
  font-size: 14px;
  line-height: 1.6;
  text-align: right;
}

.vibe-section .section-heading.compact .eyebrow,
.vibe-section .section-heading.compact h2 {
  grid-column: 1;
}

.vibe-section .eyebrow {
  margin-bottom: 8px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-shadow: none;
}

.vibe-section .section-heading.compact h2 {
  margin-bottom: 0;
}

h2 {
  color: var(--resume-text);
  font-family: "Aptos", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.08;
}

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

.engine-card.project-card {
  gap: 12px;
  border-radius: 14px;
  padding: 18px;
  border-color: var(--resume-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(7, 12, 20, 0.9);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.engine-card.project-card.featured-engine {
  border-color: rgba(125, 211, 252, 0.24);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.project-card .engine-head {
  gap: 5px;
  padding-bottom: 0;
}

.engine-head span {
  color: var(--resume-mint);
  font-size: 12px;
}

.engine-head strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.25;
}

.project-intro {
  min-height: 0;
  display: -webkit-box;
  color: var(--resume-muted);
  font-size: 15px;
  line-height: 1.65;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.project-role,
.project-proof {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0;
  padding: 10px 0 0;
  background: transparent;
}

.project-role b,
.project-proof b,
.project-stack b {
  color: #fff6db;
  font-size: 12px;
}

.project-role span,
.project-proof span {
  color: var(--resume-muted);
  font-size: 14px;
  line-height: 1.6;
}

.project-stack {
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 10px;
}

.project-stack p {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 0;
  padding-bottom: 0;
}

.project-stack span {
  color: var(--resume-faint);
  font-size: 13px;
  line-height: 1.55;
}

.card-actions {
  gap: 8px;
}

.card-link {
  min-height: 38px;
  padding: 9px 12px;
  border-color: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  box-shadow: none;
}

.card-link.primary {
  background: linear-gradient(135deg, var(--resume-mint), var(--resume-accent));
  color: #06111a;
  border-color: transparent;
}

.section-block {
  padding: 64px 0;
  border-top-color: rgba(255, 255, 255, 0.12);
}

#showreel.section-block {
  padding-top: 54px;
}

#showreel .section-heading {
  max-width: 820px;
  margin-bottom: 20px;
}

.filter-bar {
  gap: 8px;
  margin-bottom: 18px;
}

.filter-chip,
.filter-link {
  min-height: 38px;
  padding: 9px 13px;
  font-size: 13px;
}

.work-grid {
  gap: 14px;
}

.work-card {
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(7, 12, 20, 0.78);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.16);
}

.work-media {
  aspect-ratio: 16 / 9;
}

.work-media img,
.vibe-card img,
.ability-media img {
  height: 100%;
  object-fit: cover;
}

.work-content {
  padding: 16px;
}

.work-content p,
.work-content li {
  font-size: 14px;
  line-height: 1.62;
}

a:focus-visible,
button:focus-visible,
.card-link:focus-visible,
.filter-chip:focus-visible {
  outline: 3px solid rgba(109, 242, 197, 0.82);
  outline-offset: 3px;
}

@media (min-width: 961px) {
  :root {
    --ui-scale: 1;
  }

  .site-header,
  main {
    zoom: 1;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 960px) {
  .resume-hero {
    grid-template-columns: 1fr;
    padding-top: 34px;
  }

  .resume-hero-panel {
    order: 2;
  }

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

@media (max-width: 720px) {
  .site-header {
    width: calc(100vw - 28px);
    margin-right: 14px;
    margin-left: 14px;
  }

  .section-shell {
    width: calc(100vw - 28px);
    margin-right: 14px;
    margin-left: 14px;
  }

  .resume-hero {
    padding-top: 24px;
    gap: 14px;
  }

  .resume-hero-main,
  .resume-hero-panel {
    border-radius: 14px;
  }

  .resume-hero-main,
  .resume-hero-panel {
    padding: 18px;
  }

  .resume-hero .pixel-title {
    font-size: clamp(42px, 13vw, 58px);
  }

  .resume-hero .hero-subtitle {
    font-size: 22px;
  }

  .resume-hero .hero-text {
    font-size: 15px;
  }

  .resume-hero .hero-identity {
    display: grid;
    gap: 8px;
  }

  .resume-hero .hero-identity p {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

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

  .resume-stack-summary p,
  .project-role,
  .project-proof,
  .project-stack p {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .vibe-section .section-heading.compact {
    display: block;
  }

  .vibe-section .section-heading.compact::after {
    display: block;
    max-width: none;
    margin-top: 8px;
    text-align: left;
  }

  #engines.section-block {
    padding-top: 24px;
  }
}

@media (max-width: 420px) {
  .resume-metrics {
    grid-template-columns: 1fr;
  }

  .resume-cta-row .resume-link {
    width: 100%;
  }
}

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

/* Genetic character evolution preview */
.character-evolution-section {
  scroll-margin-top: 96px;
}

.evolution-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 460px) auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.evolution-heading .section-lead {
  margin: 0;
  text-align: right;
}

.evolution-toggle {
  justify-self: end;
  white-space: nowrap;
}

.evolution-panel {
  display: grid;
  gap: 16px;
}

.evolution-panel[hidden] {
  display: none;
}

.evolution-stage {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(224, 232, 240, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(5, 9, 14, 0.9);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
}

.evolution-toolbar,
.evolution-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.evolution-status {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.evolution-status span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(128, 247, 200, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--resume-mint);
  font-size: 13px;
  font-weight: 900;
}

.character-evolution-section.has-error .evolution-status span {
  border-color: rgba(246, 161, 146, 0.42);
  color: var(--resume-rose);
}

.evolution-status strong {
  color: #fff6db;
  font-size: 14px;
}

.evolution-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

button.card-link {
  font: inherit;
  cursor: pointer;
}

button.card-link:disabled,
.character-evolution-section.is-busy button:not([data-evolution-close]) {
  cursor: wait;
  opacity: 0.66;
}

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

.evolution-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.78);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.evolution-card.is-focused {
  border-color: rgba(128, 247, 200, 0.46);
}

.evolution-card.is-selected {
  border-color: rgba(242, 200, 121, 0.7);
}

.evolution-card.is-empty {
  min-height: 420px;
  place-items: center;
  padding: 18px;
  color: var(--resume-faint);
  font-size: 14px;
}

.evolution-card.is-skeleton {
  gap: 12px;
  min-height: 420px;
  padding: 12px;
}

.evolution-card.is-skeleton div,
.evolution-card.is-skeleton span {
  display: block;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.evolution-card.is-skeleton div {
  min-height: 310px;
}

.evolution-card.is-skeleton span {
  min-height: 18px;
}

.evolution-media {
  display: grid;
  width: 100%;
  min-height: 0;
  aspect-ratio: 9 / 13;
  place-items: center;
  overflow: hidden;
  border: 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--resume-faint);
  cursor: pointer;
}

.evolution-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.evolution-card-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.evolution-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.evolution-card-head h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.2;
}

.evolution-card-head span {
  flex: 0 0 auto;
  color: var(--resume-mint);
  font-size: 12px;
  font-weight: 900;
}

.evolution-card-body p {
  margin: 0;
  color: var(--resume-muted);
  font-size: 14px;
  line-height: 1.55;
}

.evolution-chip-row {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.evolution-chip-row b,
.evolution-chip-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.2;
}

.evolution-chip-row b {
  color: #06111a;
  background: var(--resume-mint);
}

.evolution-chip-row.is-mutated b {
  background: #f2c879;
}

.evolution-chip-row span {
  color: rgba(233, 238, 247, 0.84);
  background: rgba(255, 255, 255, 0.08);
}

.evolution-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.evolution-footer {
  color: var(--resume-faint);
  font-size: 14px;
  line-height: 1.5;
}

.evolution-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: stretch;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.5);
}

.evolution-drawer.is-open {
  display: flex;
}

.evolution-drawer-panel {
  width: min(520px, calc(100vw - 24px));
  height: 100%;
  overflow-y: auto;
  border-left: 1px solid rgba(224, 232, 240, 0.16);
  background: #080c12;
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.34);
}

.evolution-drawer-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 18, 0.96);
}

.evolution-drawer-head span {
  display: block;
  color: var(--resume-mint);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evolution-drawer-head strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 22px;
}

.evolution-drawer-head button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 24px;
  cursor: pointer;
}

.evolution-gene-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 18px;
}

.evolution-gene-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.evolution-gene-item b {
  color: #fff6db;
  font-size: 12px;
}

.evolution-gene-item span {
  color: rgba(233, 238, 247, 0.86);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 960px) {
  .evolution-heading {
    grid-template-columns: 1fr;
  }

  .evolution-heading .section-lead {
    text-align: left;
  }

  .evolution-toggle {
    justify-self: start;
  }

  .evolution-candidates {
    grid-template-columns: 1fr;
  }

  .evolution-media {
    aspect-ratio: 9 / 12;
  }
}

@media (max-width: 720px) {
  .evolution-stage {
    padding: 12px;
  }

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

  .evolution-actions,
  .evolution-actions .card-link,
  .evolution-actions .button,
  .evolution-toggle,
  .evolution-card-actions .card-link {
    width: 100%;
  }

  .evolution-gene-grid {
    grid-template-columns: 1fr;
  }
}

/* Lightweight homepage canvas */
:root {
  --resume-mint: #80f7c8;
  --resume-rose: #f6a192;
}

.lite-canvas-section {
  scroll-margin-top: 96px;
}

.lite-canvas-heading {
  margin-bottom: 18px;
}

.video-replica-section {
  scroll-margin-top: 96px;
}

.video-replica-panel {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(255, 232, 184, 0.18);
  border-radius: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(14, 165, 164, 0.14), rgba(240, 90, 66, 0.08)),
    rgba(10, 12, 14, 0.48);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.18);
}

.video-replica-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 18px;
  align-items: end;
}

.video-replica-copy {
  display: grid;
  gap: 8px;
}

.video-replica-copy h3 {
  margin: 0;
  color: var(--white);
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.02;
}

.video-replica-copy p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.video-replica-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px auto;
  gap: 10px;
}

.video-replica-upload {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 1px dashed rgba(255, 232, 184, 0.34);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.video-replica-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.video-replica-upload span {
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-replica-ratio {
  display: grid;
  gap: 5px;
}

.video-replica-ratio span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.video-replica-ratio select {
  min-height: 48px;
  width: 100%;
  border: 1px solid rgba(255, 232, 184, 0.22);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--white);
  background: rgba(4, 8, 14, 0.72);
  outline: none;
}

.video-replica-status {
  min-height: 42px;
  border: 1px solid rgba(224, 232, 240, 0.12);
  border-radius: 12px;
  padding: 11px 13px;
  color: var(--muted);
  background: rgba(4, 8, 14, 0.52);
  font-size: 13px;
  font-weight: 760;
}

.video-replica-status[data-state="running"] {
  border-color: rgba(240, 201, 121, 0.34);
  color: var(--resume-warm);
}

.video-replica-status[data-state="success"] {
  border-color: rgba(128, 247, 200, 0.34);
  color: var(--resume-mint);
}

.video-replica-status[data-state="error"] {
  border-color: rgba(246, 161, 146, 0.44);
  color: var(--resume-rose);
}

.video-replica-result {
  display: block;
  width: min(100%, 380px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border: 1px solid rgba(224, 232, 240, 0.14);
  border-radius: 16px;
  background: #09090b;
  object-fit: contain;
}

.video-replica-result[hidden] {
  display: none;
}

.video-replica-result[data-ratio="16:9"] {
  width: min(100%, 920px);
  aspect-ratio: 16 / 9;
}

.video-replica-result[data-ratio="21:9"] {
  width: min(100%, 1040px);
  aspect-ratio: 21 / 9;
}

.video-replica-result[data-ratio="1:1"] {
  width: min(100%, 520px);
  aspect-ratio: 1 / 1;
}

.video-replica-result[data-ratio="3:4"] {
  width: min(100%, 420px);
  aspect-ratio: 3 / 4;
}

.video-replica-result[data-ratio="4:3"] {
  width: min(100%, 720px);
  aspect-ratio: 4 / 3;
}

.video-replica-cases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.video-replica-case {
  overflow: hidden;
  border: 1px solid rgba(224, 232, 240, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.video-replica-case .work-media {
  aspect-ratio: 9 / 16;
}

.video-replica-case .work-media[data-ratio="16:9"] {
  aspect-ratio: 16 / 9;
}

.video-replica-case .work-media[data-ratio="21:9"] {
  aspect-ratio: 21 / 9;
}

.video-replica-case .work-media[data-ratio="1:1"] {
  aspect-ratio: 1 / 1;
}

.video-replica-case .work-media[data-ratio="3:4"] {
  aspect-ratio: 3 / 4;
}

.video-replica-case .work-media[data-ratio="4:3"] {
  aspect-ratio: 4 / 3;
}

.video-replica-case .work-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-replica-case > div {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.video-replica-case b {
  color: var(--white);
  font-size: 14px;
}

.video-replica-case > div span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.video-replica-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(224, 232, 240, 0.16);
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 760;
  text-align: center;
}

.huabu-lite-embed {
  overflow: hidden;
  border: 1px solid rgba(224, 232, 240, 0.14);
  border-radius: 16px;
  background: #09090b;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
}

.huabu-lite-frame {
  display: block;
  width: 100%;
  height: min(78vh, 780px);
  min-height: 680px;
  border: 0;
  background: #09090b;
}

.lite-canvas-tool {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  min-height: 690px;
  overflow: hidden;
  border: 1px solid rgba(224, 232, 240, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(6, 10, 18, 0.88);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
}

.lite-canvas-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border-right: 1px solid rgba(224, 232, 240, 0.12);
  background: rgba(7, 12, 20, 0.86);
}

.lite-panel-top {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.lite-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 100%;
  border: 1px solid rgba(240, 201, 121, 0.28);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--resume-warm);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.lite-status-pill[data-state="ok"] {
  border-color: rgba(128, 247, 200, 0.38);
  color: var(--resume-mint);
}

.lite-status-pill[data-state="error"] {
  border-color: rgba(246, 161, 146, 0.42);
  color: var(--resume-rose);
}

.lite-icon-btn,
.lite-btn,
.lite-mini-btn,
.lite-node-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(224, 232, 240, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--resume-text);
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.lite-icon-btn {
  width: 38px;
  flex: 0 0 auto;
  padding: 0;
  font-size: 18px;
}

.lite-btn {
  min-width: 0;
  padding: 10px 11px;
  font-size: 13px;
}

.lite-mini-btn,
.lite-node-actions button {
  min-height: 30px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 11px;
}

.lite-icon-btn:hover,
.lite-btn:hover,
.lite-mini-btn:hover,
.lite-node-actions button:hover {
  transform: translateY(-1px);
  border-color: rgba(128, 247, 200, 0.34);
  background: rgba(128, 247, 200, 0.08);
}

.lite-btn:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.lite-btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--resume-mint), var(--resume-accent));
  color: #06111a;
}

.lite-btn.run {
  grid-column: 1 / -1;
  border-color: transparent;
  background: linear-gradient(135deg, #f0c979, #80f7c8);
  color: #06111a;
}

.lite-btn.subtle {
  color: var(--resume-faint);
}

.lite-field,
.lite-field-grid {
  min-width: 0;
}

.lite-field {
  display: grid;
  gap: 7px;
}

.lite-field span {
  color: var(--resume-faint);
  font-size: 12px;
  font-weight: 850;
}

.lite-field select,
.lite-field input,
.lite-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(224, 232, 240, 0.13);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--resume-text);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  outline: none;
}

.lite-field select,
.lite-field input {
  min-height: 40px;
  padding: 0 10px;
}

.lite-field textarea {
  min-height: 118px;
  resize: vertical;
  padding: 10px;
}

.lite-field select:focus,
.lite-field input:focus,
.lite-field textarea:focus {
  border-color: rgba(128, 247, 200, 0.5);
  box-shadow: 0 0 0 3px rgba(128, 247, 200, 0.12);
}

.lite-field-grid,
.lite-action-grid,
.lite-preset-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.lite-progress {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(224, 232, 240, 0.11);
  border-radius: 12px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.045);
}

.lite-progress div {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--resume-muted);
  font-size: 12px;
  font-weight: 800;
}

.lite-progress b {
  color: var(--resume-mint);
  font-variant-numeric: tabular-nums;
}

.lite-progress-track {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.lite-progress-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--resume-accent), var(--resume-mint));
  transition: width 0.22s ease;
}

.lite-run-log {
  display: grid;
  gap: 7px;
  min-height: 88px;
  max-height: 142px;
  overflow: auto;
  border-radius: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.lite-results-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(224, 232, 240, 0.11);
  border-radius: 12px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.045);
}

.lite-results-panel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--resume-muted);
  font-size: 12px;
  font-weight: 850;
}

.lite-results-panel b {
  color: var(--resume-mint);
  font-variant-numeric: tabular-nums;
}

.lite-results-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.lite-results-list p {
  margin: 0;
  color: var(--resume-faint);
  font-size: 12px;
  line-height: 1.5;
}

.lite-result-chip {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(224, 232, 240, 0.11);
  border-radius: 10px;
  padding: 7px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--resume-text);
  text-decoration: none;
}

.lite-result-chip img {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.lite-result-chip span,
.lite-result-chip b,
.lite-result-chip i {
  min-width: 0;
}

.lite-result-chip b,
.lite-result-chip i {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lite-result-chip b {
  color: #fff;
  font-size: 12px;
}

.lite-result-chip i {
  margin-top: 3px;
  color: var(--resume-faint);
  font-size: 11px;
  font-style: normal;
}

.lite-run-log p {
  margin: 0;
  color: var(--resume-faint);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.lite-run-log p[data-tone="success"] {
  color: var(--resume-mint);
}

.lite-run-log p[data-tone="error"] {
  color: var(--resume-rose);
}

.lite-canvas-viewport {
  position: relative;
  min-width: 0;
  overflow: auto;
  background:
    radial-gradient(circle at 42% 28%, rgba(125, 211, 252, 0.08), transparent 34%),
    #090d14;
  cursor: grab;
}

.lite-canvas-viewport.is-panning {
  cursor: grabbing;
}

.lite-canvas-board {
  position: relative;
  min-width: 2400px;
  min-height: 1500px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(128, 247, 200, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.07) 1px, transparent 1px);
  background-size: 32px 32px, 32px 32px, 160px 160px, 160px 160px;
}

.lite-canvas-links {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.lite-canvas-links path {
  fill: none;
  stroke: rgba(128, 247, 200, 0.34);
  stroke-width: 2;
  stroke-dasharray: 7 7;
}

.lite-node {
  position: absolute;
  z-index: 2;
  width: 300px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(224, 232, 240, 0.15);
  border-radius: 14px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(15, 23, 34, 0.94);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.26);
}

.lite-node.is-selected {
  border-color: rgba(128, 247, 200, 0.58);
  box-shadow: 0 18px 60px rgba(128, 247, 200, 0.13);
}

.lite-node.is-running {
  border-color: rgba(240, 201, 121, 0.64);
}

.lite-node.is-done {
  border-color: rgba(125, 211, 252, 0.58);
}

.lite-node.is-error {
  border-color: rgba(246, 161, 146, 0.64);
}

.lite-node.is-dragging {
  z-index: 5;
}

.lite-node-grip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 10px 11px;
  border-bottom: 1px solid rgba(224, 232, 240, 0.11);
  cursor: grab;
}

.lite-ref-node .lite-node-grip {
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
}

.lite-node-grip b,
.lite-node-grip i {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lite-node-grip b {
  color: #fff;
  font-size: 14px;
}

.lite-node-grip i {
  color: var(--resume-faint);
  font-size: 11px;
  font-style: normal;
  text-align: right;
}

.lite-check {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.lite-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.lite-check span {
  width: 17px;
  height: 17px;
  border: 1px solid rgba(224, 232, 240, 0.36);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
}

.lite-check input:checked + span {
  border-color: transparent;
  background:
    linear-gradient(135deg, var(--resume-mint), var(--resume-accent));
}

.lite-check input:checked + span::after {
  display: block;
  color: #07111a;
  content: "✓";
  font-size: 13px;
  font-weight: 900;
  line-height: 17px;
  text-align: center;
}

.lite-task-node textarea {
  display: block;
  width: calc(100% - 20px);
  min-height: 94px;
  margin: 10px;
  border: 1px solid rgba(224, 232, 240, 0.11);
  border-radius: 10px;
  padding: 9px;
  resize: vertical;
  background: rgba(0, 0, 0, 0.2);
  color: var(--resume-muted);
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  outline: none;
}

.lite-node-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 10px;
}

.lite-node-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 10px;
}

.lite-node-actions button {
  flex: 1 1 auto;
  color: var(--resume-muted);
}

.lite-node-meta span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(128, 247, 200, 0.09);
  color: var(--resume-mint);
  font-size: 11px;
  font-weight: 800;
}

.lite-node-result {
  min-height: 156px;
  border-top: 1px solid rgba(224, 232, 240, 0.1);
  background: rgba(0, 0, 0, 0.18);
}

.lite-result-empty {
  display: grid;
  min-height: 156px;
  place-items: center;
  padding: 14px;
  color: var(--resume-faint);
  font-size: 12px;
}

.lite-result-image,
.lite-ref-node img {
  display: block;
  width: 100%;
  height: auto;
}

.lite-result-image {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.lite-ref-node {
  width: 220px;
}

.lite-ref-node img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.lite-node-error {
  margin: 0;
  padding: 9px 10px 11px;
  color: var(--resume-rose);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 960px) {
  .lite-canvas-tool {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .lite-canvas-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(224, 232, 240, 0.12);
  }

  .lite-canvas-viewport {
    min-height: 620px;
  }
}

@media (max-width: 720px) {
  .lite-canvas-heading.section-heading.compact {
    display: block;
    text-align: left;
  }

  .lite-canvas-tool {
    border-radius: 14px;
  }

  .lite-field-grid,
  .lite-action-grid,
  .lite-preset-row {
    grid-template-columns: 1fr;
  }

  .lite-canvas-viewport {
    min-height: 560px;
  }

  .lite-node {
    width: 280px;
  }
}

/* Mobile homepage polish pulled over the live production version. */
.huabu-mobile-entry {
  display: none;
}

img,
video,
iframe {
  max-width: 100%;
}

:where(.site-header, .section-shell, .resume-hero-main, .resume-hero-panel, .engine-card, .work-card, .vibe-card, .result-grid article) {
  min-width: 0;
}

:where(.resume-stack-summary span, .project-stack span, .project-role span, .project-proof span, .contact-card button, .contact-card span, .work-content p, .work-content li) {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background-attachment: scroll;
  }

  body::before {
    background-position: center top;
    animation: none;
  }

  .site-header {
    position: sticky;
    top: 8px;
    display: grid;
    width: calc(100% - 20px);
    margin: 10px auto 0;
    padding: 8px 10px 9px;
    gap: 8px;
    border-radius: 12px;
    background: rgba(7, 13, 21, 0.94);
    overflow: hidden;
  }

  .brand {
    width: 100%;
    min-width: 0;
    font-size: 12px;
  }

  .brand > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-links {
    width: calc(100% + 10px);
    margin-right: -5px;
    margin-left: -5px;
    padding: 1px 5px 4px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

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

  .nav-links a {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .nav-links a:first-child::after {
    right: 10px;
    left: 10px;
  }

  .section-shell {
    width: calc(100% - 20px);
    margin-right: auto;
    margin-left: auto;
  }

  .section-block {
    padding-top: 38px;
    padding-bottom: 18px;
  }

  .video-replica-main,
  .video-replica-form,
  .video-replica-cases {
    grid-template-columns: 1fr;
  }

  .video-replica-panel {
    padding: 14px;
  }

  .video-replica-result {
    width: min(100%, 340px);
    max-height: none;
  }

  .video-replica-result[data-ratio="16:9"],
  .video-replica-result[data-ratio="21:9"],
  .video-replica-result[data-ratio="1:1"],
  .video-replica-result[data-ratio="3:4"],
  .video-replica-result[data-ratio="4:3"] {
    width: 100%;
  }

  .resume-hero {
    width: calc(100% - 20px);
    padding-top: 18px;
    gap: 12px;
  }

  .resume-hero-main,
  .resume-hero-panel {
    padding: 16px;
    border-radius: 12px;
  }

  .resume-hero .eyebrow,
  .section-heading .eyebrow {
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.35;
  }

  .resume-hero .pixel-title {
    font-size: clamp(34px, 10.4vw, 44px);
    line-height: 1.05;
    text-wrap: balance;
  }

  .resume-hero .hero-subtitle {
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.24;
  }

  .resume-hero .hero-text,
  .section-lead,
  .section-heading p {
    font-size: 14px;
    line-height: 1.65;
  }

  .resume-hero .hero-identity {
    margin-top: 14px;
  }

  .resume-cta-row,
  .hero-actions,
  .card-actions,
  .evolution-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .resume-cta-row .resume-link,
  .hero-actions .resume-link,
  .card-actions .card-link,
  .evolution-card-actions .card-link,
  .huabu-mobile-actions .card-link {
    width: 100%;
    min-height: 42px;
  }

  .resume-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .resume-metrics article {
    padding: 12px;
  }

  .resume-metrics strong {
    font-size: 26px;
  }

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

  .render-flow i {
    display: none;
  }

  .render-flow span {
    display: inline-flex;
    min-width: 0;
    justify-content: center;
    text-align: center;
  }

  .resume-stack-summary,
  .hero-contact-card {
    gap: 8px;
  }

  .hero-contact-card button,
  .hero-contact-card a,
  .hero-contact-card span {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 13px;
    line-height: 1.35;
  }

  .lite-canvas-heading {
    margin-bottom: 12px;
  }

  .huabu-lite-embed {
    border-radius: 12px;
    overflow: hidden;
  }

  .huabu-lite-frame {
    display: none;
  }

  .huabu-mobile-entry {
    display: grid;
    gap: 14px;
    padding: 16px;
    min-height: 220px;
    align-content: center;
    background:
      linear-gradient(135deg, rgba(128, 247, 200, 0.12), transparent 40%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
      #09090b;
  }

  .huabu-mobile-entry span {
    display: block;
    color: var(--resume-mint);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .huabu-mobile-entry strong {
    display: block;
    margin-top: 6px;
    color: #fff;
    font-size: 24px;
    line-height: 1.18;
  }

  .huabu-mobile-entry p {
    margin: 9px 0 0;
    color: var(--resume-muted);
    font-size: 14px;
    line-height: 1.6;
  }

  .huabu-mobile-actions {
    display: grid;
    gap: 8px;
  }

  .evolution-heading {
    gap: 10px;
  }

  .evolution-stage {
    border-radius: 12px;
  }

  .evolution-card.is-empty,
  .evolution-card.is-skeleton {
    min-height: 260px;
  }

  .evolution-card.is-skeleton div {
    min-height: 180px;
  }

  .evolution-drawer-panel {
    width: 100%;
  }

  .project-grid,
  .work-grid,
  .training-grid {
    gap: 12px;
  }

  .engine-card.project-card,
  .work-card,
  .vibe-card,
  .result-grid article {
    border-radius: 12px;
  }

  .project-card .engine-head strong,
  .work-content h3,
  .vibe-card h3 {
    font-size: 19px;
    line-height: 1.25;
  }

  .project-intro,
  .project-role span,
  .project-proof span,
  .project-stack span {
    font-size: 13px;
    line-height: 1.58;
  }

  .filter-bar {
    display: flex;
    width: calc(100% + 20px);
    margin-right: -10px;
    margin-left: -10px;
    padding: 0 10px 6px;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .filter-chip,
  .filter-link {
    flex: 0 0 auto;
    width: auto;
    min-height: 38px;
    margin-left: 0;
    padding: 9px 12px;
    font-size: 13px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .work-content {
    padding: 14px;
  }

  .script-link {
    width: 100%;
  }

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

  .result-grid article {
    min-height: 108px;
    padding: 14px;
  }

  .result-grid strong {
    font-size: 27px;
  }

  .result-grid span {
    margin-top: 8px;
    font-size: 13px;
  }

  .video-modal {
    padding: 10px;
    align-items: center;
  }

  .video-modal-panel {
    width: 100%;
    max-height: calc(100dvh - 20px);
    overflow: auto;
    border-radius: 12px;
    padding: 14px;
  }

  .video-modal-panel h3 {
    margin-right: 42px;
    margin-bottom: 12px;
    font-size: 18px;
  }

  .video-modal video {
    max-height: 62dvh;
    border-radius: 10px;
  }

  .video-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 420px) {
  .resume-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resume-hero-main,
  .resume-hero-panel,
  .engine-card.project-card {
    padding: 14px;
  }

  .resume-hero .pixel-title {
    font-size: clamp(32px, 10.2vw, 40px);
  }

  h2 {
    font-size: 30px;
  }

  .result-grid strong {
    font-size: 24px;
  }
}

/* Cleaner first-screen copy after mobile deployment. */
.resume-hero .pixel-title {
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1.04;
}

.resume-hero .hero-subtitle {
  max-width: 620px;
  margin-bottom: 10px;
  font-size: clamp(21px, 2.1vw, 28px);
}

.resume-hero .hero-text {
  max-width: 560px;
  font-size: 15px;
  line-height: 1.65;
}

.resume-hero-panel {
  align-content: start;
}

@media (max-width: 720px) {
  .resume-hero .pixel-title {
    font-size: clamp(36px, 10vw, 42px);
  }

  .resume-hero .hero-subtitle {
    font-size: 19px;
  }

  .resume-hero .hero-text {
    font-size: 14px;
  }
}

/* Mobile visual-density pass: keep desktop content, but let rows wrap cleanly and fill the viewport. */
@media (max-width: 720px) {
  .video-replica-main {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
  }

  .video-replica-copy h3 {
    font-size: clamp(25px, 8.2vw, 34px);
  }

  .video-replica-form {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.68fr);
    align-items: end;
    gap: 10px;
  }

  .video-replica-upload {
    grid-column: 1 / -1;
    min-height: 52px;
  }

  .video-replica-form [data-video-replica-submit] {
    width: 100%;
    min-height: 48px;
    padding-inline: 12px;
    white-space: nowrap;
  }

  .video-replica-ratio,
  .video-replica-ratio select {
    min-width: 0;
  }

  .video-replica-status {
    display: flex;
    min-height: 42px;
    align-items: center;
  }

  .video-replica-cases {
    grid-template-columns: repeat(auto-fit, minmax(min(132px, 100%), 1fr));
    gap: 10px;
    align-items: stretch;
  }

  .video-replica-case {
    display: flex;
    min-width: 0;
    flex-direction: column;
  }

  .video-replica-case > div {
    flex: 1;
    padding: 10px;
  }

  .video-replica-case b,
  .video-replica-case > div span {
    overflow-wrap: anywhere;
  }

  .video-replica-case b {
    font-size: 13px;
  }

  .video-replica-case > div span {
    font-size: 11px;
  }

  .mj-native-body {
    margin-top: 12px;
    padding: 10px;
  }

  .mj-evolution-section .jobs {
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
    gap: 10px;
  }

  .mj-evolution-section .job {
    min-width: 0;
    gap: 7px;
    border-radius: 12px;
    padding: 8px;
  }

  .mj-evolution-section .job-head {
    position: static;
    gap: 6px;
    pointer-events: auto;
  }

  .mj-evolution-section .job h2 {
    font-size: 14px;
    line-height: 1.15;
    text-shadow: none;
  }

  .mj-evolution-section .badge {
    padding: 4px 7px;
    font-size: 10px;
  }

  .mj-evolution-section .image-box {
    min-height: 0;
    aspect-ratio: 9 / 13;
    border-radius: 10px;
  }

  .mj-evolution-section .image-box img {
    object-fit: contain;
    background: #070f15;
  }

  .mj-evolution-section .ops {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .mj-evolution-section .mj-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mj-evolution-section .mj-action-button.reroll {
    grid-column: 1 / -1;
  }

  .mj-evolution-section .jimeng-result-image {
    max-height: none;
    aspect-ratio: 9 / 13;
    object-fit: contain;
  }
}

@media (max-width: 320px) {
  .video-replica-form,
  .video-replica-cases,
  .mj-evolution-section .jobs {
    grid-template-columns: 1fr;
  }
}
