:root {
  color-scheme: dark;
  --bg: #07101d;
  --bg-deep: #040a13;
  --surface: rgba(15, 29, 49, 0.72);
  --surface-solid: #0e1b2e;
  --surface-soft: #12233a;
  --text: #f4f7fb;
  --muted: #9aa9bc;
  --muted-2: #6f8198;
  --line: rgba(184, 207, 235, 0.14);
  --line-strong: rgba(184, 207, 235, 0.28);
  --accent: #4f8cff;
  --accent-2: #7dc9ff;
  --glow: rgba(79, 140, 255, 0.26);
  --success: #72e5a6;
  --container: 1240px;
  --radius: 24px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  --font-sans: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f6fc;
  --bg-deep: #e8eef7;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-soft: #e8f0fb;
  --text: #0c1a2d;
  --muted: #53657c;
  --muted-2: #73839a;
  --line: rgba(35, 69, 111, 0.14);
  --line-strong: rgba(35, 69, 111, 0.27);
  --accent: #286ee8;
  --accent-2: #1468ba;
  --glow: rgba(40, 110, 232, 0.16);
  --shadow: 0 30px 80px rgba(35, 65, 105, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scrollbar-color: var(--muted-2) var(--bg-deep);
  scrollbar-width: thin;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% 9%, rgba(31, 83, 158, 0.19), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .site-header {
  transform: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.dialog-open {
  overflow: hidden;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 75% 9%, rgba(57, 125, 224, 0.13), transparent 28rem),
    var(--bg);
}

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

:where(a, button, input, textarea, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 80%, white);
  outline-offset: 4px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--muted-2);
}

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

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

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

h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: -0.035em;
}

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

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: #fff;
  color: #000;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  z-index: 1001;
  inset: 0 0 auto;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--accent);
}

#network-canvas {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  opacity: 0.36;
  mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}

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

.ambient-one {
  top: 9rem;
  right: 0;
  width: min(32rem, 100vw);
  height: 32rem;
  border: 1px solid rgba(97, 154, 249, 0.12);
  box-shadow: inset 0 0 160px rgba(50, 111, 218, 0.06);
}

.ambient-two {
  top: 34rem;
  left: 0;
  width: min(38rem, 100vw);
  height: 38rem;
  border: 1px solid rgba(97, 154, 249, 0.07);
}

.site-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(5, 13, 24, 0.78);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

html[data-theme="light"] .site-header.is-scrolled {
  background: rgba(242, 246, 252, 0.86);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.nav-shell {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(calc(100% - 48px), 1360px);
  height: 84px;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

.brand-mark {
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -0.08em;
  line-height: 1;
}

.brand-mark span {
  color: var(--accent);
}

.brand-role {
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.8vw, 42px);
}

.nav-menu a {
  position: relative;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: color 0.25s ease;
}

.nav-menu a::after {
  position: absolute;
  right: 50%;
  bottom: -9px;
  left: 50%;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
  transition: left 0.25s ease, right 0.25s ease;
}

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

.nav-menu a:hover::after,
.nav-menu a.is-active::after {
  right: 0;
  left: 0;
}

/* 站内子应用入口：胶囊按钮，和上面的锚点链接区分开（它是导航，不是滚动锚点）。 */
.nav-menu a.nav-menu-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid rgba(96, 152, 255, 0.42);
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(37, 110, 255, 0.18), rgba(124, 110, 255, 0.13));
  color: #dceaff;
  font-size: 12.5px;
  white-space: nowrap;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.nav-menu a.nav-menu-cta::after {
  display: none;
}

.nav-menu a.nav-menu-cta b {
  color: rgba(220, 234, 255, 0.62);
  font-size: 11px;
  font-weight: 700;
  transition: transform 0.25s ease;
}

.nav-menu a.nav-menu-cta:hover {
  border-color: rgba(138, 185, 255, 0.78);
  background: linear-gradient(120deg, rgba(37, 110, 255, 0.3), rgba(124, 110, 255, 0.22));
  box-shadow: 0 10px 26px rgba(48, 106, 226, 0.24);
  color: #f4f9ff;
  transform: translateY(-1px);
}

.nav-menu a.nav-menu-cta:hover b {
  transform: translate(2px, -2px);
}

.nav-resume {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-resume svg {
  width: 16px;
  height: 16px;
}

.nav-resume:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.1);
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.nav-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 42px;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-tool:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.nav-tool svg {
  width: 17px;
  height: 17px;
}

.nav-tool kbd,
.mobile-menu-tools kbd {
  border: 0;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
}

.theme-icon-sun,
html[data-theme="light"] .theme-icon-moon {
  display: none;
}

html[data-theme="light"] .theme-icon-sun {
  display: block;
}

.mobile-menu-tools {
  display: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  margin: 6px auto;
  background: currentColor;
  transition: transform 0.25s ease;
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding: 140px 0 90px;
  overflow: hidden;
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 160, 210, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 210, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 82%);
}

.hero-orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(100, 161, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-orbit::before,
.hero-orbit::after {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
  content: "";
}

.hero-orbit-a {
  top: 12%;
  right: 8%;
  width: 36rem;
  height: 36rem;
  animation: spin 34s linear infinite;
}

.hero-orbit-a::before {
  top: 22%;
  left: 5%;
}

.hero-orbit-a::after {
  right: 12%;
  bottom: 14%;
}

.hero-orbit-b {
  top: 4%;
  right: 2%;
  width: 48rem;
  height: 48rem;
  animation: spin 48s linear infinite reverse;
}

.hero-orbit-b::before {
  top: 50%;
  right: -3px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.76fr);
  align-items: center;
  gap: clamp(54px, 8vw, 120px);
}

html.portrait-disabled .hero-grid,
.hero-grid:has(> .hero-visual[hidden]) {
  grid-template-columns: minmax(0, 850px);
}

html.portrait-disabled .hero-copy {
  max-width: 850px;
}

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

.eyebrow,
.section-index {
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 13px rgba(114, 229, 166, 0.72);
}

.status-dot::after {
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(114, 229, 166, 0.5);
  border-radius: inherit;
  content: "";
  animation: ping 2.4s ease-out infinite;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero-intro {
  display: block;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 23px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.hero-headline {
  display: block;
  font-size: clamp(52px, 6.35vw, 92px);
  font-weight: 790;
  line-height: 0.98;
  letter-spacing: -0.072em;
}

.hero-headline em {
  color: transparent;
  font-style: normal;
  background: linear-gradient(100deg, #fff 12%, #75a9ff 58%, #7dd8ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-role {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 24px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.07em;
}

.role-prefix {
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.role-rotator {
  color: var(--accent-2);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.role-rotator.is-changing {
  transform: translateY(5px);
  opacity: 0;
}

.hero-summary {
  max-width: 650px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-bottom: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.button svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.button-primary {
  background: var(--accent);
  box-shadow: 0 15px 34px rgba(54, 116, 222, 0.28);
  color: #fff;
}

.button-primary:hover {
  transform: translateY(-3px);
  background: #6299ff;
  box-shadow: 0 18px 45px rgba(54, 116, 222, 0.42);
}

.button-primary:hover svg {
  transform: translateX(3px);
}

.button-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.button-ghost:hover {
  transform: translateY(-3px);
  border-color: rgba(125, 201, 255, 0.52);
  background: rgba(125, 201, 255, 0.07);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
}

.hero-meta a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
}

.hero-meta a:hover {
  color: var(--text);
}

.hero-meta svg {
  width: 15px;
  height: 15px;
  color: var(--accent-2);
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.portrait-stage {
  position: relative;
  width: min(100%, 430px);
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out;
}

.portrait-halo {
  position: absolute;
  z-index: -1;
  inset: 8% -14% -10%;
  border-radius: 44% 56% 48% 52%;
  background:
    radial-gradient(circle at 48% 50%, rgba(51, 125, 240, 0.62), rgba(20, 77, 164, 0.2) 55%, transparent 72%);
  filter: blur(18px);
  animation: breathe 7s ease-in-out infinite;
}

.portrait-frame {
  position: relative;
  height: clamp(470px, 57vw, 610px);
  overflow: hidden;
  border: 1px solid rgba(171, 207, 255, 0.24);
  border-radius: 210px 210px 28px 28px;
  background: #3978c9;
  box-shadow: var(--shadow), inset 0 0 0 7px rgba(255, 255, 255, 0.025);
  transform: translateZ(0);
}

.portrait-frame::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 48%, rgba(3, 10, 19, 0.05) 68%, rgba(3, 10, 19, 0.76) 100%),
    linear-gradient(110deg, rgba(124, 196, 255, 0.16), transparent 42%);
  content: "";
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: saturate(0.88) contrast(1.03);
  transform: scale(1.01);
}

.portrait-scan {
  position: absolute;
  z-index: 2;
  top: -15%;
  right: 0;
  left: 0;
  height: 18%;
  opacity: 0.42;
  background: linear-gradient(to bottom, transparent, rgba(155, 216, 255, 0.35), transparent);
  animation: scan 6s ease-in-out infinite 1.5s;
}

.floating-label {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(178, 211, 255, 0.26);
  border-radius: 7px;
  background: rgba(7, 17, 31, 0.72);
  box-shadow: 0 15px 32px rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  backdrop-filter: blur(12px);
}

.floating-label span {
  color: var(--accent-2);
}

.label-top {
  top: 20%;
  left: -14%;
  animation: float 5.5s ease-in-out infinite;
}

.label-bottom {
  right: -15%;
  bottom: 31%;
  animation: float 6s ease-in-out infinite reverse;
}

.availability-card {
  position: absolute;
  z-index: 4;
  right: -7%;
  bottom: -4%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 232px;
  padding: 14px 16px;
  border: 1px solid rgba(182, 211, 248, 0.2);
  border-radius: 13px;
  background: rgba(10, 22, 38, 0.88);
  box-shadow: var(--shadow);
  color: #dce8f6;
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(16px);
}

.availability-card small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.availability-icon {
  display: grid;
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 10px;
  background: rgba(79, 140, 255, 0.15);
  color: var(--accent-2);
}

.availability-icon svg {
  width: 19px;
  height: 19px;
}

.hero-scroll {
  position: absolute;
  bottom: 31px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%) rotate(90deg) translateX(50%);
  transform-origin: center;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.hero-scroll i {
  display: block;
  width: 48px;
  height: 1px;
  overflow: hidden;
  background: var(--line-strong);
}

.hero-scroll i::after {
  display: block;
  width: 45%;
  height: 100%;
  background: var(--accent);
  content: "";
  animation: scrollLine 2s ease-in-out infinite;
}

.tech-ribbon {
  position: relative;
  z-index: 3;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 20, 35, 0.76);
  transform: rotate(-1.2deg) scale(1.03);
  backdrop-filter: blur(12px);
}

.ribbon-track {
  display: flex;
  align-items: center;
  width: max-content;
  height: 64px;
  animation: marquee 32s linear infinite;
}

.ribbon-track span {
  padding: 0 28px;
  color: #b9c8da;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
}

.ribbon-track i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.section {
  position: relative;
  z-index: 1;
  padding: clamp(100px, 12vw, 180px) 0;
}

.section-heading {
  margin-bottom: clamp(52px, 7vw, 92px);
}

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

.section-heading h2 {
  max-width: 900px;
  margin-bottom: 0;
  font-size: clamp(42px, 5.4vw, 74px);
  font-weight: 730;
  letter-spacing: -0.06em;
}

.section-heading h2 span {
  color: var(--accent-2);
}

.heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.heading-note {
  max-width: 390px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.about {
  padding-top: clamp(130px, 15vw, 210px);
}

.about::before {
  position: absolute;
  z-index: -1;
  top: 15%;
  right: 0;
  width: 46%;
  height: 52%;
  background: radial-gradient(circle at right, rgba(41, 101, 197, 0.1), transparent 67%);
  content: "";
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.86fr);
  align-items: start;
  gap: clamp(70px, 10vw, 150px);
}

.about-copy {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.about-copy .lead-copy {
  margin-bottom: 24px;
  color: #d6e0ec;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 420;
  line-height: 1.7;
  letter-spacing: -0.025em;
}

.education-note {
  margin-top: 47px;
  padding: 23px 0 0 24px;
  border-top: 1px solid var(--line);
  border-left: 2px solid var(--accent);
}

.education-note span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.education-note strong {
  color: var(--text);
  font-size: 17px;
}

.education-note p {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 12px;
}

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

.metric-card {
  position: relative;
  min-height: 190px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(19, 37, 62, 0.8), rgba(10, 22, 38, 0.45));
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-6px);
  border-color: rgba(125, 201, 255, 0.38);
}

.metric-featured {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 392px;
  background:
    radial-gradient(circle at 70% 25%, rgba(88, 151, 255, 0.26), transparent 45%),
    linear-gradient(145deg, #173561, #0b1a2f 70%);
}

.metric-number {
  margin: 0;
  color: #fff;
  font-size: clamp(56px, 7vw, 92px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.08em;
}

.metric-number sup {
  position: relative;
  top: -0.5em;
  margin-left: 3px;
  color: var(--accent-2);
  font-size: 0.34em;
}

.metric-card > p:last-of-type {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.metric-line {
  position: absolute;
  right: 25px;
  bottom: 25px;
  width: 24px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(90px, 12vw, 160px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.value-card {
  position: relative;
  min-height: 300px;
  padding: 40px 38px;
  border-right: 1px solid var(--line);
  transition: background 0.3s ease;
}

.value-card:last-child {
  border-right: 0;
}

.value-card:hover {
  background: rgba(17, 36, 61, 0.52);
}

.value-card svg {
  width: 48px;
  height: 48px;
  margin: 45px 0 31px;
  color: var(--accent-2);
  stroke-width: 1.15;
}

.value-no {
  position: absolute;
  top: 27px;
  right: 30px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
}

.value-card h3 {
  margin-bottom: 13px;
  font-size: 20px;
}

.value-card p {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.work {
  background:
    linear-gradient(to bottom, transparent, rgba(4, 10, 19, 0.36) 20%, rgba(4, 10, 19, 0.5) 80%, transparent),
    radial-gradient(circle at 20% 35%, rgba(36, 86, 159, 0.1), transparent 31rem);
}

.project-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: -28px 0 28px;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-filters button,
.contact-quick-actions button,
.footer-actions > button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.project-filters button:hover,
.contact-quick-actions button:hover,
.footer-actions > button:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  color: var(--text);
}

.project-filters button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 28px rgba(55, 116, 220, 0.23);
}

.filter-status {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

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

.content-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
}

.content-pagination p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.content-load-more {
  min-height: 44px;
  padding: 0 19px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: 700 10px/1 var(--font-mono);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.content-load-more:hover {
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.1);
  transform: translateY(-2px);
}

.content-load-more:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.content-load-more[hidden] {
  display: none;
}

.project-card {
  position: relative;
  min-height: 540px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(22, 42, 69, 0.83), rgba(9, 20, 35, 0.86)),
    var(--surface-solid);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.project-card::after {
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: var(--glow);
  filter: blur(70px);
  opacity: 0;
  content: "";
  transition: opacity 0.35s ease;
}

.project-card:hover {
  transform: translateY(-7px);
  border-color: rgba(128, 180, 255, 0.34);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.26);
}

.project-card:hover::after {
  opacity: 1;
}

.project-card[hidden] {
  display: none !important;
}

.project-card.is-filtering {
  opacity: 0;
  transform: scale(0.98);
}

.project-grid.is-single .project-card {
  grid-column: 1 / -1;
  min-height: 470px;
}

.project-grid.is-single .project-card:not(.project-main):not(.project-wide) p {
  max-width: 720px;
}

.project-grid .project-card.is-grid-orphan {
  grid-column: 1 / -1;
}

.project-main {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  min-height: 640px;
  padding: 0;
}

.project-visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

.project-visual-saas {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(138, 183, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 183, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 48% 46%, rgba(79, 140, 255, 0.32), transparent 52%),
    #0a1b32;
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.visual-label {
  position: absolute;
  top: 27px;
  left: 31px;
  color: rgba(177, 203, 237, 0.54);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.saas-window {
  position: relative;
  z-index: 2;
  width: min(82%, 520px);
  overflow: hidden;
  border: 1px solid rgba(173, 208, 255, 0.28);
  border-radius: 14px;
  background: rgba(8, 19, 35, 0.84);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.45), 0 0 55px rgba(79, 140, 255, 0.12);
  transform: perspective(900px) rotateY(-8deg) rotateX(5deg);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-main:hover .saas-window {
  transform: perspective(900px) rotateY(-2deg) rotateX(1deg) translateY(-5px);
}

.window-top {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 33px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.window-address {
  min-width: 0;
  margin-left: 6px;
  overflow: hidden;
  color: rgba(177, 203, 237, 0.48);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-live {
  margin-left: auto;
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.window-top i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
}

.window-top i:first-child {
  background: var(--accent);
}

.window-body {
  display: grid;
  grid-template-columns: 58px 1fr;
  min-height: 300px;
}

.window-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding-top: 26px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.window-mark {
  display: grid;
  width: 28px;
  height: 28px;
  margin-bottom: 7px;
  place-items: center;
  border: 1px solid rgba(125, 201, 255, 0.38);
  border-radius: 8px;
  background: rgba(79, 140, 255, 0.16);
  color: #d9e9ff;
  font: 800 8px/1 var(--font-mono);
}

.window-sidebar i {
  width: 18px;
  height: 4px;
  border-radius: 3px;
  background: rgba(166, 193, 229, 0.27);
}

.window-sidebar i:first-child {
  width: 24px;
  background: var(--accent);
}

.window-content {
  padding: 28px;
}

.window-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}

.window-heading small,
.window-heading strong {
  display: block;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.window-heading small {
  margin-bottom: 4px;
  color: var(--accent-2);
  font-size: 7px;
}

.window-heading strong {
  color: #e7f1ff;
  font-size: 11px;
}

.window-heading > span {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid rgba(125, 201, 255, 0.28);
  border-radius: 6px;
  color: #bdd9ff;
  font: 700 6px/1 var(--font-mono);
  letter-spacing: 0.06em;
}

.window-content > span {
  display: block;
  width: 47%;
  height: 8px;
  margin-bottom: 28px;
  border-radius: 4px;
  background: rgba(209, 225, 248, 0.34);
}

.mini-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 26px;
}

.mini-cards i {
  display: flex;
  height: 82px;
  padding: 12px 10px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(154, 195, 247, 0.14);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(78, 141, 245, 0.24), rgba(255, 255, 255, 0.025));
  font-style: normal;
}

.mini-cards small,
.mini-cards span {
  color: rgba(181, 207, 241, 0.48);
  font: 600 5px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

.mini-cards strong {
  color: #e7f1ff;
  font: 750 17px/1 var(--font-mono);
  letter-spacing: -0.04em;
}

.mini-cards i:nth-child(2) {
  background: linear-gradient(145deg, rgba(82, 212, 186, 0.17), rgba(255, 255, 255, 0.02));
}

.window-content b {
  display: block;
  width: 88%;
  height: 5px;
  margin-bottom: 10px;
  border-radius: 4px;
  background: rgba(175, 199, 230, 0.14);
}

.window-content b:last-child {
  width: 61%;
}

.window-pipeline {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.window-pipeline span {
  color: rgba(190, 211, 239, 0.48);
  font: 700 6px/1 var(--font-mono);
  letter-spacing: 0.07em;
}

.window-pipeline span.is-active {
  color: var(--accent-2);
}

.window-pipeline b,
.window-pipeline b:last-child {
  width: 100%;
  height: 1px;
  margin: 0;
  background: linear-gradient(90deg, rgba(79, 140, 255, 0.62), rgba(125, 201, 255, 0.12));
}

.window-bars {
  display: grid;
  gap: 8px;
}

.window-bars b,
.window-bars b:last-child {
  width: 100%;
  height: 4px;
  margin: 0;
  background: linear-gradient(90deg, rgba(125, 201, 255, 0.22) 72%, rgba(175, 199, 230, 0.07) 72%);
}

.window-bars b:nth-child(2) {
  background: linear-gradient(90deg, rgba(82, 212, 186, 0.2) 55%, rgba(175, 199, 230, 0.07) 55%);
}

.window-bars b:nth-child(3) {
  background: linear-gradient(90deg, rgba(125, 201, 255, 0.16) 84%, rgba(175, 199, 230, 0.07) 84%);
}

.visual-caption {
  position: absolute;
  right: 31px;
  bottom: 25px;
  left: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: rgba(177, 203, 237, 0.44);
  font: 700 7px/1 var(--font-mono);
  letter-spacing: 0.1em;
}

.visual-caption b {
  color: var(--success);
  font-weight: 750;
}

.orbit-tag {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 76px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(181, 211, 251, 0.25);
  border-radius: 7px;
  background: rgba(9, 22, 39, 0.87);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  color: #cfe0f6;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  backdrop-filter: blur(10px);
}

.orbit-coze {
  top: 27%;
  right: 7%;
  animation: float 5s ease-in-out infinite;
}

.orbit-n8n {
  bottom: 24%;
  left: 8%;
  animation: float 5.8s ease-in-out infinite 0.6s;
}

.orbit-ai {
  right: 11%;
  bottom: 13%;
  width: 92px;
  animation: float 6.4s ease-in-out infinite 1.2s;
}

.project-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 5vw, 72px);
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.project-link {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.project-link:hover {
  transform: rotate(8deg);
  border-color: var(--accent);
  background: var(--accent);
}

.project-link svg {
  width: 19px;
  height: 19px;
}

.project-card h3 {
  margin-bottom: 20px;
  font-size: clamp(28px, 3vw, 43px);
  font-weight: 680;
  letter-spacing: -0.05em;
}

.project-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.82;
}

.project-highlights {
  margin: 7px 0 29px;
  padding: 0;
  list-style: none;
}

.project-highlights li {
  position: relative;
  margin: 10px 0;
  padding-left: 18px;
  color: #bdcadb;
  font-size: 12px;
}

.project-highlights li::before {
  position: absolute;
  top: 0.77em;
  left: 0;
  width: 6px;
  height: 1px;
  background: var(--accent);
  content: "";
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #aebdd0;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-detail-button {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: 25px;
  padding: 0 0 7px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: #dce8f6;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.project-detail-button span {
  color: var(--accent-2);
  font-size: 15px;
  transition: transform 0.2s ease;
}

.project-detail-button:hover {
  border-color: var(--accent);
  color: #fff;
}

.project-detail-button:hover span {
  transform: translate(2px, -2px);
}

/* 站内子应用有两个行动：先"进去用"，再"看怎么做的"。窄屏各占一行。 */
.project-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 25px;
}

.project-card-actions .project-detail-button {
  margin-top: 0;
}

.project-number {
  position: absolute;
  top: 28px;
  right: 30px;
  color: rgba(166, 191, 224, 0.33);
  font-family: var(--font-mono);
  font-size: 13px;
}

.project-icon {
  position: relative;
  display: grid;
  width: 126px;
  height: 126px;
  margin: 19px 0 64px;
  place-items: center;
  border: 1px solid rgba(130, 180, 248, 0.15);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 127, 229, 0.2), transparent 69%);
  color: var(--accent-2);
}

.project-icon > svg {
  width: 64px;
  height: 64px;
  stroke-width: 1.25;
}

.pulse-ring {
  position: absolute;
  inset: -1px;
  border: 1px solid rgba(91, 154, 255, 0.55);
  border-radius: 50%;
  animation: pulseRing 2.6s ease-out infinite;
}

.wave-lines {
  position: absolute;
  top: 27px;
  right: -12px;
  width: 37px;
  height: 70px;
  background: repeating-radial-gradient(ellipse at left, transparent 0 8px, rgba(108, 190, 255, 0.7) 9px 10px, transparent 11px 16px);
  opacity: 0.6;
  animation: wave 2.4s ease-in-out infinite;
}

.project-card:not(.project-main):not(.project-wide) {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.project-card:not(.project-main):not(.project-wide) .project-topline {
  justify-content: flex-start;
}

.project-card:not(.project-main):not(.project-wide) h3 {
  max-width: 470px;
}

.project-card:not(.project-main):not(.project-wide) p {
  max-width: 500px;
}

.project-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr) minmax(340px, 0.8fr);
  align-items: center;
  gap: 24px;
  min-height: 400px;
}

.wide-index {
  align-self: stretch;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  color: rgba(169, 197, 233, 0.25);
  font-family: var(--font-mono);
  font-size: 32px;
  writing-mode: vertical-rl;
}

.wide-copy {
  position: relative;
  z-index: 2;
  padding: 24px 24px 24px 12px;
}

.wide-copy .project-topline {
  justify-content: flex-start;
}

.wide-copy p {
  max-width: 600px;
}

.wide-graph {
  position: relative;
  min-height: 260px;
  margin-right: 18px;
}

.wide-graph svg {
  position: absolute;
  inset: 22px 0 0;
  width: 100%;
  height: 180px;
  color: rgba(102, 165, 255, 0.31);
  stroke-dasharray: 5 7;
  stroke-width: 1;
  animation: dash 14s linear infinite;
}

.graph-node {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 65px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(148, 192, 255, 0.3);
  border-radius: 7px;
  background: #10233e;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  color: #bcd7fa;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.node-a {
  top: 95px;
  left: 0;
}

.node-b {
  top: 30px;
  left: 36%;
}

.node-c {
  bottom: 27px;
  left: 44%;
}

.node-d {
  top: 95px;
  right: 0;
  border-color: rgba(103, 222, 171, 0.38);
  color: var(--success);
}

.more-work {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 31px;
  padding: 28px 2px;
  border-bottom: 1px solid var(--line);
}

.more-work p {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
}

.more-work-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px 22px;
}

.more-work a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #d7e4f4;
  font-size: 12px;
  font-weight: 650;
}

.more-work a span {
  color: var(--accent-2);
  font-size: 18px;
  transition: transform 0.2s ease;
}

.more-work a:hover span {
  transform: translate(3px, -3px);
}

[data-resume-download] b {
  font: inherit;
}

[data-resume-download].is-resume-locked {
  border-color: rgba(245, 184, 92, 0.42);
  color: var(--warning);
}

[data-resume-download].is-resume-locked:hover {
  border-color: rgba(245, 184, 92, 0.72);
  background: rgba(245, 184, 92, 0.08);
}

.lab {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 15% 45%, rgba(37, 95, 186, 0.14), transparent 31rem),
    linear-gradient(180deg, rgba(5, 13, 24, 0.64), rgba(8, 21, 37, 0.78));
}

.lab::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(130, 173, 226, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 173, 226, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  content: "";
  mask-image: linear-gradient(to right, #000, transparent 68%);
}

.lab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.55fr);
  align-items: stretch;
  gap: 17px;
}

.lab-console,
.now-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 20, 35, 0.8);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.18);
}

.lab-console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 57px;
  padding: 0 21px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.console-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.console-title i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.console-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.console-status span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.lab-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.lab-tabs button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.09em;
  cursor: pointer;
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.lab-tabs button:hover {
  color: var(--text);
}

.lab-tabs button[aria-selected="true"] {
  border-color: rgba(116, 174, 255, 0.32);
  background: rgba(79, 140, 255, 0.12);
  color: var(--accent-2);
}

.lab-screen {
  position: relative;
  display: grid;
  min-height: 380px;
  padding: 55px 38px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(51, 111, 206, 0.17), transparent 48%),
    linear-gradient(rgba(130, 173, 226, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 173, 226, 0.055) 1px, transparent 1px);
  background-size: auto, 29px 29px, 29px 29px;
}

.lab-screen::before {
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(134, 178, 235, 0.07);
  content: "";
}

.lab-flow {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  opacity: 0;
  transform: translateY(12px);
}

.lab-flow[hidden] {
  display: none !important;
}

.lab-flow.is-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.flow-node {
  position: relative;
  display: flex;
  flex: 0 1 128px;
  flex-direction: column;
  justify-content: center;
  min-width: 108px;
  min-height: 112px;
  padding: 17px;
  border: 1px solid rgba(158, 197, 246, 0.2);
  border-radius: 13px;
  background: rgba(12, 29, 50, 0.91);
  box-shadow: 0 17px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.flow-node:hover {
  transform: translateY(-6px);
  border-color: rgba(125, 201, 255, 0.5);
  box-shadow: 0 23px 45px rgba(0, 0, 0, 0.28), 0 0 28px rgba(79, 140, 255, 0.08);
}

.flow-node small {
  position: absolute;
  top: 10px;
  right: 11px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7px;
}

.flow-node strong {
  margin-bottom: 7px;
  font-size: 13px;
  letter-spacing: -0.02em;
}

.flow-node span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow-input {
  border-color: rgba(125, 201, 255, 0.3);
}

.flow-core {
  background: linear-gradient(145deg, rgba(50, 102, 192, 0.68), rgba(12, 33, 58, 0.95));
  box-shadow: 0 18px 45px rgba(42, 96, 185, 0.23);
}

.flow-core::after {
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(89, 150, 249, 0.16);
  border-radius: 17px;
  content: "";
  animation: corePulse 2.8s ease-in-out infinite;
}

.flow-output {
  border-color: rgba(114, 229, 166, 0.29);
}

.flow-output span {
  color: var(--success);
}

.flow-link {
  position: relative;
  flex: 0 1 56px;
  height: 1px;
  overflow: visible;
  background: rgba(123, 172, 236, 0.24);
}

.flow-link::before {
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 9px var(--accent);
  content: "";
  animation: dataTravel 2.2s linear infinite;
}

.lab-crosshair {
  position: absolute;
  width: 16px;
  height: 16px;
  border-top: 1px solid rgba(130, 181, 244, 0.22);
  border-left: 1px solid rgba(130, 181, 244, 0.22);
}

.lab-crosshair-a {
  top: 34px;
  left: 34px;
}

.lab-crosshair-b {
  right: 34px;
  bottom: 34px;
  transform: rotate(180deg);
}

.lab-console-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  min-height: 96px;
  padding: 19px 23px;
  border-top: 1px solid var(--line);
}

.lab-console-bottom p {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 690px;
  margin: 0;
}

.lab-console-bottom p span {
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.lab-console-bottom p strong {
  color: #bfccdc;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.7;
  transition: opacity 0.2s ease;
}

.console-coordinates {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.now-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px 31px;
  background:
    radial-gradient(circle at 100% 0%, rgba(73, 137, 238, 0.2), transparent 44%),
    rgba(12, 27, 46, 0.88);
}

.now-panel::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100px;
  height: 100px;
  border-right: 1px solid rgba(125, 201, 255, 0.14);
  border-bottom: 1px solid rgba(125, 201, 255, 0.14);
  content: "";
}

.now-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.now-heading .section-index {
  margin: 0;
}

.now-live {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.now-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pingSoft 1.8s ease-in-out infinite;
}

.now-panel > h3 {
  margin: 35px 0 29px;
  font-size: 28px;
}

.now-list article {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.now-list article > span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
}

.now-list small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.now-list p {
  margin: 0;
  color: #bdcad9;
  font-size: 12px;
  line-height: 1.72;
}

.now-panel blockquote {
  position: relative;
  margin: auto 0 0;
  padding: 27px 0 0 17px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.72;
}

.now-panel blockquote::before {
  position: absolute;
  top: 29px;
  left: 0;
  width: 2px;
  height: 32px;
  background: var(--accent);
  content: "";
}

.experience {
  overflow: hidden;
}

.experience::after {
  position: absolute;
  z-index: -1;
  right: -20%;
  bottom: 5%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(57, 121, 224, 0.08), transparent 67%);
  content: "";
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 48px minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 23px;
  min-height: 190px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
}

.timeline-item:hover {
  background: linear-gradient(90deg, transparent, rgba(25, 50, 84, 0.25), transparent);
}

.timeline-date {
  padding-top: 8px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.timeline-marker {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-marker::after {
  position: absolute;
  top: 13px;
  bottom: -50px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item:last-child .timeline-marker::after {
  display: none;
}

.timeline-marker span {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 9px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.17), 0 0 15px rgba(79, 140, 255, 0.5);
}

.timeline-company h3 {
  margin: 0 0 9px;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.timeline-company p {
  margin: 0;
  color: var(--accent-2);
  font-size: 12px;
}

.timeline-detail > p {
  max-width: 580px;
  margin: 2px 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.stack {
  border-top: 1px solid var(--line);
  background:
    linear-gradient(rgba(108, 157, 221, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 157, 221, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
}

.stack-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.56fr) minmax(0, 1.44fr);
  gap: clamp(50px, 9vw, 140px);
}

.stack-intro {
  position: sticky;
  top: 140px;
  align-self: start;
}

.stack-intro p {
  max-width: 380px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.stack-signal {
  display: flex;
  align-items: end;
  gap: 6px;
  height: 45px;
  margin-top: 43px;
}

.stack-signal i {
  width: 3px;
  height: 16px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(79, 140, 255, 0.45);
  animation: equalize 1.2s ease-in-out infinite alternate;
}

.stack-signal i:nth-child(2) { animation-delay: -0.2s; }
.stack-signal i:nth-child(3) { animation-delay: -0.6s; }
.stack-signal i:nth-child(4) { animation-delay: -0.4s; }
.stack-signal i:nth-child(5) { animation-delay: -0.8s; }
.stack-signal i:nth-child(6) { animation-delay: -0.1s; }
.stack-signal i:nth-child(7) { animation-delay: -0.55s; }

.skill-list {
  border-top: 1px solid var(--line);
}

.skill-row {
  display: grid;
  grid-template-columns: 48px minmax(150px, 0.55fr) minmax(0, 1.45fr);
  gap: 20px;
  padding: 33px 7px;
  border-bottom: 1px solid var(--line);
  transition: padding 0.3s ease, background 0.3s ease;
}

.skill-row:hover {
  padding-right: 18px;
  padding-left: 18px;
  background: rgba(20, 42, 70, 0.45);
}

.skill-index {
  padding-top: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
}

.skill-row h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.skill-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.notes {
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 35%, rgba(45, 105, 199, 0.11), transparent 32rem),
    var(--bg-deep);
}

.notes::before {
  position: absolute;
  top: 8%;
  right: -8rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(107, 165, 247, 0.08);
  border-radius: 50%;
  content: "";
  box-shadow: inset 0 0 100px rgba(47, 107, 204, 0.04);
}

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

.note-card {
  position: relative;
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(18, 37, 62, 0.84), rgba(8, 20, 35, 0.72));
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.note-card:hover,
.note-card[open] {
  transform: translateY(-5px);
  border-color: rgba(125, 201, 255, 0.33);
  background: linear-gradient(155deg, rgba(24, 48, 80, 0.9), rgba(9, 22, 39, 0.86));
}

.note-card summary {
  position: relative;
  min-height: 330px;
  padding: 30px 30px 74px;
  list-style: none;
  cursor: pointer;
}

.note-card summary::-webkit-details-marker {
  display: none;
}

.note-meta {
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.note-card h3 {
  margin: 74px 0 20px;
  font-size: clamp(23px, 2.4vw, 31px);
  font-weight: 650;
  line-height: 1.34;
  letter-spacing: -0.045em;
}

.note-card summary > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.note-toggle {
  position: absolute;
  right: 27px;
  bottom: 25px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.note-toggle::before,
.note-toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1px;
  background: var(--accent-2);
  content: "";
  transform: translate(-50%, -50%);
}

.note-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 0.3s ease;
}

.note-card[open] .note-toggle {
  transform: rotate(180deg);
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.13);
}

.note-card[open] .note-toggle::after {
  transform: translate(-50%, -50%) rotate(0);
}

.note-body {
  padding: 0 30px 30px;
}

.note-body::before {
  display: block;
  width: 100%;
  height: 1px;
  margin-bottom: 23px;
  background: var(--line);
  content: "";
}

.note-body p {
  margin: 0;
  color: #c0ccdc;
  font-size: 12px;
  line-height: 1.9;
}

.personal-manifesto {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: clamp(70px, 9vw, 120px);
  padding: 33px 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.personal-manifesto span {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.personal-manifesto p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #e8f0fa;
  font-size: clamp(19px, 2.4vw, 30px);
  font-weight: 640;
  letter-spacing: -0.04em;
}

.personal-manifesto i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.contact {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: clamp(110px, 14vw, 200px) 0 clamp(100px, 13vw, 180px);
  border-top: 1px solid rgba(153, 193, 244, 0.16);
  background:
    radial-gradient(circle at 15% 95%, rgba(31, 99, 209, 0.26), transparent 38%),
    radial-gradient(circle at 90% 0%, rgba(31, 99, 209, 0.15), transparent 35%),
    #071525;
}

.contact-grid {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(117, 165, 226, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 165, 226, 0.055) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(circle at center, #000, transparent 78%);
}

.contact-inner {
  position: relative;
  text-align: center;
}

.contact h2 {
  margin: 24px auto 30px;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 740;
  letter-spacing: -0.07em;
}

.contact h2 span {
  color: transparent;
  background: linear-gradient(100deg, #f7fbff, #6f9fff 70%, #78d6ff);
  background-clip: text;
  -webkit-background-clip: text;
}

.contact-copy {
  margin-bottom: 52px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.contact-actions {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
}

.contact-mail,
.contact-phone {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 104px;
  padding: 19px 29px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  text-align: left;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.contact-mail {
  min-width: min(100%, 410px);
  padding-right: 75px;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 22px 50px rgba(50, 111, 215, 0.26);
}

.contact-phone {
  min-width: 230px;
  background: rgba(255, 255, 255, 0.035);
}

.contact-mail span,
.contact-phone span {
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.contact-mail strong,
.contact-phone strong {
  font-size: 14px;
  letter-spacing: -0.015em;
}

.contact-mail svg {
  position: absolute;
  top: 50%;
  right: 25px;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  transition: transform 0.25s ease;
}

.contact-mail:hover,
.contact-phone:hover {
  transform: translateY(-5px);
}

.contact-mail:hover svg {
  transform: translate(5px, -50%);
}

.contact-phone:hover {
  border-color: rgba(126, 193, 255, 0.5);
  background: rgba(77, 139, 247, 0.09);
}

.contact-functional {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(440px, 1.18fr);
  align-items: stretch;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  text-align: left;
}

html.personal-info-disabled .contact-functional,
.contact-functional:has(> .contact-methods[hidden]) {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-methods .contact-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.contact-methods .contact-mail,
.contact-methods .contact-phone {
  width: 100%;
  min-width: 0;
}

.contact-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.contact-quick-actions button {
  flex: 1 1 100px;
  background: rgba(255, 255, 255, 0.04);
}

.contact-form {
  position: relative;
  padding: 29px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: rgba(5, 16, 29, 0.58);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
}

.form-heading span {
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.form-heading h3 {
  margin: 12px 0 8px;
  font-size: 25px;
}

.form-heading p {
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 11px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-form label {
  display: block;
  margin-bottom: 13px;
  color: #b8c7da;
  font-size: 10px;
  font-weight: 650;
}

.contact-form label small {
  display: block;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 450;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 7px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: #edf5ff;
  font-size: 13px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.contact-form textarea {
  min-height: 125px;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #61738b;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.11);
}

.contact-form .is-invalid {
  border-color: #ff7d87;
}

.form-honeypot {
  position: absolute !important;
  left: -9999px !important;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 5px;
}

.form-footer p {
  margin: 0;
  color: #ff9ba3;
  font-size: 10px;
}

.form-footer p.is-success {
  color: var(--success);
}

.form-footer .button {
  flex: 0 0 auto;
  min-height: 45px;
  cursor: pointer;
}

.form-footer .button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 112px;
}

.footer-inner p {
  margin: 0;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.back-top {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.back-top span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent-2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.back-top:hover span {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.footer-actions > button {
  min-height: 32px;
  padding-inline: 11px;
  background: transparent;
  font-size: 9px;
}

.site-dialog {
  position: fixed !important;
  width: min(calc(100% - 32px), 880px);
  max-height: min(88vh, 900px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: 23px;
  outline: 0;
  background: #0a1728;
  color: #f4f7fb;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.58);
}

.site-dialog::backdrop {
  background: rgba(2, 7, 14, 0.76);
  backdrop-filter: blur(10px);
}

.dialog-shell {
  position: relative;
  max-height: min(88vh, 900px);
  padding: clamp(30px, 5vw, 58px);
  overflow: auto;
}

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(184, 207, 235, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #d9e8fa;
  font-size: 24px;
  cursor: pointer;
}

.dialog-eyebrow {
  margin-bottom: 17px;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.project-dialog h2 {
  max-width: 720px;
  margin: 0 0 20px;
  font-size: clamp(35px, 5vw, 62px);
}

.dialog-lead {
  max-width: 720px;
  color: #aebfd3;
  font-size: 15px;
  line-height: 1.85;
}

.dialog-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 32px 0;
}

.dialog-facts div {
  padding: 18px;
  border: 1px solid rgba(184, 207, 235, 0.13);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.dialog-facts span,
.dialog-detail-grid span {
  display: block;
  margin-bottom: 7px;
  color: #72859d;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.dialog-facts strong {
  font-size: 14px;
}

.dialog-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(184, 207, 235, 0.14);
  border-bottom: 1px solid rgba(184, 207, 235, 0.14);
}

.dialog-detail-grid > div {
  padding: 27px 24px;
  border-right: 1px solid rgba(184, 207, 235, 0.14);
}

.dialog-detail-grid > div:last-child {
  border-right: 0;
}

.dialog-detail-grid p {
  margin: 0;
  color: #b9c7d8;
  font-size: 12px;
  line-height: 1.85;
}

.dialog-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 27px;
}

.dialog-stack span {
  padding: 6px 10px;
  border: 1px solid rgba(184, 207, 235, 0.15);
  border-radius: 999px;
  color: #9eb1c8;
  font-family: var(--font-mono);
  font-size: 8px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 31px;
}

.dialog-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 45px;
  padding: 0 18px;
  border: 1px solid rgba(184, 207, 235, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.dialog-actions a:first-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.command-dialog {
  width: min(calc(100% - 28px), 690px);
  top: 50%;
  right: 0;
  bottom: auto;
  left: 0;
  margin: 0 auto;
  transform: translateY(-50%);
  border-radius: 18px;
}

.command-shell {
  overflow: hidden;
}

.command-top {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid rgba(184, 207, 235, 0.14);
}

.command-top svg {
  width: 21px;
  height: 21px;
  color: #7dc9ff;
}

.command-top input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f4f7fb;
  font-size: 16px;
}

.command-top input::placeholder {
  color: #71849b;
}

.command-top button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(184, 207, 235, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: #8497ad;
  font-family: var(--font-mono);
  font-size: 8px;
  cursor: pointer;
}

.command-results {
  max-height: min(55vh, 460px);
  padding: 8px;
  overflow-y: auto;
}

.command-result {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #dce7f4;
  text-align: left;
  cursor: pointer;
}

.command-result:hover,
.command-result.is-selected {
  background: rgba(79, 140, 255, 0.13);
}

.command-result > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: rgba(79, 140, 255, 0.12);
  color: #7dc9ff;
  font-family: var(--font-mono);
  font-size: 8px;
}

.command-result strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.command-result small {
  color: #72859b;
  font-size: 9px;
}

.command-result > span:last-child {
  color: #61758e;
  font-size: 12px;
}

.command-empty {
  padding: 45px 20px;
  color: #778aa2;
  text-align: center;
  font-size: 12px;
}

.command-footer {
  display: flex;
  gap: 17px;
  padding: 11px 18px;
  border-top: 1px solid rgba(184, 207, 235, 0.12);
  color: #657890;
  font-family: var(--font-mono);
  font-size: 7px;
}

.toast-region {
  position: fixed;
  z-index: 3000;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  width: min(calc(100% - 32px), 340px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid rgba(184, 207, 235, 0.2);
  border-radius: 11px;
  background: rgba(8, 20, 35, 0.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
  color: #e8f1fc;
  font-size: 11px;
  pointer-events: auto;
  animation: toastIn 0.28s ease both;
  backdrop-filter: blur(14px);
}

.toast::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 9px var(--success);
  content: "";
}

.toast.is-error::before {
  background: #ff7d87;
  box-shadow: 0 0 9px #ff7d87;
}

.toast.is-leaving {
  animation: toastOut 0.22s ease both;
}

@keyframes toastIn {
  from { transform: translateY(12px); opacity: 0; }
}

@keyframes toastOut {
  to { transform: translateY(8px); opacity: 0; }
}

.js [data-reveal] {
  transform: translateY(28px);
  opacity: 0;
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js [data-reveal][data-delay="1"] { transition-delay: 0.08s; }
.js [data-reveal][data-delay="2"] { transition-delay: 0.16s; }
.js [data-reveal][data-delay="3"] { transition-delay: 0.24s; }
.js [data-reveal][data-delay="4"] { transition-delay: 0.32s; }
.js [data-reveal][data-delay="5"] { transition-delay: 0.4s; }

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

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

@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.8; }
  75%, 100% { transform: scale(1.8); opacity: 0; }
}

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

@keyframes scan {
  0%, 15% { transform: translateY(-100%); opacity: 0; }
  28% { opacity: 0.42; }
  55% { transform: translateY(700%); opacity: 0; }
  100% { transform: translateY(700%); opacity: 0; }
}

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

@keyframes scrollLine {
  0% { transform: translateX(-120%); }
  65%, 100% { transform: translateX(260%); }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes pulseRing {
  0% { transform: scale(0.75); opacity: 0; }
  30% { opacity: 0.7; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes wave {
  0%, 100% { transform: scaleX(0.8); opacity: 0.35; }
  50% { transform: scaleX(1.1); opacity: 0.8; }
}

@keyframes dash {
  to { stroke-dashoffset: -120; }
}

@keyframes equalize {
  0% { height: 7px; opacity: 0.45; }
  100% { height: 40px; opacity: 1; }
}

@keyframes corePulse {
  0%, 100% { transform: scale(0.98); opacity: 0.25; }
  50% { transform: scale(1.025); opacity: 0.75; }
}

@keyframes dataTravel {
  from { transform: translateX(-3px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  to { transform: translateX(54px); opacity: 0; }
}

@keyframes dataTravelY {
  from { transform: translateY(-3px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  to { transform: translateY(24px); opacity: 0; }
}

@keyframes pingSoft {
  0%, 100% { opacity: 0.45; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.7fr);
    gap: 45px;
  }

  .portrait-frame {
    height: 530px;
  }

  .label-top {
    left: -8%;
  }

  .label-bottom {
    right: -7%;
  }

  .availability-card {
    right: -2%;
  }

  .about-layout {
    grid-template-columns: 1fr 0.9fr;
    gap: 70px;
  }

  .project-wide {
    grid-template-columns: 70px minmax(0, 1fr) minmax(310px, 0.85fr);
  }

  .lab-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  }

  .lab-screen {
    padding-inline: 24px;
  }

  .flow-node {
    min-width: 93px;
    padding: 14px;
  }

  .timeline-item {
    grid-template-columns: 145px 35px minmax(210px, 0.8fr) minmax(280px, 1.2fr);
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .container,
  .nav-shell {
    width: min(calc(100% - 38px), var(--container));
  }

  .nav-shell {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    display: block;
    position: relative;
    z-index: 1003;
    justify-self: end;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    z-index: 1001;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 24px;
    padding: 95px 9vw calc(126px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    background: rgba(5, 13, 24, 0.97);
    opacity: 0;
    transform: translateY(-15px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  }

  .nav-menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-menu a {
    color: var(--text);
    font-size: clamp(28px, 8vw, 48px);
    font-weight: 650;
    letter-spacing: -0.04em;
  }

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

  .nav-resume {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 135px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 78px;
  }

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

  .hero-headline {
    font-size: clamp(58px, 10.5vw, 90px);
  }

  .hero-summary {
    max-width: 700px;
  }

  .hero-visual {
    justify-content: center;
  }

  .portrait-stage {
    width: min(76vw, 440px);
  }

  .portrait-frame {
    height: min(110vw, 600px);
  }

  .hero-scroll {
    display: none;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-copy {
    max-width: 720px;
  }

  .metric-grid {
    max-width: 690px;
  }

  .value-card {
    min-height: 320px;
    padding: 35px 24px;
  }

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

  .project-visual {
    min-height: 510px;
  }

  .project-visual-saas {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-wide {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .wide-graph {
    grid-column: 2;
    min-height: 220px;
    margin: 0 25px 20px 0;
  }

  .timeline-item {
    grid-template-columns: 130px 28px minmax(0, 1fr);
  }

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

  .now-panel {
    min-height: 580px;
  }

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

  .note-card summary {
    min-height: 250px;
  }

  .note-card h3 {
    max-width: 680px;
    margin-top: 47px;
  }

  .timeline-detail {
    grid-column: 3;
  }

  .stack-layout {
    grid-template-columns: 1fr;
  }

  .stack-intro {
    position: static;
  }
}

@media (max-width: 680px) {
  .container,
  .nav-shell {
    width: min(calc(100% - 32px), var(--container));
  }

  .nav-shell {
    height: 72px;
  }

  .brand-role {
    display: none;
  }

  .hero {
    padding: 112px 0 75px;
  }

  .hero-kicker {
    margin-bottom: 21px;
    font-size: 9px;
  }

  .hero-intro {
    margin-bottom: 11px;
  }

  .hero-headline {
    font-size: clamp(46px, 14.5vw, 68px);
    line-height: 1.01;
  }

  .hero-role {
    align-items: flex-start;
    min-height: 45px;
  }

  .hero-summary {
    font-size: 14px;
    line-height: 1.8;
  }

  .button {
    min-height: 49px;
  }

  .hero-meta {
    flex-direction: column;
    gap: 10px;
  }

  .portrait-stage {
    width: min(88vw, 390px);
  }

  .portrait-frame {
    height: min(125vw, 530px);
    border-radius: 170px 170px 23px 23px;
  }

  .label-top {
    top: 16%;
    left: -2%;
  }

  .label-bottom {
    right: -1%;
    bottom: 30%;
  }

  .availability-card {
    right: 3%;
    bottom: -4%;
    min-width: 218px;
  }

  .tech-ribbon {
    transform: rotate(-1.5deg) scale(1.05);
  }

  .ribbon-track {
    height: 54px;
  }

  .section {
    padding: 100px 0;
  }

  .section-heading {
    margin-bottom: 50px;
  }

  .section-heading .section-index {
    margin-bottom: 16px;
  }

  .section-heading h2 {
    font-size: clamp(39px, 11vw, 56px);
  }

  .heading-row {
    display: block;
  }

  .heading-note {
    margin-top: 22px;
  }

  .about {
    padding-top: 120px;
  }

  .about-layout {
    gap: 55px;
  }

  .about-copy .lead-copy {
    font-size: 18px;
  }

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

  .metric-card {
    min-height: 150px;
    padding: 21px;
  }

  .metric-featured {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 210px;
  }

  .metric-number {
    font-size: 58px;
  }

  .value-grid {
    grid-template-columns: 1fr;
    margin-top: 85px;
  }

  .value-card {
    min-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .value-card:last-child {
    border-bottom: 0;
  }

  .value-card svg {
    margin: 31px 0 25px;
  }

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

  .project-card {
    min-height: 500px;
    padding: 26px;
    border-radius: 19px;
  }

  .project-main {
    grid-column: auto;
    padding: 0;
  }

  .project-visual {
    min-height: 390px;
  }

  .saas-window {
    width: 80%;
  }

  .window-body {
    min-height: 215px;
  }

  .window-content {
    padding: 22px 18px;
  }

  .window-heading > span {
    display: none;
  }

  .mini-cards {
    gap: 6px;
  }

  .mini-cards i {
    height: 70px;
    padding: 9px 7px;
  }

  .visual-label,
  .visual-caption {
    right: 16px;
    left: 16px;
  }

  .orbit-coze {
    right: 3%;
  }

  .orbit-n8n {
    left: 4%;
  }

  .project-content {
    padding: 34px 26px 38px;
  }

  .project-card h3 {
    font-size: 29px;
  }

  .project-icon {
    margin-bottom: 50px;
  }

  .project-wide {
    grid-column: auto;
    display: block;
    min-height: 600px;
  }

  .wide-index {
    display: block;
    height: auto;
    padding-bottom: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    writing-mode: initial;
  }

  .wide-copy {
    padding: 32px 0 10px;
  }

  .wide-graph {
    min-height: 220px;
    margin: 10px 0 0;
  }

  .lab-console-top {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    height: 67px;
  }

  .lab-tabs {
    overflow-x: auto;
    padding: 13px;
    scrollbar-width: none;
  }

  .lab-tabs::-webkit-scrollbar {
    display: none;
  }

  .lab-tabs button {
    flex: 0 0 auto;
  }

  .lab-screen {
    min-height: 670px;
    padding: 38px 20px;
  }

  .lab-flow {
    flex-direction: column;
  }

  .flow-node {
    flex: 0 0 108px;
    width: min(100%, 205px);
    min-width: 0;
  }

  .flow-link {
    flex: 0 0 31px;
    width: 1px;
    height: 31px;
  }

  .flow-link::before {
    top: 0;
    left: -2px;
    animation-name: dataTravelY;
  }

  .lab-console-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .now-panel {
    min-height: 610px;
    padding: 29px 24px;
  }

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

  .more-work-actions {
    justify-content: flex-start;
  }

  .timeline-item {
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 12px 18px;
    padding: 32px 0;
  }

  .timeline-date {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
  }

  .timeline-marker {
    grid-column: 1;
    grid-row: 1 / 4;
  }

  .timeline-marker::after {
    top: 9px;
    bottom: -43px;
  }

  .timeline-marker span {
    margin-top: 4px;
  }

  .timeline-company {
    grid-column: 2;
    grid-row: 2;
  }

  .timeline-detail {
    grid-column: 2;
    grid-row: 3;
  }

  .timeline-company h3 {
    font-size: 21px;
  }

  .skill-row {
    grid-template-columns: 34px 1fr;
    padding: 27px 3px;
  }

  .skill-row p {
    grid-column: 2;
  }

  .contact {
    padding: 110px 0 100px;
  }

  .note-card summary {
    min-height: 290px;
    padding: 26px 24px 70px;
  }

  .note-card h3 {
    margin-top: 50px;
    font-size: 25px;
  }

  .note-body {
    padding: 0 24px 27px;
  }

  .personal-manifesto {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .personal-manifesto i {
    width: 100%;
    flex: 0 0 1px;
  }

  .contact h2 {
    font-size: clamp(45px, 13.5vw, 70px);
  }

  .contact-copy br {
    display: none;
  }

  .contact-actions {
    flex-direction: column;
  }

  .contact-mail,
  .contact-phone {
    width: 100%;
    min-width: 0;
  }

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

  .footer-inner p {
    display: none;
  }
}

@media (max-width: 380px) {
  .hero-actions .button {
    width: 100%;
  }

  .floating-label {
    font-size: 7px;
  }

  .label-top {
    left: 0;
  }

  .label-bottom {
    right: 0;
  }

  .availability-card {
    right: 0;
  }
}

@media (max-width: 1120px) {
  .search-trigger kbd {
    display: none;
  }

  .nav-menu {
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .nav-actions {
    display: none;
  }

  .mobile-menu-tools {
    position: fixed;
    z-index: 1002;
    right: 9vw;
    bottom: max(20px, calc(5vh + env(safe-area-inset-bottom)));
    left: 9vw;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  body.menu-open .mobile-menu-tools {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-menu-tools button,
  .mobile-menu-tools a {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    color: #dce8f7;
    font-size: 10px;
    cursor: pointer;
  }

  .mobile-menu-tools button:first-child {
    flex: 1 1 100%;
  }

  .mobile-menu-tools button:not(:first-child),
  .mobile-menu-tools a {
    flex: 1 1 130px;
  }

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

  .contact-functional {
    grid-template-columns: 1fr;
    max-width: 690px;
  }

  .dialog-facts,
  .dialog-detail-grid {
    grid-template-columns: 1fr;
  }

  .dialog-detail-grid > div {
    border-right: 0;
    border-bottom: 1px solid rgba(184, 207, 235, 0.14);
  }

  .dialog-detail-grid > div:last-child {
    border-bottom: 0;
  }
}

/* Compact mobile navigation: keep targets comfortable without oversized display text. */
@media (max-width: 900px) {
  .nav-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(54px, auto);
    align-content: start;
    gap: 10px;
    padding: 92px max(20px, 6vw) calc(118px + env(safe-area-inset-bottom));
  }

  .nav-menu a {
    display: flex;
    min-width: 0;
    min-height: 54px;
    padding: 0 17px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    font-size: clamp(18px, 3.6vw, 23px);
    font-weight: 650;
    letter-spacing: -0.02em;
  }

  .nav-menu a:hover,
  .nav-menu a.is-active {
    border-color: rgba(79, 140, 255, 0.5);
    background: rgba(79, 140, 255, 0.1);
  }

  /* 移动端导航是两列磁贴，六个锚点正好三行，入口独占一整行更好点。 */
  .nav-menu a.nav-menu-cta {
    grid-column: 1 / -1;
    justify-content: center;
    min-height: 58px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: clamp(17px, 3.4vw, 21px);
  }

  .nav-menu a.nav-menu-cta b {
    font-size: 15px;
  }

  .mobile-menu-tools {
    right: max(20px, 6vw);
    bottom: max(14px, calc(3vh + env(safe-area-inset-bottom)));
    left: max(20px, 6vw);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .mobile-menu-tools button,
  .mobile-menu-tools a,
  .mobile-menu-tools button:first-child,
  .mobile-menu-tools button:not(:first-child) {
    min-width: 0;
    min-height: 38px;
    padding: 0 10px;
    justify-content: center;
    font-size: 9px;
    text-align: center;
  }

  .mobile-menu-tools kbd { display: none; }
}

@media (max-width: 480px) {
  .nav-menu {
    gap: 8px;
    padding-inline: 16px;
  }

  .nav-menu a {
    min-height: 50px;
    padding-inline: 14px;
    font-size: 18px;
  }

  .nav-menu a.nav-menu-cta {
    min-height: 54px;
    padding-inline: 14px;
    font-size: 17px;
  }

  .mobile-menu-tools {
    right: 16px;
    left: 16px;
  }
}

@media (max-width: 680px) {
  .project-toolbar {
    margin-top: -12px;
  }

  .project-filters {
    width: 100vw;
    margin-left: calc((100vw - 100%) / -2);
    padding: 0 max(16px, env(safe-area-inset-right)) 7px max(16px, env(safe-area-inset-left));
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .project-filters::-webkit-scrollbar {
    display: none;
  }

  .project-filters button {
    flex: 0 0 auto;
  }

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

  .contact-form {
    padding: 23px 19px;
  }

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

  .form-footer .button {
    width: 100%;
  }

  .footer-actions > button {
    display: none;
  }

  .dialog-shell {
    padding: 56px 22px 27px;
  }

  .project-dialog h2 {
    font-size: 34px;
  }

  .command-top {
    grid-template-columns: 20px 1fr auto;
    padding: 14px;
  }

  .command-top input {
    min-width: 0;
    font-size: 16px;
  }

  .command-top button {
    min-width: 44px;
    min-height: 44px;
    padding-inline: 7px;
  }

  .command-footer {
    gap: 10px;
    flex-wrap: wrap;
    white-space: normal;
  }

  .toast-region {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
  }

  .project-dialog,
  .assistant-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    height: calc(100dvh - 16px);
    overflow: hidden;
  }

  .dialog-close {
    top: 14px;
    right: 14px;
    min-width: 44px;
    min-height: 44px;
  }

  .assistant-dialog {
    height: min(calc(100dvh - 14px), 820px);
    max-height: calc(100dvh - 14px);
  }

  .assistant-shell {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .assistant-messages {
    min-height: 0;
  }

  .assistant-head-actions,
  .assistant-status {
    min-width: 0;
  }

  .assistant-status span {
    max-width: 26vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .assistant-reset,
  .assistant-close,
  .assistant-send {
    min-width: 44px;
    min-height: 44px;
  }

  .assistant-input-row textarea {
    font-size: 16px;
  }

  .assistant-compose-footer {
    min-width: 0;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
  }
}

html[data-theme="light"] .hero-headline em,
html[data-theme="light"] .contact h2 span {
  background-image: linear-gradient(100deg, #14315a 12%, #286ee8 58%, #1687bf 100%);
}

html[data-theme="light"] #network-canvas {
  opacity: 0.2;
}

html[data-theme="light"] .tech-ribbon,
html[data-theme="light"] .stack {
  background-color: rgba(255, 255, 255, 0.56);
}

html[data-theme="light"] .about-copy .lead-copy,
html[data-theme="light"] .education-note strong,
html[data-theme="light"] .value-card h3,
html[data-theme="light"] .timeline-company h3,
html[data-theme="light"] .skill-row h3 {
  color: var(--text);
}

html[data-theme="light"] .metric-card:not(.metric-featured),
html[data-theme="light"] .value-card,
html[data-theme="light"] .skill-row:hover {
  background: rgba(255, 255, 255, 0.62);
}

html[data-theme="light"] .site-footer {
  background: #e5edf8;
}

html[data-theme="light"] {
  --muted: #42566f;
  --muted-2: #526783;
  --line: rgba(35, 69, 111, 0.2);
  --line-strong: rgba(35, 69, 111, 0.4);
  --accent: #1f5fcf;
  --accent-2: #075f9f;
  --success: #08754e;
}

html[data-theme="light"] .button-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.54);
}

html[data-theme="light"] .button-ghost:hover {
  border-color: #286ee8;
  background: rgba(40, 110, 232, 0.1);
  color: #0c2b55;
}

html[data-theme="light"] .button-assistant {
  border-color: #4c9d87;
  background: #e1f5ef;
  color: #0b5a48;
  box-shadow: 0 10px 25px rgba(29, 126, 99, 0.12);
}

html[data-theme="light"] .button-assistant:hover {
  border-color: #187b61;
  background: #c9eee3;
  color: #063f32;
}

html[data-theme="light"] .button-workspace,
html[data-theme="light"] .nav-menu a.nav-menu-cta {
  border-color: #3f74d8;
  background: #e6eeff;
  box-shadow: 0 10px 25px rgba(41, 88, 190, 0.12);
  color: #133a80;
}

html[data-theme="light"] .button-workspace:hover,
html[data-theme="light"] .nav-menu a.nav-menu-cta:hover {
  border-color: #24559f;
  background: #d3e2ff;
  color: #0b2b63;
}

html[data-theme="light"] .nav-menu a.nav-menu-cta b {
  color: rgba(19, 58, 128, 0.62);
}

html[data-theme="light"] .nav-tool {
  background: rgba(255, 255, 255, 0.48);
  color: #334b68;
}

html[data-theme="light"] .nav-tool:hover {
  border-color: #6d8caf;
  background: #fff;
  color: var(--text);
}

html[data-theme="light"] .nav-tool kbd,
html[data-theme="light"] .mobile-menu-tools kbd {
  color: #536a83;
}

html[data-theme="light"] .floating-label {
  border-color: rgba(178, 211, 255, 0.55);
  background: rgba(7, 17, 31, 0.86);
  color: #f1f7ff;
}

html[data-theme="light"] .floating-label span {
  color: #72d6ff;
}

html[data-theme="light"] .availability-card {
  border-color: rgba(182, 211, 248, 0.42);
  background: rgba(10, 22, 38, 0.94);
  color: #f0f6ff;
}

html[data-theme="light"] .availability-card small {
  color: #b6cae1;
}

html[data-theme="light"] .metric-card.metric-featured {
  --text: #f4f7fb;
  --muted: #b9c8da;
  --muted-2: #8ea4be;
  --accent: #4f8cff;
  --accent-2: #7dc9ff;
  --success: #72e5a6;
  color: #f4f7fb;
}

html[data-theme="light"] .metric-card.metric-featured > p:last-of-type {
  color: #b9c8da;
}

html[data-theme="light"] :is(.project-visual, .project-visual-live, .project-visual-digital-human, .project-visual-education, .project-visual-agent, .project-visual-generic, .saas-window, .wide-graph) {
  --text: #f4f7fb;
  --muted: #9aa9bc;
  --muted-2: #6f8198;
  --line: rgba(184, 207, 235, 0.14);
  --line-strong: rgba(184, 207, 235, 0.28);
  --accent: #4f8cff;
  --accent-2: #7dc9ff;
  --success: #72e5a6;
  color: #f4f7fb;
}

html[data-theme="light"] .ribbon-track span {
  color: #334a68;
}

html[data-theme="light"] .metric-card:not(.metric-featured) .metric-number {
  color: var(--text);
}

html[data-theme="light"] .value-card:hover {
  background: #eef4fb;
}

html[data-theme="light"] .project-filters button,
html[data-theme="light"] .contact-quick-actions button,
html[data-theme="light"] .footer-actions > button {
  background: rgba(255, 255, 255, 0.58);
  color: #334b68;
}

html[data-theme="light"] .project-filters button:hover,
html[data-theme="light"] .contact-quick-actions button:hover,
html[data-theme="light"] .footer-actions > button:hover {
  border-color: #6d8caf;
  background: #fff;
  color: var(--text);
}

html[data-theme="light"] .filter-status,
html[data-theme="light"] .content-pagination p {
  color: #536a83;
}

html[data-theme="light"] .content-load-more {
  border-color: #6d8caf;
  background: rgba(255, 255, 255, 0.65);
  color: #0c1a2d;
}

html[data-theme="light"] .content-load-more:hover {
  background: rgba(40, 110, 232, 0.1);
}

@media (max-width: 900px) {
  html[data-theme="light"] .nav-menu {
    border-top: 1px solid rgba(35, 69, 111, 0.16);
    background: rgba(247, 250, 255, 0.98);
  }

  html[data-theme="light"] .nav-menu a {
    color: #0c1a2d;
  }

  html[data-theme="light"] .nav-menu a:hover {
    color: #164fae;
  }

  html[data-theme="light"] .mobile-menu-tools button,
  html[data-theme="light"] .mobile-menu-tools a {
    border-color: rgba(35, 69, 111, 0.28);
    background: rgba(255, 255, 255, 0.72);
    color: #173654;
  }

  html[data-theme="light"] .mobile-menu-tools button:hover,
  html[data-theme="light"] .mobile-menu-tools a:hover {
    border-color: #1f5fcf;
    background: #fff;
    color: #164fae;
  }
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 82% 8%, rgba(66, 133, 224, 0.12), transparent 30rem),
    linear-gradient(180deg, #f7faff 0%, #edf3fb 52%, #f7faff 100%);
}

html[data-theme="light"] .about,
html[data-theme="light"] .experience {
  background: rgba(255, 255, 255, 0.18);
}

html[data-theme="light"] .work {
  background:
    radial-gradient(circle at 18% 28%, rgba(47, 107, 204, 0.08), transparent 32rem),
    linear-gradient(180deg, rgba(228, 237, 249, 0.62), rgba(247, 250, 255, 0.88));
}

html[data-theme="light"] .project-card {
  border-color: rgba(35, 69, 111, 0.22);
  background: #fff;
  box-shadow: 0 20px 55px rgba(43, 72, 110, 0.11);
}

html[data-theme="light"] .project-card:hover {
  border-color: rgba(31, 95, 207, 0.42);
  box-shadow: 0 28px 70px rgba(43, 72, 110, 0.17);
}

html[data-theme="light"] .project-card h3,
html[data-theme="light"] .project-link,
html[data-theme="light"] .wide-copy h3 {
  color: #0c1a2d;
}

html[data-theme="light"] .project-card p,
html[data-theme="light"] .project-highlights li {
  color: #42566f;
}

html[data-theme="light"] .project-card .tag-list span,
html[data-theme="light"] .timeline-detail .tag-list span {
  border-color: rgba(35, 69, 111, 0.24);
  background: #f2f6fc;
  color: #425b79;
}

html[data-theme="light"] .project-detail-button {
  /* creator-refresh 把这按钮改成了整圈描边的胶囊，浅色主题只染下边框会让它几乎看不见。 */
  border-color: rgba(35, 69, 111, 0.42);
  color: #173654;
}

html[data-theme="light"] .project-detail-button:hover {
  border-color: rgba(22, 79, 174, 0.75);
  color: #164fae;
}

html[data-theme="light"] .project-number,
html[data-theme="light"] .wide-index {
  color: rgba(35, 69, 111, 0.4);
}

html[data-theme="light"] .more-work a {
  color: #173654;
}

html[data-theme="light"] .lab {
  border-color: rgba(35, 69, 111, 0.18);
  background:
    radial-gradient(circle at 12% 40%, rgba(47, 107, 204, 0.11), transparent 32rem),
    linear-gradient(180deg, #e7eff9, #f5f8fd);
}

html[data-theme="light"] .lab::before {
  opacity: 0.7;
  background-image:
    linear-gradient(rgba(35, 69, 111, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 69, 111, 0.045) 1px, transparent 1px);
}

html[data-theme="light"] .lab-console,
html[data-theme="light"] .now-panel {
  border-color: rgba(35, 69, 111, 0.22);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 22px 60px rgba(43, 72, 110, 0.12);
}

html[data-theme="light"] .lab-console-top,
html[data-theme="light"] .lab-tabs,
html[data-theme="light"] .lab-console-bottom,
html[data-theme="light"] .now-list article,
html[data-theme="light"] .now-panel blockquote {
  border-color: rgba(35, 69, 111, 0.18);
}

html[data-theme="light"] .lab-screen {
  background:
    radial-gradient(circle at center, rgba(47, 107, 204, 0.12), transparent 50%),
    linear-gradient(rgba(35, 69, 111, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 69, 111, 0.045) 1px, transparent 1px);
  background-size: auto, 29px 29px, 29px 29px;
}

html[data-theme="light"] .lab-tabs button:hover {
  color: #0c1a2d;
}

html[data-theme="light"] .lab-tabs button[aria-selected="true"] {
  border-color: rgba(31, 95, 207, 0.38);
  background: rgba(31, 95, 207, 0.1);
  color: #164fae;
}

html[data-theme="light"] .flow-node {
  border-color: rgba(35, 69, 111, 0.25);
  background: #fff;
  box-shadow: 0 14px 30px rgba(43, 72, 110, 0.12);
}

html[data-theme="light"] .flow-node strong,
html[data-theme="light"] .now-panel > h3,
html[data-theme="light"] .now-panel blockquote {
  color: #0c1a2d;
}

html[data-theme="light"] .flow-node small,
html[data-theme="light"] .flow-node span,
html[data-theme="light"] .lab-console-top,
html[data-theme="light"] .console-coordinates,
html[data-theme="light"] .now-live,
html[data-theme="light"] .now-list small {
  color: #526783;
}

html[data-theme="light"] .lab-console-bottom p strong,
html[data-theme="light"] .now-list p {
  color: #42566f;
}

html[data-theme="light"] .now-panel {
  background:
    radial-gradient(circle at 100% 0%, rgba(47, 107, 204, 0.12), transparent 44%),
    rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .timeline-item:hover {
  background: linear-gradient(90deg, transparent, rgba(31, 95, 207, 0.07), transparent);
}

html[data-theme="light"] .notes {
  background:
    radial-gradient(circle at 85% 35%, rgba(45, 105, 199, 0.1), transparent 32rem),
    #e9f0f9;
}

html[data-theme="light"] .note-card {
  border-color: rgba(35, 69, 111, 0.2);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(43, 72, 110, 0.09);
}

html[data-theme="light"] .note-card:hover,
html[data-theme="light"] .note-card[open] {
  border-color: rgba(31, 95, 207, 0.38);
  background: #fff;
}

html[data-theme="light"] .note-card h3,
html[data-theme="light"] .personal-manifesto p {
  color: #0c1a2d;
}

html[data-theme="light"] .note-card summary > p,
html[data-theme="light"] .note-body p {
  color: #42566f;
}

html[data-theme="light"] .contact {
  border-color: rgba(35, 69, 111, 0.2);
  background:
    radial-gradient(circle at 15% 95%, rgba(31, 95, 207, 0.13), transparent 38%),
    radial-gradient(circle at 90% 0%, rgba(18, 126, 176, 0.09), transparent 35%),
    #edf3fb;
  color: #0c1a2d;
}

html[data-theme="light"] .contact-grid {
  opacity: 0.7;
  background-image:
    linear-gradient(rgba(35, 69, 111, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 69, 111, 0.045) 1px, transparent 1px);
}

html[data-theme="light"] .contact-copy,
html[data-theme="light"] .form-heading p {
  color: #42566f;
}

html[data-theme="light"] .contact-phone,
html[data-theme="light"] .contact-form {
  border-color: rgba(35, 69, 111, 0.24);
  background: rgba(255, 255, 255, 0.86);
  color: #0c1a2d;
  box-shadow: 0 20px 55px rgba(43, 72, 110, 0.1);
}

html[data-theme="light"] .contact-phone span {
  color: #526783;
}

html[data-theme="light"] .contact-phone strong,
html[data-theme="light"] .form-heading h3,
html[data-theme="light"] .contact-form label {
  color: #173654;
}

html[data-theme="light"] .contact-form label small {
  color: #526783;
}

html[data-theme="light"] .contact-form input,
html[data-theme="light"] .contact-form textarea {
  border-color: rgba(35, 69, 111, 0.28);
  background: #fff;
  color: #0c1a2d;
}

html[data-theme="light"] .contact-form input::placeholder,
html[data-theme="light"] .contact-form textarea::placeholder {
  color: #687b94;
}

html[data-theme="light"] .contact-form input:focus,
html[data-theme="light"] .contact-form textarea:focus {
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  #network-canvas {
    display: none;
  }
}

@media (max-width: 680px) {
  .contact-form input,
  .contact-form textarea {
    font-size: 16px;
  }
}

@media (max-height: 620px) and (max-width: 900px) {
  .nav-menu {
    gap: 14px;
    padding-top: 76px;
    padding-bottom: calc(132px + env(safe-area-inset-bottom));
  }

  .nav-menu a {
    font-size: clamp(25px, 7vw, 34px);
  }

  .mobile-menu-tools {
    bottom: max(8px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 600px) {
  body.chat-open .toast-region {
    bottom: calc(max(380px, min(68dvh, 560px)) + 24px);
  }
}

@media print {
  .site-header,
  .scroll-progress,
  #network-canvas,
  .ambient,
  .hero-scroll,
  .tech-ribbon,
  .contact-grid {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .hero,
  .section,
  .contact {
    padding: 40px 0;
    background: #fff;
  }
}

/* Responsive hardening: fluid media, safe wrapping and compact-device layouts. */
html,
body {
  min-width: 0;
  max-width: 100%;
}

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

:where(.hero-copy, .project-content, .wide-copy, .timeline-company, .timeline-detail, .contact-inner, .contact-methods) {
  min-width: 0;
}

:where(.hero-headline, .section-heading h2, .project-card h3, .contact h2, .contact-mail strong, .contact-phone strong) {
  overflow-wrap: anywhere;
}

section[id] {
  scroll-margin-top: 88px;
}

@media (max-width: 900px) {
  .hero-grid,
  .about-layout,
  .lab-layout,
  .contact-functional {
    min-width: 0;
  }

  .project-main {
    overflow: hidden;
  }

  .project-content {
    width: 100%;
  }

  .timeline-detail p,
  .project-content p,
  .note-body,
  .contact-copy {
    max-width: 70ch;
  }
}

@media (max-width: 680px) {
  .container,
  .nav-shell {
    width: min(calc(100% - 24px), var(--container));
  }

  .nav-shell {
    height: 66px;
  }

  .hero {
    padding-top: 96px;
  }

  .hero-grid {
    gap: 54px;
  }

  .hero-headline {
    font-size: clamp(40px, 13.5vw, 62px);
    letter-spacing: -0.062em;
  }

  .hero-intro {
    font-size: clamp(15px, 4.8vw, 19px);
  }

  .hero-role {
    gap: 9px;
    font-size: 10px;
  }

  .role-rotator {
    min-width: 0;
    overflow-wrap: anywhere;
  }

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

  .hero-actions .button {
    width: 100%;
    min-width: 0;
    padding-inline: 14px;
  }

  .portrait-stage {
    width: min(100%, 370px);
  }

  .portrait-frame {
    height: clamp(370px, 119vw, 510px);
  }

  .section {
    padding-block: clamp(76px, 22vw, 100px);
  }

  .project-card {
    min-height: 0;
    padding: 21px;
  }

  .project-main {
    padding: 0;
  }

  .project-visual {
    min-height: clamp(300px, 96vw, 390px);
  }

  .project-content {
    padding: 30px 21px 33px;
  }

  .project-card h3 {
    font-size: clamp(25px, 8.5vw, 31px);
  }

  .project-topline {
    gap: 10px;
  }

  .project-link,
  .menu-toggle,
  .lab-tabs button,
  .project-filters button,
  .pagination-more {
    min-width: 44px;
    min-height: 44px;
  }

  .lab-screen {
    min-height: 0;
    padding: 32px 16px;
  }

  .flow-node {
    width: min(100%, 230px);
  }

  .now-panel {
    min-height: 0;
  }

  .timeline-item {
    gap: 10px 14px;
  }

  .skill-row p,
  .timeline-detail,
  .contact-copy,
  .more-work p {
    overflow-wrap: anywhere;
  }

  .contact h2 {
    font-size: clamp(38px, 12.5vw, 58px);
  }

  .contact-mail,
  .contact-phone {
    padding-inline: 18px;
  }

  .contact-mail strong,
  .contact-phone strong {
    font-size: clamp(14px, 4.4vw, 18px);
  }

  .dialog-shell {
    width: 100%;
    max-height: none;
    height: 100%;
    margin: 0;
    padding: 72px 22px max(27px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }

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

  .metric-featured {
    grid-column: auto;
  }

  .floating-label {
    display: none;
  }

  .availability-card {
    right: 12px;
    left: 12px;
    min-width: 0;
  }

  .project-content,
  .contact-form,
  .note-card summary,
  .note-body,
  .now-panel {
    padding-right: 16px;
    padding-left: 16px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-block: 22px;
  }

  .footer-actions {
    justify-content: flex-start;
  }
}

@media (hover: none) and (pointer: coarse) {
  :where(a, button, summary) {
    touch-action: manipulation;
  }

  .project-card:hover,
  .value-card:hover,
  .skill-row:hover {
    transform: none;
  }
}

/* CMS project previews: each project keeps a meaningful product scene instead of a decorative index. */
.project-card-rich-visual:not(.project-main):not(.project-wide) {
  display: grid;
  min-height: 690px;
  padding: 0;
  grid-template-rows: minmax(278px, 0.82fr) auto;
  justify-content: stretch;
}

.project-card-rich-visual:not(.project-main):not(.project-wide) > .project-content {
  justify-content: flex-start;
  padding: 30px 32px 36px;
}

.project-card-rich-visual:not(.project-main):not(.project-wide) .project-topline {
  margin-bottom: 16px;
}

.project-card-rich-visual:not(.project-main):not(.project-wide) h3 {
  margin-bottom: 14px;
  font-size: clamp(26px, 2.3vw, 34px);
}

@media (min-width: 901px) {
  .project-card-rich-visual.is-grid-orphan:not(.project-main):not(.project-wide),
  .project-grid.is-single .project-card-rich-visual:not(.project-main):not(.project-wide) {
    min-height: 500px;
    grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
    grid-template-rows: none;
  }

  .project-card-rich-visual.is-grid-orphan:not(.project-main):not(.project-wide) > .project-visual,
  .project-grid.is-single .project-card-rich-visual:not(.project-main):not(.project-wide) > .project-visual {
    min-height: 100%;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .project-card-rich-visual.is-grid-orphan:not(.project-main):not(.project-wide) > .project-content,
  .project-grid.is-single .project-card-rich-visual:not(.project-main):not(.project-wide) > .project-content {
    justify-content: center;
    padding: clamp(38px, 4.5vw, 58px);
  }
}

.project-card-rich-visual.project-wide {
  display: grid;
  min-height: 500px;
  padding: 0;
  grid-template-columns: minmax(390px, 0.92fr) minmax(0, 1.08fr);
  gap: 0;
}

.project-card-rich-visual.project-wide > .project-content {
  justify-content: center;
  padding: clamp(40px, 5vw, 66px);
}

.project-visual-live,
.project-visual-digital-human,
.project-visual-education,
.project-visual-agent,
.project-visual-generic {
  position: relative;
  display: grid;
  min-height: 278px;
  padding: 56px 25px 45px;
  place-items: center;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.project-wide > .project-visual-education,
.project-wide > .project-visual-agent,
.project-wide > .project-visual-generic {
  min-height: 100%;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.project-visual-live {
  background:
    linear-gradient(rgba(117, 228, 193, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 228, 193, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 28% 20%, rgba(37, 203, 153, 0.2), transparent 45%),
    #081c26;
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.project-visual-digital-human {
  background:
    linear-gradient(rgba(150, 132, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 132, 255, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 76% 35%, rgba(135, 105, 255, 0.22), transparent 48%),
    #14142a;
  background-size: 30px 30px, 30px 30px, auto, auto;
}

.project-visual-education {
  background:
    linear-gradient(rgba(91, 163, 255, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 163, 255, 0.065) 1px, transparent 1px),
    radial-gradient(circle at 50% 48%, rgba(66, 134, 255, 0.24), transparent 52%),
    #0a192d;
  background-size: 34px 34px, 34px 34px, auto, auto;
}

.project-visual-agent {
  background:
    linear-gradient(rgba(126, 173, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 173, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 17% 13%, rgba(83, 214, 255, 0.15), transparent 42%),
    radial-gradient(circle at 83% 80%, rgba(124, 110, 255, 0.2), transparent 48%),
    #070f1f;
  background-size: 26px 26px, 26px 26px, auto, auto, auto;
}

.project-visual-generic {
  background: radial-gradient(circle at 50% 50%, rgba(79, 140, 255, 0.24), transparent 54%), #0b192b;
}

.project-viz-shell {
  position: relative;
  z-index: 2;
  width: min(100%, 500px);
  overflow: hidden;
  border: 1px solid rgba(177, 210, 246, 0.2);
  border-radius: 10px;
  background: rgba(6, 17, 29, 0.84);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32), inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(13px);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.project-card-rich-visual:hover .project-viz-shell {
  border-color: rgba(153, 201, 255, 0.36);
  box-shadow: 0 30px 68px rgba(0, 0, 0, 0.42), 0 0 42px rgba(82, 151, 255, 0.1);
  transform: translateY(-4px);
}

.project-viz-toolbar {
  display: flex;
  height: 34px;
  padding: 0 11px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(183, 211, 244, 0.11);
  color: rgba(210, 228, 249, 0.66);
  font: 700 7px/1 var(--font-mono);
}

.project-viz-toolbar > b {
  min-width: 0;
  overflow: hidden;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-viz-toolbar > em {
  display: inline-flex;
  margin-left: auto;
  align-items: center;
  gap: 5px;
  color: #6ce6bd;
  font-style: normal;
  letter-spacing: 0;
  white-space: nowrap;
}

.project-viz-toolbar > em > i,
.live-viz-status i,
.live-viz-reply footer i,
.agent-viz-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #57ddb1;
  box-shadow: 0 0 9px rgba(87, 221, 177, 0.8);
  animation: projectVizSignal 1.8s ease-in-out infinite;
}

.project-viz-dots {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.project-viz-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(185, 210, 243, 0.26);
}

.project-viz-dots i:first-child {
  background: var(--accent);
}

.project-viz-particles {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.project-viz-particles i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(151, 201, 255, 0.64);
  box-shadow: 0 0 10px rgba(105, 174, 255, 0.75);
  animation: projectVizParticle 6s ease-in-out infinite;
}

.project-viz-particles i:nth-child(1) { top: 17%; left: 10%; }
.project-viz-particles i:nth-child(2) { top: 29%; right: 11%; animation-delay: -1.1s; }
.project-viz-particles i:nth-child(3) { bottom: 18%; left: 16%; animation-delay: -2.7s; }
.project-viz-particles i:nth-child(4) { right: 8%; bottom: 25%; animation-delay: -3.8s; }
.project-viz-particles i:nth-child(5) { top: 12%; left: 55%; animation-delay: -4.6s; }
.project-viz-particles i:nth-child(6) { right: 29%; bottom: 10%; animation-delay: -0.7s; }
.project-viz-particles i:nth-child(7) { top: 51%; left: 5%; animation-delay: -2s; }
.project-viz-particles i:nth-child(8) { top: 62%; right: 4%; animation-delay: -5s; }

/* Live assistant preview */
.live-viz-body {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(112px, 0.82fr);
  min-height: 166px;
}

.live-viz-feed {
  padding: 12px 11px;
  border-right: 1px solid rgba(183, 211, 244, 0.1);
}

.live-viz-feed-head,
.live-viz-reply > div,
.live-viz-status,
.human-viz-heading,
.human-viz-meta,
.education-viz-sources {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(181, 207, 238, 0.48);
  font: 700 6px/1 var(--font-mono);
}

.live-viz-feed-head {
  margin-bottom: 7px;
}

.live-viz-feed-head b {
  color: #61ddb5;
  font-weight: 700;
}

.live-viz-message {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 39px;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.live-viz-message.is-new {
  border-color: rgba(76, 215, 170, 0.18);
  background: rgba(63, 206, 161, 0.08);
  animation: projectVizMessage 3.8s ease-in-out infinite;
}

.live-viz-message > i {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(83, 212, 173, 0.38), rgba(72, 137, 236, 0.24));
  color: #e6fff8;
  font: 700 7px/1 var(--font-mono);
}

.live-viz-message > span,
.live-viz-message b,
.live-viz-message small {
  display: block;
  min-width: 0;
}

.live-viz-message b {
  margin-bottom: 3px;
  overflow: hidden;
  color: rgba(219, 234, 250, 0.8);
  font: 650 7px/1 var(--font-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-viz-message small {
  overflow: hidden;
  color: rgba(179, 203, 232, 0.47);
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-viz-message time {
  color: rgba(158, 190, 229, 0.32);
  font: 600 5px/1 var(--font-mono);
}

.live-viz-reply {
  display: flex;
  min-width: 0;
  padding: 13px 11px;
  flex-direction: column;
}

.live-viz-reply > div b {
  color: #8bbdff;
}

.live-viz-reply p {
  margin: 15px 0 auto;
  padding: 9px;
  border: 1px solid rgba(100, 172, 255, 0.15);
  border-radius: 7px 7px 7px 2px;
  background: rgba(73, 142, 238, 0.1);
  color: rgba(219, 235, 253, 0.76);
  font-size: 7px;
  line-height: 1.65;
}

.live-viz-reply footer {
  display: flex;
  margin-top: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: rgba(173, 202, 237, 0.43);
  font: 600 5px/1 var(--font-mono);
}

.live-viz-reply footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.live-viz-status {
  height: 29px;
  padding: 0 11px;
  border-top: 1px solid rgba(183, 211, 244, 0.1);
  justify-content: flex-start;
}

.live-viz-status span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.live-viz-status span + span {
  margin-left: auto;
}

/* Digital-human production preview */
.human-viz-body {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1.2fr);
  min-height: 161px;
}

.human-viz-preview {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  border-right: 1px solid rgba(183, 211, 244, 0.1);
  background: radial-gradient(circle at 50% 45%, rgba(135, 110, 255, 0.18), transparent 54%);
}

.human-viz-preview > small {
  position: absolute;
  bottom: 9px;
  color: rgba(193, 184, 255, 0.54);
  font: 700 5px/1 var(--font-mono);
}

.human-viz-scan {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(151, 225, 255, 0.9), transparent);
  box-shadow: 0 0 12px rgba(151, 225, 255, 0.65);
  animation: projectVizScan 3.2s linear infinite;
}

.human-viz-orbit {
  position: relative;
  display: grid;
  width: 96px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(157, 139, 255, 0.22);
  border-radius: 50%;
}

.human-viz-orbit > i {
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(135, 199, 255, 0.22);
  border-radius: 50%;
  animation: projectVizOrbit 14s linear infinite;
}

.human-viz-orbit > i:nth-child(2) {
  inset: -8px;
  border-color: rgba(164, 134, 255, 0.12);
  animation-direction: reverse;
  animation-duration: 20s;
}

.human-viz-avatar {
  position: relative;
  width: 50px;
  height: 70px;
}

.human-viz-avatar > span {
  position: absolute;
  top: 0;
  left: 14px;
  width: 23px;
  height: 27px;
  border: 1px solid rgba(210, 220, 255, 0.65);
  border-radius: 47% 47% 44% 44%;
  background: linear-gradient(145deg, rgba(181, 166, 255, 0.42), rgba(79, 140, 255, 0.12));
  box-shadow: inset 0 -7px rgba(8, 19, 35, 0.25);
}

.human-viz-avatar > b {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 38px;
  border: 1px solid rgba(210, 220, 255, 0.45);
  border-radius: 26px 26px 8px 8px;
  background: linear-gradient(145deg, rgba(133, 113, 248, 0.36), rgba(56, 113, 197, 0.1));
}

.human-viz-controls {
  min-width: 0;
  padding: 13px 12px;
}

.human-viz-heading {
  margin-bottom: 11px;
}

.human-viz-heading b {
  color: rgba(198, 189, 255, 0.76);
}

.human-viz-wave {
  display: flex;
  height: 38px;
  margin-bottom: 10px;
  align-items: center;
  gap: 3px;
  overflow: hidden;
}

.human-viz-wave i {
  width: 2px;
  height: 40%;
  flex: 1 1 auto;
  max-width: 3px;
  border-radius: 2px;
  background: linear-gradient(#88dbff, #8e76f5);
  transform-origin: center;
  animation: projectVizWave 1s ease-in-out infinite alternate;
}

.human-viz-wave i:nth-child(3n + 1) { animation-delay: -0.72s; }
.human-viz-wave i:nth-child(3n + 2) { animation-delay: -0.38s; }
.human-viz-wave i:nth-child(4n) { animation-delay: -0.9s; }

.human-viz-task {
  display: flex;
  height: 23px;
  align-items: center;
  justify-content: space-between;
  color: rgba(187, 208, 237, 0.53);
  font: 650 6px/1 var(--font-mono);
}

.human-viz-task span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.human-viz-task i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6dddb8;
}

.human-viz-task:nth-of-type(4) i {
  background: #8b81ff;
  box-shadow: 0 0 8px rgba(139, 129, 255, 0.7);
  animation: projectVizSignal 1.6s ease-in-out infinite;
}

.human-viz-task b {
  color: rgba(199, 191, 255, 0.7);
  font-weight: 700;
}

.human-viz-progress {
  height: 3px;
  margin: 4px 0 10px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(174, 197, 230, 0.1);
}

.human-viz-progress i {
  display: block;
  width: 72%;
  height: 100%;
  background: linear-gradient(90deg, #548ff2, #9b7df6);
  animation: projectVizProgress 3.6s ease-in-out infinite;
}

.human-viz-timeline {
  position: relative;
  display: flex;
  height: 30px;
  padding: 0 13px;
  align-items: center;
  gap: 5px;
  border-top: 1px solid rgba(183, 211, 244, 0.1);
}

.human-viz-timeline > span {
  width: 23%;
  height: 6px;
  border-radius: 2px;
  background: rgba(101, 157, 239, 0.28);
}

.human-viz-timeline > i {
  width: 12%;
  height: 6px;
  border-radius: 2px;
  background: rgba(159, 128, 244, 0.2);
}

.human-viz-timeline > b {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 42%;
  width: 1px;
  background: #93d9ff;
  box-shadow: 0 0 8px rgba(147, 217, 255, 0.75);
  animation: projectVizPlayhead 4.5s linear infinite;
}

/* Education Agent graph preview */
.education-viz-workspace {
  max-width: 470px;
}

.education-viz-body {
  padding: 16px 14px 14px;
}

.education-viz-flow {
  display: grid;
  grid-template-columns: minmax(48px, 1fr) 18px minmax(48px, 1fr) 18px minmax(48px, 1fr) 18px minmax(48px, 1fr);
  align-items: center;
  margin-bottom: 13px;
}

.education-viz-node {
  position: relative;
  display: flex;
  min-width: 0;
  height: 67px;
  padding: 8px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(139, 181, 239, 0.15);
  border-radius: 7px;
  background: rgba(54, 111, 190, 0.08);
}

.education-viz-node small,
.education-viz-node span {
  color: rgba(167, 197, 235, 0.38);
  font: 650 5px/1 var(--font-mono);
}

.education-viz-node b {
  overflow: hidden;
  color: rgba(222, 237, 254, 0.78);
  font: 700 8px/1 var(--font-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.education-viz-node.node-rag {
  border-color: rgba(91, 153, 248, 0.42);
  background: linear-gradient(145deg, rgba(74, 140, 242, 0.24), rgba(81, 125, 195, 0.08));
  box-shadow: 0 0 22px rgba(67, 137, 241, 0.1);
  animation: projectVizNode 2.8s ease-in-out infinite;
}

.education-viz-link {
  position: relative;
  display: block;
  height: 1px;
  overflow: hidden;
  background: rgba(122, 174, 239, 0.18);
}

.education-viz-link b {
  position: absolute;
  width: 6px;
  height: 1px;
  background: #74b5ff;
  box-shadow: 0 0 7px #74b5ff;
  animation: projectVizPacket 1.65s linear infinite;
}

.education-viz-link.link-b b { animation-delay: -0.55s; }
.education-viz-link.link-c b { animation-delay: -1.1s; }

.education-viz-output {
  padding: 10px;
  border: 1px solid rgba(146, 184, 233, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
}

.education-viz-sources b {
  color: #87baff;
}

.education-viz-answer {
  display: grid;
  grid-template-columns: 23px 1fr;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.education-viz-answer > i {
  display: block;
  width: 23px;
  height: 23px;
  border: 1px solid rgba(122, 179, 248, 0.3);
  border-radius: 7px;
  background: radial-gradient(circle, rgba(95, 159, 248, 0.38), rgba(72, 125, 208, 0.06));
  box-shadow: 0 0 13px rgba(79, 140, 255, 0.14);
}

.education-viz-answer span,
.education-viz-answer small {
  display: block;
}

.education-viz-answer b {
  display: block;
  margin-bottom: 5px;
  color: rgba(218, 234, 252, 0.68);
  font: 650 7px/1 var(--font-sans);
}

.education-viz-answer small {
  width: 88%;
  height: 3px;
  margin-top: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(120, 172, 241, 0.3) 75%, rgba(120, 172, 241, 0.06) 75%);
  animation: projectVizStream 2.4s ease-in-out infinite;
}

.education-viz-answer small:nth-child(3) { width: 71%; animation-delay: -0.8s; }
.education-viz-answer small:nth-child(4) { width: 48%; animation-delay: -1.6s; }

.education-viz-tools {
  display: flex;
  margin-top: 9px;
  gap: 5px;
}

.education-viz-tools span {
  padding: 4px 6px;
  border: 1px solid rgba(132, 178, 237, 0.14);
  border-radius: 4px;
  color: rgba(168, 198, 235, 0.42);
  font: 650 5px/1 var(--font-mono);
}

/* AI Workspace preview —— 三栏和真实 /agent 外壳一致：导航轨 · 会话流 · 工作面板 */
.agent-viz-workspace {
  max-width: 486px;
}

.agent-viz-body {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr) 96px;
  gap: 8px;
  padding: 15px 13px;
}

.agent-viz-rail {
  display: grid;
  padding: 6px 0;
  align-content: start;
  justify-items: center;
  gap: 6px;
  border: 1px solid rgba(139, 181, 239, 0.13);
  border-radius: 6px;
  background: rgba(72, 118, 196, 0.09);
}

.agent-viz-mark {
  display: grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border-radius: 4px;
  background: linear-gradient(140deg, #57d6ff, #7c6eff);
  color: #04101f;
  font: 800 5px/1 var(--font-mono);
}

.agent-viz-rail i {
  display: block;
  width: 9px;
  height: 3px;
  border-radius: 2px;
  background: rgba(167, 197, 235, 0.2);
}

.agent-viz-rail i.is-active {
  width: 11px;
  background: #6fc7ff;
  box-shadow: 0 0 8px rgba(111, 199, 255, 0.7);
}

.agent-viz-thread {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 9px;
}

.agent-viz-ask {
  justify-self: end;
  max-width: 92%;
  padding: 6px 8px;
  border: 1px solid rgba(122, 174, 239, 0.24);
  border-radius: 7px 7px 2px 7px;
  background: linear-gradient(140deg, rgba(86, 160, 255, 0.26), rgba(112, 104, 236, 0.16));
}

.agent-viz-ask b {
  color: rgba(226, 239, 255, 0.84);
  font: 650 7px/1.35 var(--font-sans);
}

.agent-viz-plan {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.agent-viz-step {
  position: relative;
  padding: 4px 6px 4px 12px;
  border: 1px solid rgba(132, 178, 237, 0.14);
  border-radius: 4px;
  color: rgba(168, 198, 235, 0.44);
  font: 650 6px/1 var(--font-sans);
}

.agent-viz-step::before {
  position: absolute;
  top: 50%;
  left: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(168, 198, 235, 0.3);
  content: "";
  transform: translateY(-50%);
}

.agent-viz-step.is-done {
  border-color: rgba(103, 214, 174, 0.22);
  color: rgba(139, 231, 197, 0.66);
}

.agent-viz-step.is-done::before {
  background: #6ce6bd;
}

.agent-viz-step.is-active {
  border-color: rgba(91, 153, 248, 0.42);
  background: linear-gradient(145deg, rgba(74, 140, 242, 0.2), rgba(81, 125, 195, 0.06));
  color: rgba(222, 237, 254, 0.82);
  animation: projectVizNode 2.8s ease-in-out infinite;
}

.agent-viz-step.is-active::before {
  background: #74b5ff;
  box-shadow: 0 0 7px #74b5ff;
}

.agent-viz-reply {
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 7px;
  align-items: center;
}

.agent-viz-reply > i {
  display: block;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(122, 179, 248, 0.3);
  border-radius: 5px;
  background: radial-gradient(circle, rgba(95, 159, 248, 0.38), rgba(72, 125, 208, 0.06));
  box-shadow: 0 0 12px rgba(79, 140, 255, 0.14);
}

.agent-viz-reply small {
  display: block;
  width: 90%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(120, 172, 241, 0.3) 75%, rgba(120, 172, 241, 0.06) 75%);
  animation: projectVizStream 2.4s ease-in-out infinite;
}

.agent-viz-reply small + small {
  margin-top: 3px;
}

.agent-viz-reply small:nth-child(2) { width: 74%; animation-delay: -0.8s; }
.agent-viz-reply small:nth-child(3) { width: 52%; animation-delay: -1.6s; }

/* 真实技能名，顺手把"这些步骤到底调了什么"说清楚。 */
.agent-viz-trace {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px dashed rgba(146, 184, 233, 0.13);
}

.agent-viz-trace span {
  padding: 3px 5px;
  border-radius: 3px;
  background: rgba(146, 184, 233, 0.07);
  color: rgba(168, 198, 235, 0.42);
  font: 650 5px/1 var(--font-mono);
}

.agent-viz-pane {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 8px 7px;
  border: 1px solid rgba(146, 184, 233, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
}

.agent-viz-pane-head {
  display: grid;
  gap: 3px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(146, 184, 233, 0.1);
}

.agent-viz-pane small,
.agent-viz-field span {
  color: rgba(167, 197, 235, 0.4);
  font: 650 5px/1 var(--font-mono);
}

.agent-viz-pane-head b {
  overflow: hidden;
  color: rgba(222, 237, 254, 0.78);
  font: 700 7px/1 var(--font-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-viz-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.agent-viz-field span {
  color: rgba(213, 231, 251, 0.6);
}

.agent-viz-meter {
  height: 3px;
  margin-top: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(146, 184, 233, 0.12);
}

.agent-viz-meter b {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #57d6ff, #7c6eff);
  transform-origin: left center;
  animation: agentVizMeter 3.2s ease-in-out infinite;
}

.agent-viz-run {
  margin-top: 2px;
  padding: 5px 0;
  border: 1px solid rgba(91, 153, 248, 0.34);
  border-radius: 4px;
  background: rgba(74, 140, 242, 0.16);
  color: rgba(226, 239, 255, 0.82);
  font: 700 5px/1 var(--font-mono);
  text-align: center;
}

.agent-viz-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border-top: 1px solid rgba(183, 211, 244, 0.11);
  color: rgba(168, 198, 235, 0.46);
  font: 650 5px/1 var(--font-mono);
}

.agent-viz-status span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.agent-viz-status span:last-child {
  margin-left: auto;
}

.agent-viz-status i {
  flex: 0 0 auto;
}

.generic-viz-system {
  display: grid;
  width: 150px;
  aspect-ratio: 1;
  place-items: center;
  overflow: visible;
  border-radius: 50%;
}

.generic-viz-system > i {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(120, 176, 248, 0.2);
  border-radius: 50%;
  animation: projectVizOrbit 14s linear infinite;
}

.generic-viz-system > i:nth-child(2) { inset: -14px; border-style: dashed; animation-direction: reverse; }
.generic-viz-system > i:nth-child(3) { inset: 42px; background: rgba(79, 140, 255, 0.12); }

.generic-viz-system > b {
  z-index: 2;
  color: #cfe2fb;
  font: 700 22px/1 var(--font-mono);
}

.generic-viz-system > span {
  position: absolute;
  bottom: 23px;
  color: rgba(176, 204, 239, 0.45);
  font: 650 5px/1 var(--font-mono);
}

@keyframes projectVizParticle {
  0%, 100% { transform: translate3d(0, 7px, 0) scale(0.7); opacity: 0.18; }
  45% { transform: translate3d(8px, -8px, 0) scale(1); opacity: 0.72; }
}

@keyframes projectVizSignal {
  0%, 100% { opacity: 0.45; transform: scale(0.78); }
  50% { opacity: 1; transform: scale(1.12); }
}

@keyframes projectVizMessage {
  0%, 72%, 100% { border-color: rgba(76, 215, 170, 0.16); }
  8%, 30% { border-color: rgba(76, 215, 170, 0.42); box-shadow: 0 0 14px rgba(63, 206, 161, 0.08); }
}

@keyframes projectVizScan {
  0% { transform: translateY(17px); opacity: 0; }
  12%, 82% { opacity: 0.7; }
  100% { transform: translateY(143px); opacity: 0; }
}

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

@keyframes projectVizWave {
  from { transform: scaleY(0.28); opacity: 0.42; }
  to { transform: scaleY(1); opacity: 0.92; }
}

@keyframes projectVizProgress {
  0%, 100% { width: 52%; }
  55% { width: 88%; }
}

@keyframes projectVizPlayhead {
  0% { left: 13%; opacity: 0; }
  8%, 90% { opacity: 0.9; }
  100% { left: 88%; opacity: 0; }
}

@keyframes projectVizNode {
  0%, 100% { border-color: rgba(91, 153, 248, 0.26); }
  50% { border-color: rgba(111, 179, 255, 0.62); box-shadow: 0 0 26px rgba(67, 137, 241, 0.16); }
}

@keyframes projectVizPacket {
  from { left: -6px; opacity: 0; }
  18%, 82% { opacity: 1; }
  to { left: 100%; opacity: 0; }
}

@keyframes projectVizStream {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.82; }
}

@keyframes agentVizMeter {
  0%, 100% { transform: scaleX(0.62); }
  50% { transform: scaleX(0.79); }
}

@media (max-width: 900px) {
  .project-card-rich-visual.project-wide {
    grid-template-columns: 1fr;
  }

  .project-wide > .project-visual-education,
  .project-wide > .project-visual-agent,
  .project-wide > .project-visual-generic {
    min-height: 370px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .project-card-rich-visual:not(.project-main):not(.project-wide) {
    min-height: 0;
    grid-template-rows: minmax(286px, auto) auto;
  }

  .project-card-rich-visual:not(.project-main):not(.project-wide),
  .project-card-rich-visual.project-wide {
    padding: 0;
  }

  .project-card-rich-visual:not(.project-main):not(.project-wide) > .project-content,
  .project-card-rich-visual.project-wide > .project-content {
    padding: 28px 21px 32px;
  }

  .project-visual-live,
  .project-visual-digital-human,
  .project-visual-education,
  .project-visual-agent,
  .project-visual-generic,
  .project-wide > .project-visual-education,
  .project-wide > .project-visual-agent,
  .project-wide > .project-visual-generic {
    min-height: 315px;
    padding: 54px 14px 45px;
  }

  .project-viz-shell {
    width: 100%;
  }

  .visual-caption {
    font-size: 6px;
  }

  .education-viz-body {
    padding-inline: 9px;
  }

  .education-viz-flow {
    grid-template-columns: minmax(44px, 1fr) 10px minmax(44px, 1fr) 10px minmax(44px, 1fr) 10px minmax(44px, 1fr);
  }

  .education-viz-node {
    padding: 6px;
  }

  .agent-viz-body {
    grid-template-columns: 19px minmax(0, 1fr) 84px;
    gap: 6px;
    padding: 11px 9px;
  }

  .agent-viz-status {
    gap: 7px;
    padding-inline: 9px;
  }
}

@media (max-width: 390px) {
  .project-viz-toolbar > b {
    max-width: 112px;
  }

  .live-viz-status span:nth-child(2),
  .human-viz-meta span:nth-child(2),
  .agent-viz-status span:nth-child(2) {
    display: none;
  }

  .live-viz-feed {
    padding-inline: 7px;
  }

  .live-viz-reply {
    padding-inline: 8px;
  }

  .live-viz-message {
    gap: 5px;
    padding-inline: 3px;
  }

  .human-viz-controls {
    padding-inline: 8px;
  }
}

/* Project cards share one progressive interaction layer, regardless of CMS visual type. */
.project-card.card-interactive {
  --card-pointer-x: 50%;
  --card-pointer-y: 50%;
  --card-rotate-x: 0deg;
  --card-rotate-y: 0deg;
  --card-content-x: 0px;
  --card-content-y: 0px;
  --card-glow-opacity: 0;
  --card-lift: 0px;
  isolation: isolate;
  transform-origin: 50% 58%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.project-card.card-interactive::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle 330px at var(--card-pointer-x) var(--card-pointer-y),
      rgba(125, 201, 255, 0.16),
      rgba(79, 140, 255, 0.055) 36%,
      transparent 68%
    );
  opacity: var(--card-glow-opacity);
  content: "";
  mix-blend-mode: screen;
  transition: opacity 0.36s ease;
}

html[data-theme="light"] .project-card.card-interactive::before {
  background:
    radial-gradient(
      circle 330px at var(--card-pointer-x) var(--card-pointer-y),
      rgba(32, 105, 224, 0.14),
      rgba(32, 105, 224, 0.04) 38%,
      transparent 70%
    );
  mix-blend-mode: multiply;
}

.js .project-card.card-interactive.is-visible {
  transform:
    perspective(1200px)
    translate3d(0, var(--card-lift), 0)
    rotateX(var(--card-rotate-x))
    rotateY(var(--card-rotate-y));
  opacity: 1;
  transition:
    opacity 0.75s ease,
    transform 0.55s cubic-bezier(0.2, 0.75, 0.2, 1),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.js .project-card.card-interactive.is-visible.is-card-engaged {
  --card-lift: -7px;
  border-color: rgba(128, 180, 255, 0.42);
  box-shadow:
    0 30px 72px rgba(0, 0, 0, 0.29),
    0 0 0 1px rgba(108, 173, 255, 0.08),
    0 0 48px rgba(55, 116, 220, 0.09);
  will-change: transform;
  transition-duration: 0.35s, 0.16s, 0.22s, 0.22s;
}

.project-card.card-interactive.is-card-engaged::after,
.project-card.card-interactive:focus-within::after {
  opacity: 0.82;
}

.project-card.card-interactive:focus-within {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  box-shadow:
    0 26px 66px rgba(0, 0, 0, 0.25),
    0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
}

.js .project-card.card-interactive.is-visible.is-card-pressed {
  --card-lift: -2px;
  transform:
    perspective(1200px)
    translate3d(0, var(--card-lift), 0)
    rotateX(var(--card-rotate-x))
    rotateY(var(--card-rotate-y))
    scale(0.994);
}

.project-card.card-interactive > :where(.project-content, .wide-copy),
.project-card.card-interactive:not(.project-main):not(.project-wide) > :where(.project-icon, .project-topline, h3, p, .tag-list, .project-detail-button, .project-card-actions) {
  transform: translate3d(var(--card-content-x), var(--card-content-y), 18px);
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.project-card.card-interactive.is-card-engaged > :where(.project-content, .wide-copy),
.project-card.card-interactive.is-card-engaged:not(.project-main):not(.project-wide) > :where(.project-icon, .project-topline, h3, p, .tag-list, .project-detail-button, .project-card-actions) {
  transition-duration: 0.16s;
}

.project-card.card-interactive .tag-list span {
  transition: transform 0.24s ease, border-color 0.24s ease, color 0.24s ease, background 0.24s ease;
}

.project-card.card-interactive.is-card-engaged .tag-list span,
.project-card.card-interactive:focus-within .tag-list span {
  transform: translateY(-1px);
  border-color: rgba(125, 201, 255, 0.24);
  background: rgba(79, 140, 255, 0.055);
  color: color-mix(in srgb, var(--text) 82%, var(--accent-2));
}

.project-card.card-interactive .project-icon {
  transition: transform 0.4s cubic-bezier(0.2, 0.75, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card.card-interactive.is-card-engaged .project-icon {
  border-color: rgba(125, 201, 255, 0.32);
  box-shadow: inset 0 0 28px rgba(79, 140, 255, 0.08), 0 0 34px rgba(79, 140, 255, 0.08);
}

@media (hover: none) and (pointer: coarse) {
  .js .project-card.card-interactive.is-visible.is-card-engaged {
    --card-lift: 0px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.21);
  }

  .js .project-card.card-interactive.is-visible.is-card-pressed {
    --card-lift: -2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .project-card.card-interactive.is-visible,
  .js .project-card.card-interactive.is-visible.is-card-engaged,
  .js .project-card.card-interactive.is-visible.is-card-pressed,
  .project-card.card-interactive > :where(.project-content, .wide-copy),
  .project-card.card-interactive:not(.project-main):not(.project-wide) > :where(.project-icon, .project-topline, h3, p, .tag-list, .project-detail-button, .project-card-actions) {
    transform: none;
  }

  .project-card.card-interactive::before {
    display: none;
  }
}

/* Personal AI assistant */
.button-assistant {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-color: rgba(113, 215, 190, 0.34);
  background: rgba(69, 194, 166, 0.08);
  color: #baf5e3;
}

.button-assistant:hover {
  border-color: rgba(113, 215, 190, 0.72);
  background: rgba(69, 194, 166, 0.16);
  color: #eafff8;
}

.button-assistant svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

/* 站内 AI 工作台入口 */
.button-workspace {
  border-color: rgba(96, 152, 255, 0.42);
  background: linear-gradient(120deg, rgba(37, 110, 255, 0.18), rgba(124, 110, 255, 0.13));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
  color: #dceaff;
}

.button-workspace:hover {
  border-color: rgba(138, 185, 255, 0.78);
  background: linear-gradient(120deg, rgba(37, 110, 255, 0.3), rgba(124, 110, 255, 0.22));
  box-shadow: 0 16px 38px rgba(48, 106, 226, 0.26), inset 0 1px rgba(255, 255, 255, 0.08);
  color: #f4f9ff;
  transform: translateY(-3px);
}

.button-workspace svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button-workspace:hover svg {
  transform: translate(2px, -2px);
}

.workspace-live,
.nav-menu a.nav-menu-cta .cta-live {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #5ce0b4;
  animation: ctaLivePulse 2.2s ease-in-out infinite;
}

@keyframes ctaLivePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(92, 224, 180, 0.15), 0 0 9px rgba(92, 224, 180, 0.7); opacity: 0.82; }
  50% { box-shadow: 0 0 0 5px rgba(92, 224, 180, 0.06), 0 0 15px rgba(92, 224, 180, 0.95); opacity: 1; }
}

.assistant-dialog {
  width: min(calc(100% - 28px), 760px);
  max-height: min(90vh, 820px);
  overflow: hidden;
  border-color: rgba(113, 215, 190, 0.28);
  background: #091827;
}

.assistant-shell {
  display: grid;
  grid-template-rows: auto auto minmax(250px, 1fr) auto;
  min-height: min(680px, 90vh);
}

.assistant-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 22px 24px 17px;
  border-bottom: 1px solid rgba(184, 207, 235, 0.12);
}

.assistant-avatar {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(112, 225, 193, 0.4);
  border-radius: 14px;
  background: rgba(62, 194, 166, 0.13);
  color: #c8f8e9;
  font: 800 12px/1 var(--font-mono);
  letter-spacing: 0.05em;
}

.assistant-avatar i {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 9px;
  height: 9px;
  border: 2px solid #091827;
  border-radius: 50%;
  background: #6be6b2;
}

.assistant-identity { min-width: 0; }
.assistant-identity p { margin: 0 0 3px; color: rgba(177, 207, 235, 0.48); font: 700 8px/1.2 var(--font-mono); letter-spacing: 0.12em; }
.assistant-identity h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -0.035em; }
.assistant-status { display: inline-flex; align-items: center; gap: 6px; color: #83e5b8; font-size: 10px; }
.assistant-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.assistant-status[data-state="checking"] { color: #a9bbd0; }
.assistant-status[data-state="offline"], .assistant-status[data-state="error"] { color: #f3bc76; }
.assistant-head-actions { display: flex; align-items: center; gap: 7px; }
.assistant-reset { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(184, 207, 235, 0.18); border-radius: 10px; background: rgba(255, 255, 255, 0.035); color: #afc5de; cursor: pointer; }
.assistant-reset:hover { border-color: rgba(113, 215, 190, 0.55); color: #c9ffed; }
.assistant-reset svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.assistant-close { position: static; width: 38px; height: 38px; font-size: 22px; }
.assistant-description { margin: 0; padding: 13px 24px; border-bottom: 1px solid rgba(184, 207, 235, 0.08); color: #91a9c2; font-size: 11px; line-height: 1.6; }

.assistant-messages { min-height: 0; max-height: 52vh; padding: 19px 24px 22px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.assistant-empty { display: grid; min-height: 270px; place-items: center; align-content: center; gap: 9px; color: #90a6be; text-align: center; }
.assistant-empty-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(113, 215, 190, 0.32); border-radius: 13px; background: rgba(63, 194, 166, 0.1); color: #a7f1d7; font-size: 20px; }
.assistant-empty strong { max-width: 460px; color: #e9f4ff; font-size: 15px; }
.assistant-empty p { max-width: 430px; margin: 0; color: #8097af; font-size: 11px; }
.assistant-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 10px; }
.assistant-suggestions button { min-height: 33px; padding: 0 11px; border: 1px solid rgba(184, 207, 235, 0.17); border-radius: 999px; background: rgba(255, 255, 255, 0.035); color: #a9bfd7; font-size: 10px; cursor: pointer; }
.assistant-suggestions button:hover { border-color: rgba(113, 215, 190, 0.48); color: #d8fff1; }
.assistant-message { display: flex; max-width: 88%; margin: 0 0 14px; flex-direction: column; align-items: flex-start; gap: 4px; animation: assistantMessageIn 0.25s ease both; }
.assistant-message.is-user { margin-left: auto; align-items: flex-end; }
.assistant-bubble { padding: 10px 13px; border: 1px solid rgba(184, 207, 235, 0.13); border-radius: 5px 14px 14px 14px; background: rgba(255, 255, 255, 0.055); color: #dce9f7; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.assistant-message.is-user .assistant-bubble { border-color: rgba(79, 140, 255, 0.26); border-radius: 14px 5px 14px 14px; background: rgba(79, 140, 255, 0.17); color: #edf5ff; }
.assistant-bubble p { margin: 0; white-space: pre-wrap; }
.assistant-message > small { color: #71869d; font: 700 8px/1 var(--font-mono); letter-spacing: 0.04em; }
.assistant-message-images { display: grid; grid-template-columns: repeat(4, 54px); gap: 5px; margin-top: 8px; }
.assistant-message-images img { width: 54px; height: 54px; border: 1px solid rgba(184, 207, 235, 0.18); border-radius: 7px; object-fit: cover; }
.assistant-typing { display: flex; width: fit-content; gap: 4px; margin: 4px 0 12px; padding: 11px 13px; border: 1px solid rgba(184, 207, 235, 0.13); border-radius: 5px 14px 14px 14px; background: rgba(255, 255, 255, 0.05); }
.assistant-typing i { width: 5px; height: 5px; border-radius: 50%; background: #8fd9c0; animation: assistantTyping 1s ease-in-out infinite; }
.assistant-typing i:nth-child(2) { animation-delay: 0.15s; }.assistant-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes assistantMessageIn { from { transform: translateY(5px); opacity: 0; } }
@keyframes assistantTyping { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-3px); opacity: 1; } }

.assistant-compose { padding: 13px 18px 16px; border-top: 1px solid rgba(184, 207, 235, 0.12); background: rgba(4, 14, 26, 0.46); }
.assistant-input-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.assistant-file-button { display: inline-flex; min-height: 42px; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid rgba(184, 207, 235, 0.16); border-radius: 9px; background: rgba(255, 255, 255, 0.03); color: #9fb5cd; font-size: 10px; cursor: pointer; }
.assistant-file-button:hover { border-color: rgba(113, 215, 190, 0.46); color: #d5fff0; }
.assistant-file-button[aria-disabled="true"] { cursor: not-allowed; opacity: 0.5; }
.assistant-file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.assistant-file-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.assistant-input-row textarea { width: 100%; min-height: 42px; max-height: 150px; resize: none; padding: 10px 12px; border: 1px solid rgba(184, 207, 235, 0.17); border-radius: 9px; background: rgba(255, 255, 255, 0.045); color: #f2f7ff; font: inherit; font-size: 12px; line-height: 1.55; }
.assistant-input-row textarea:focus { border-color: rgba(113, 215, 190, 0.56); outline: 0; box-shadow: 0 0 0 3px rgba(70, 194, 166, 0.1); }
.assistant-input-row textarea:disabled { cursor: not-allowed; opacity: 0.55; }
.assistant-send { display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 9px; background: #64d6b0; color: #082018; cursor: pointer; transition: transform 0.2s ease, filter 0.2s ease; }
.assistant-send:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-2px); }
.assistant-send:disabled { cursor: not-allowed; opacity: 0.35; }
.assistant-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.assistant-stop-icon { display: none; fill: currentColor !important; stroke: none !important; }
.assistant-send.is-stopping { border: 1px solid rgba(255,255,255,.22); background: #e8747f; color: #fff; }
.assistant-send.is-stopping .assistant-send-icon { display: none; }
.assistant-send.is-stopping .assistant-stop-icon { display: block; }
.assistant-compose-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: #6f849b; font: 8px/1.4 var(--font-mono); }
.assistant-error { min-height: 14px; margin: 6px 0 0; color: #ffacb4; font-size: 10px; }
.assistant-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.assistant-attachment { display: inline-flex; max-width: 180px; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid rgba(113, 215, 190, 0.25); border-radius: 7px; background: rgba(63, 194, 166, 0.07); color: #b5d3ce; font-size: 9px; }
.assistant-attachment img { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; }
.assistant-attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistant-attachment button { width: 20px; height: 20px; padding: 0; border: 0; background: transparent; color: #9ab4b3; cursor: pointer; }

@media (max-width: 600px) {
  .assistant-dialog { width: calc(100% - 14px); max-height: calc(100dvh - 14px); border-radius: 16px; }
  .assistant-shell { min-height: calc(100dvh - 14px); }
  .assistant-head { padding: 16px 15px 13px; }
  .assistant-description { padding: 10px 15px; }
  .assistant-messages { max-height: none; padding: 14px 15px 18px; }
  .assistant-compose { padding: 10px 10px max(12px, env(safe-area-inset-bottom)); }
  .assistant-file-button span { display: none; }
  .assistant-input-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .assistant-message { max-width: 94%; }
  .assistant-empty { min-height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .assistant-message, .assistant-typing i { animation: none; }
  .assistant-send:hover:not(:disabled) { transform: none; }
}

/* Final compact-device overrides stay after component defaults. */
@media (max-width: 600px) {
  .assistant-dialog {
    width: calc(100% - 14px);
    height: min(calc(100dvh - 14px), 820px);
    max-height: calc(100dvh - 14px);
  }

  .assistant-shell {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .assistant-messages {
    min-height: 0;
    max-height: none;
  }

  .assistant-input-row textarea {
    font-size: 16px;
  }

  .assistant-reset,
  .assistant-close,
  .assistant-send {
    min-width: 44px;
    min-height: 44px;
  }

  .assistant-compose-footer {
    min-width: 0;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
  }

  .assistant-message-images {
    grid-template-columns: repeat(3, minmax(0, 54px));
    max-width: 100%;
  }
}

@media (max-width: 680px) {
  .command-dialog {
    width: calc(100% - 16px);
    height: auto;
    max-height: calc(100dvh - 16px);
    overflow: hidden;
  }

  .command-shell {
    max-height: calc(100dvh - 16px);
    overflow: hidden;
  }

  .command-top button {
    min-width: 44px;
    min-height: 44px;
  }

  .command-result {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .command-result > span {
    min-width: 0;
  }

  .command-result strong,
  .command-result small {
    overflow-wrap: anywhere;
  }
}

@media (max-height: 620px) and (max-width: 600px) {
  .assistant-head {
    padding-block: 10px;
  }

  .assistant-description {
    padding-block: 7px;
  }

  .assistant-empty {
    min-height: 130px;
  }
}

/* Standalone announcement center. */
.announcement-trigger { position: relative; }
.announcement-badge { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border: 2px solid var(--bg); border-radius: 50%; background: #ff7d87; box-shadow: 0 0 0 3px rgba(255,125,135,.12); }
.announcement-dialog { width: min(940px, calc(100% - 32px)); max-height: min(86dvh, 780px); padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; background: #091729; color: var(--text); }
.announcement-dialog-shell { display: grid; max-height: min(86dvh, 780px); grid-template-rows: auto minmax(0, 1fr) auto; margin: 0; }
.announcement-center-head { display: flex; min-height: 94px; padding: 23px 28px; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.announcement-center-head p { margin: 0 0 7px; color: var(--accent-2); font: 700 8px/1 var(--font-mono); letter-spacing: 0; }
.announcement-center-head h2 { margin: 0; font-size: 24px; line-height: 1.1; letter-spacing: 0; }
.announcement-center-head-actions { display: flex; align-items: center; gap: 9px; }
.announcement-center-head-actions > span { display: inline-flex; min-height: 36px; padding: 0 12px; align-items: center; gap: 7px; border: 1px solid rgba(79,140,255,.32); border-radius: 8px; background: rgba(79,140,255,.11); color: #9bc4ff; font-size: 10px; font-weight: 700; }
.announcement-center-head-actions svg { width: 14px; height: 14px; }
.announcement-center-close { display: grid; width: 36px; height: 36px; padding: 0; place-items: center; border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; }
.announcement-center-close:hover { color: var(--text); }
.announcement-center-list { min-height: 260px; padding: 12px 30px 4px; overflow: auto; overscroll-behavior: contain; }
.announcement-center-item { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 15px; }
.announcement-center-rail { position: relative; display: flex; justify-content: center; }
.announcement-center-rail::after { position: absolute; top: 25px; bottom: 0; width: 1px; background: var(--line-strong); content: ""; }
.announcement-center-item:last-child .announcement-center-rail::after { display: none; }
.announcement-center-rail i { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 18px; border: 2px solid #091729; border-radius: 50%; background: #71839a; box-shadow: 0 0 0 1px var(--line-strong); }
.announcement-center-item.is-latest .announcement-center-rail i { background: var(--accent); box-shadow: 0 0 0 4px rgba(79,140,255,.12); }
.announcement-center-content { min-width: 0; padding: 14px 0 28px; border-bottom: 1px solid var(--line); }
.announcement-center-item:last-child .announcement-center-content { border-bottom: 0; }
.announcement-center-meta { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font: 700 9px/1.4 var(--font-mono); }
.announcement-center-meta span { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--accent-2); }
.announcement-center-content h3 { margin: 10px 0 0; font-size: 18px; line-height: 1.45; letter-spacing: 0; overflow-wrap: anywhere; }
.announcement-center-content p { margin: 9px 0 0; color: #b9c9db; font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.announcement-center-content img { display: block; width: min(620px, 100%); max-height: 360px; margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); object-fit: contain; }
.announcement-center-footer { display: flex; min-height: 72px; padding: 14px 28px; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); background: #081421; }
.announcement-center-footer > p { margin: 0; color: var(--muted-2); font-size: 9px; }
.announcement-center-footer > div { display: flex; gap: 8px; }
.announcement-center-footer button { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.announcement-center-footer button:last-child { border-color: rgba(79,140,255,.35); background: rgba(79,140,255,.13); color: #9fc8ff; }
.announcement-center-footer button:hover { border-color: var(--line-strong); color: var(--text); }
html[data-theme="light"] .announcement-dialog { background: #fff; }
html[data-theme="light"] .announcement-center-rail i { border-color: #fff; }
html[data-theme="light"] .announcement-center-content p { color: #40546b; }
html[data-theme="light"] .announcement-center-footer { background: #f2f6fb; }
html[data-theme="light"] .announcement-center-head-actions > span { color: #1559b3; }

@media (max-width: 680px) {
  .announcement-dialog { width: calc(100% - 14px); max-height: calc(100dvh - 14px); border-radius: 10px; }
  .announcement-dialog-shell { max-height: calc(100dvh - 14px); }
  .announcement-center-head { min-height: 78px; padding: 17px 18px; }
  .announcement-center-head h2 { font-size: 20px; }
  .announcement-center-list { min-height: 220px; padding: 6px 17px 0; }
  .announcement-center-item { grid-template-columns: 15px minmax(0, 1fr); gap: 10px; }
  .announcement-center-content { padding-top: 13px; padding-bottom: 23px; }
  .announcement-center-content h3 { font-size: 16px; }
  .announcement-center-content p { font-size: 12px; line-height: 1.75; }
  .announcement-center-content img { max-height: 280px; }
  .announcement-center-footer { min-height: 67px; padding: 12px 17px; justify-content: flex-end; }
  .announcement-center-footer > p { display: none; }
  .announcement-center-footer button { min-height: 40px; padding-inline: 12px; }
}

@media (max-width: 380px) {
  .announcement-center-head-actions > span { display: none; }
}

/* GitHub weekly radar. */
.github-dialog {
  width: min(960px, calc(100% - 32px));
  max-height: min(88dvh, 820px);
  overflow: hidden;
  border-radius: 12px;
  background: #091521;
  color: var(--text);
}

.github-dialog-shell {
  display: grid;
  max-height: min(88dvh, 820px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.github-dialog-head {
  display: flex;
  min-height: 112px;
  padding: 23px 28px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.github-dialog-head p {
  margin: 0 0 7px;
  color: #58c98a;
  font: 700 8px/1 var(--font-mono);
  letter-spacing: 0;
}

.github-dialog-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.github-dialog-head > div:first-child > span {
  display: block;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 10px;
}

.github-dialog-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.github-refresh,
.github-dialog-close {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
}

.github-refresh {
  gap: 7px;
  padding: 0 12px;
  font-size: 10px;
  font-weight: 700;
}

.github-refresh svg {
  width: 14px;
  height: 14px;
}

.github-refresh:hover:not(:disabled),
.github-dialog-close:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.github-refresh:disabled { cursor: wait; opacity: 0.72; }
.github-refresh.is-loading svg { animation: githubSpin 0.8s linear infinite; }
.github-dialog-close { width: 38px; padding: 0; font-size: 24px; }

.github-trending-list {
  min-height: 310px;
  padding: 0 28px;
  overflow: auto;
  overscroll-behavior: contain;
}

.github-repository {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 118px;
  gap: 16px;
  min-height: 118px;
  padding: 20px 0;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.github-repository:last-child { border-bottom: 0; }

.github-rank {
  color: #5e7187;
  font: 700 12px/1 var(--font-mono);
  text-align: center;
}

.github-repository-main { min-width: 0; }

.github-repository h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.github-repository h3 a {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  color: #e8f1fb;
}

.github-repository h3 a:hover { color: #79d6a1; }
.github-repository h3 a span { flex: 0 0 auto; color: #71849a; font-size: 11px; }

.github-repository-main > p {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: #9eafc1;
  font-size: 11px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.github-repository-meta {
  display: flex;
  min-width: 0;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

.github-repository-meta span {
  max-width: 150px;
  padding: 3px 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #8093a9;
  font: 600 8px/1.3 var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.github-repository-meta .github-language {
  position: relative;
  padding-left: 15px;
  border-color: rgba(88, 201, 138, 0.24);
  color: #8fdcb0;
}

.github-language::before {
  position: absolute;
  top: 50%;
  left: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #58c98a;
  content: "";
  transform: translateY(-50%);
}

.github-repository-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.github-repository-stats > span {
  display: grid;
  min-height: 52px;
  padding: 8px 6px;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #d7e3ef;
  font: 700 11px/1.2 var(--font-mono);
  text-align: center;
}

.github-repository-stats small {
  display: block;
  margin-bottom: 5px;
  color: #71849a;
  font-size: 7px;
}

.github-repository-stats > span:first-child { border-color: rgba(236, 190, 92, 0.22); color: #f1ce7e; }

.github-state {
  display: grid;
  min-height: 310px;
  padding: 36px 20px;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.github-state-mark {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #75d09c;
  font: 700 15px/1 var(--font-mono);
}

.github-state strong { font-size: 14px; }
.github-state p { max-width: 360px; margin: 8px 0 0; color: var(--muted-2); font-size: 11px; line-height: 1.7; }
.github-state button { min-height: 38px; margin-top: 16px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255,255,255,.04); color: var(--text); font-size: 10px; cursor: pointer; }

.github-dialog-footer {
  display: flex;
  min-height: 66px;
  padding: 13px 28px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  background: #08121c;
}

.github-dialog-footer p { margin: 0; color: var(--muted-2); font-size: 9px; }
.github-dialog-footer a { color: #89d9ab; font-size: 10px; font-weight: 700; }
.github-dialog-footer a:hover { color: #b0edc8; }

html[data-theme="light"] .github-dialog { background: #fff; }
html[data-theme="light"] .github-repository h3 a { color: #142b42; }
html[data-theme="light"] .github-repository-main > p { color: #52677d; }
html[data-theme="light"] .github-repository-stats > span { color: #263f58; }
html[data-theme="light"] .github-repository-stats > span:first-child { color: #8c6510; }
html[data-theme="light"] .github-dialog-footer { background: #f2f6f8; }
html[data-theme="light"] .github-dialog-footer a { color: #147440; }

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

@media (max-width: 680px) {
  .github-dialog { width: calc(100% - 14px); max-height: calc(100dvh - 14px); border-radius: 10px; }
  .github-dialog-shell { max-height: calc(100dvh - 14px); }
  .github-dialog-head { min-height: 96px; padding: 16px 17px; }
  .github-dialog-head h2 { font-size: 20px; }
  .github-dialog-head > div:first-child > span { font-size: 9px; }
  .github-refresh { width: 40px; height: 40px; padding: 0; }
  .github-refresh span { display: none; }
  .github-dialog-close { width: 40px; height: 40px; }
  .github-trending-list { min-height: 240px; padding: 0 17px; }
  .github-repository { grid-template-columns: 27px minmax(0, 1fr); gap: 10px; min-height: 0; padding: 17px 0; align-items: start; }
  .github-rank { padding-top: 4px; font-size: 10px; }
  .github-repository h3 { font-size: 14px; }
  .github-repository-main > p { font-size: 10px; }
  .github-repository-meta span:nth-child(n+4) { display: none; }
  .github-repository-stats { grid-column: 2; display: flex; margin-top: 9px; }
  .github-repository-stats > span { display: inline-flex; min-height: 28px; padding: 0 8px; align-items: center; gap: 5px; border-radius: 6px; font-size: 9px; }
  .github-repository-stats small { display: inline; margin: 0; }
  .github-dialog-footer { min-height: 62px; padding: 12px 17px; }
  .github-dialog-footer p { display: none; }
  .github-dialog-footer a { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .github-refresh.is-loading svg { animation: none; }
}
