.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 9998;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.03);
}

.scroll-progress__bar {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(
    90deg,
    rgba(94, 106, 210, 0.95),
    rgba(167, 139, 250, 1) 60%,
    rgba(125, 224, 166, 0.95)
  );
  box-shadow:
    0 0 6px rgba(94, 106, 210, 0.55),
    0 0 14px rgba(167, 139, 250, 0.35);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress__bar {
    box-shadow: none;
  }
}

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a0a;
  display: grid;
  place-items: center;
  font-family: "JetBrains Mono", "Inter", "Noto Sans SC", monospace;
  color: rgba(255, 255, 255, 0.82);
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.22, 0.7, 0.2, 1);
}

.boot-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: screen;
}

.boot-loader__inner {
  position: relative;
  z-index: 1;
  width: min(540px, 84%);
  padding: 0 0.5rem;
}

.boot-loader__lines {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: "JetBrains Mono", "Inter", monospace;
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  letter-spacing: 0.04em;
  line-height: 1.55;
}

.boot-loader__lines span {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.boot-loader__lines span.is-shown {
  opacity: 1;
  transform: translateY(0);
}

.boot-loader__lines span::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.55rem;
  color: rgba(94, 106, 210, 0.85);
  font-weight: 600;
}

.boot-loader__lines span.boot-loader__ready {
  color: #7DE0A6;
}

.boot-loader__lines span.boot-loader__ready::before {
  color: #45B26B;
}

.boot-loader__lines span.boot-loader__ready.is-shown::after {
  content: "▌";
  display: inline-block;
  margin-left: 0.45rem;
  color: rgba(255, 255, 255, 0.8);
  animation: boot-cursor 0.9s steps(2) infinite;
}

@keyframes boot-cursor {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.boot-loader__footer {
  margin-top: 1.4rem;
  font-family: "JetBrains Mono", "Inter", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  opacity: 0;
  transition: opacity 0.4s ease 0.5s;
}

.boot-loader.has-revealed .boot-loader__footer {
  opacity: 1;
}

.boot-loader.is-hiding {
  opacity: 0;
  transform: translateY(-28px);
  pointer-events: none;
}

html.boot-skipped .boot-loader,
.boot-loader.is-gone {
  display: none;
}

body.boot-active {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .boot-loader {
    transition: opacity 0.2s ease;
  }
  .boot-loader.is-hiding {
    transform: none;
  }
  .boot-loader__lines span {
    transition: opacity 0.15s ease;
    transform: none;
  }
  .boot-loader__lines span.boot-loader__ready.is-shown::after {
    animation: none;
  }
}

:root {
  --bg-color: #0B0C0E;
  --section-bg: #1B1D21;
  --card-bg: #16171A;
  --text-color: #F4F4F5;
  --muted-text: #8B8C92;
  --faint-text: #5C5D65;
  --accent: #5E6AD2;
  --accent-soft: rgba(94, 106, 210, 0.16);
  --deep-blue: #5E6AD2;
  --success: #45B26B;
  --warm-accent: #FFCC70;
  --border-soft: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --tag-bg: rgba(255, 255, 255, 0.08);
  --overlay-tint: rgba(0, 0, 0, 0.65);
  --radius-lg: 28px;
  --radius-md: 24px;
  --shadow-soft: 0 10px 32px rgba(0, 0, 0, 0.28);
  --shadow-soft-hover: 0 18px 44px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  isolation: isolate;
  font-family: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text-color);
  background: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  letter-spacing: -0.005em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.11;
  mix-blend-mode: screen;
}

.ambient-orbs {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

.ambient-orb {
  position: absolute;
  width: clamp(440px, 56vw, 720px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  filter: blur(180px);
  will-change: transform;
}

.ambient-orb--indigo {
  top: -14%;
  right: -10%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(94, 106, 210, 0.55),
    rgba(94, 106, 210, 0.18) 45%,
    transparent 72%
  );
  opacity: 0.32;
  animation: orb-drift-a 22s ease-in-out infinite;
}

.ambient-orb--violet {
  bottom: -18%;
  left: -12%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(157, 95, 220, 0.45),
    rgba(94, 106, 210, 0.16) 48%,
    transparent 74%
  );
  opacity: 0.24;
  animation: orb-drift-b 28s ease-in-out infinite;
}

@keyframes orb-drift-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-48px, 36px, 0);
  }
}

@keyframes orb-drift-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(40px, -42px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-orb {
    animation: none;
  }
}

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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

body.overlay-open {
  overflow: hidden;
}

.page-shell {
  width: min(1320px, 95vw);
  margin: 0 auto;
  padding: 72px 0 5rem;
}

.home-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}

.home-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.home-left {
  display: grid;
  gap: 1.4rem;
  min-height: 0;
  padding-left: 0;
  position: sticky;
  top: 1.2rem;
}

.profile-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(24, 25, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  color: var(--text-color);
  display: flex;
  align-items: stretch;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0) 60%
  );
}

.profile-card-inner {
  position: relative;
  z-index: 1;
  padding: 2rem 1.8rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.75rem;
  width: 100%;
}

.profile-avatar {
  width: clamp(110px, 10vw, 138px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-image: url("./avatar.png");
  background-size: cover;
  background-position: 50% 25%;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 0 6px rgba(255, 255, 255, 0.025);
}

.profile-name {
  margin: 0.45rem 0 0;
  font-family: "Inter", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--text-color);
}

.profile-role {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.02em;
  text-transform: none;
}

.profile-pitch {
  margin: 0.7rem 0 0;
  font-size: 0.98rem;
  line-height: 1.72;
  color: rgba(245, 247, 250, 0.92);
  font-weight: 500;
  letter-spacing: 0;
}

.profile-proof {
  margin: 0.15rem 0 0;
  font-size: 0.84rem;
  line-height: 1.66;
  color: rgba(255, 255, 255, 0.56);
}

.profile-card-inner .bio-tags.profile-target-tags {
  margin: 0.55rem 0 0;
}

.profile-availability {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted-text);
}

.profile-availability strong {
  color: rgba(240, 242, 248, 0.94);
  font-weight: 600;
}

.profile-meta {
  margin: 0.55rem 0 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
}

.profile-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.profile-meta .meta-icon {
  width: 0.92rem;
  height: 0.92rem;
  fill: currentColor;
}

.profile-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.profile-meta-status {
  color: var(--accent);
  font-weight: 600;
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(94, 106, 210, 0.6);
  animation: status-pulse 2.4s ease-out infinite;
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 106, 210, 0.6); }
  60% { box-shadow: 0 0 0 7px rgba(94, 106, 210, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 106, 210, 0); }
}

.profile-contacts {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.45rem;
  position: relative;
}

.contact-link {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  translate: var(--mag-x, 0px) var(--mag-y, 0px);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease,
    translate 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: translate;
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.contact-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.contact-link--wechat {
  position: relative;
  border: 0;
}

.wechat-qr-floating {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate3d(-9999px, -9999px, 0);
  width: 260px;
  height: 260px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
  z-index: 1200;
}

.wechat-qr-floating img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  display: block;
  background: #fff;
  object-fit: contain;
  object-position: center center;
}

.wechat-qr-floating.is-visible {
  opacity: 1;
}

.profile-resume {
  margin-top: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-color);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  translate: var(--mag-x, 0px) var(--mag-y, 0px);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    translate 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: translate;
}

.profile-resume:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.profile-resume__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  fill: currentColor;
  opacity: 0.95;
}

.profile-education {
  margin-top: 0.85rem;
  width: 100%;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.profile-education--inline {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: 0;
  gap: 0.55rem;
}

.bio-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-height: 0;
}

.bio-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bio-title {
  margin: 0;
  font-family: "Inter", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bio-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bio-list li {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  color: var(--muted-text);
  line-height: 1.55;
  font-size: 0.92rem;
}

.bio-period {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.58);
  text-transform: uppercase;
}

.bio-main {
  color: rgba(235, 238, 244, 0.86);
  font-weight: 500;
}

.bio-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.22) 24%,
    rgba(255, 255, 255, 0.22) 76%,
    rgba(255, 255, 255, 0) 100%
  );
}

.bio-tags {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
}

.bio-tags li {
  padding: 0.34rem 0.74rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bio-note {
  margin: 0;
  color: var(--muted-text);
  font-size: 0.88rem;
  line-height: 1.7;
}

.bio-note--standalone {
  margin: 0;
  padding-top: 0.1rem;
}

.method-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.35rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
}

.method-card__title {
  margin: 0;
  font-family: "Inter", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-color);
}

.method-card__lead {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.62;
  color: var(--muted-text);
}

.method-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.method-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 0.65rem;
  align-items: start;
  padding: 0.45rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.method-step:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.method-step__idx {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--deep-blue);
  line-height: 1.45;
  padding-top: 0.12rem;
}

.method-step__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.method-step__name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: 0.02em;
}

.method-step__note {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted-text);
}

.projects-section {
  background: transparent;
  border: 0;
  box-shadow: none;
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.projects-masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  padding: 0.15rem 0 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.projects-masthead__main {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.projects-masthead__eyebrow {
  margin: 0;
  font-family: "JetBrains Mono", "Inter", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.34);
}

.projects-masthead__title {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: var(--text-color);
}

.projects-masthead__desc {
  margin: 0;
  max-width: 780px;
  font-size: 1rem;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.62);
}

.projects-masthead__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.projects-masthead__pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  line-height: 1.4;
}

.projects-group {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.projects-group__header {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
}

.projects-group__eyebrow {
  margin: 0;
  font-family: "JetBrains Mono", "Inter", monospace;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.34);
}

.projects-group__title {
  margin: 0;
  font-size: clamp(1.18rem, 2vw, 1.46rem);
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: var(--text-color);
}

.projects-group__desc {
  margin: 0;
  max-width: 640px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  grid-auto-flow: row;
  gap: 24px;
}

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

.projects-grid--core .project-card,
.projects-grid--support .project-card {
  grid-column: auto;
  grid-row: auto;
}

.projects-grid--core .project-card[data-size],
.projects-grid--support .project-card[data-size] {
  display: flex;
  flex-direction: column;
}

.projects-grid .project-card {
  width: auto;
  margin: 0;
}

.project-card[data-size="featured"] {
  grid-column: span 1;
  grid-row: span 2;
}

.project-card[data-size="wide"] {
  grid-column: span 2;
  grid-row: span 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  align-items: stretch;
}

.project-card[data-size="wide"] > .project-trigger {
  grid-column: 1;
  grid-row: 1 / -1;
  height: 100%;
  align-self: stretch;
  min-height: 0;
}

.project-card[data-size="wide"] > .hover-cta {
  right: calc(41.67% + 0.9rem);
}

.project-card[data-size="wide"] > .project-meta {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
}

.project-card[data-size="wide"] > .project-outcomes {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
}

.project-card[data-size="wide"] > .project-flow {
  grid-column: 2;
  grid-row: 3;
  align-self: center;
}

.project-card[data-size="wide"] > .github-cta {
  grid-column: 2;
  grid-row: 4;
  align-self: end;
}

.project-card[data-size="tall"] {
  grid-column: span 1;
  grid-row: span 2;
}

.project-card[data-size="small"] {
  grid-column: span 1;
  grid-row: span 1;
}

/* 数据顺序 = DOM 顺序 = 视觉顺序。
   原先这里有 5 行 :nth-of-type(N) { order: M }
   把视觉位置绑死到 DOM 序号；2026-05-12 重构后由
   data/projects.js 数组顺序唯一决定，CSS 不再参与排序。 */

.project-card > .project-trigger {
  flex: 1 1 auto;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card-bg);
}

.project-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--card-bg);
  flex: 0 0 auto;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.project-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(94, 106, 210, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(10, 12, 18, 0));
  pointer-events: none;
}

.project-cover::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -10px 22px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.project-cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.025);
}

.project-card[data-size="featured"] .project-cover {
  aspect-ratio: 4 / 3.8;
}

.project-card[data-size="wide"] .project-cover {
  aspect-ratio: auto;
  height: 100%;
  min-height: 200px;
}

.project-card[data-size="wide"] .project-cover img {
  object-position: center center;
}

.project-card[data-size="tall"] .project-cover {
  aspect-ratio: 4 / 3.8;
}

.project-card[data-size="small"] .project-cover {
  aspect-ratio: 4 / 3;
}

.project-flow {
  margin: 0;
  list-style: none;
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  width: 100%;
  padding: 0.4rem 1.1rem 0.85rem;
  background: transparent;
  border-top: 0;
  position: relative;
}

.project-flow .flow-step {
  flex: 0 1 auto;
  min-width: 0;
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  text-align: left;
  gap: 0.32rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.project-flow .flow-step-idx {
  font-family: "JetBrains Mono", "Inter", monospace;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #94a3b8;
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: 0;
  line-height: 1;
  min-width: 0;
  text-align: center;
}

.project-flow .flow-step-label {
  font-family: "Inter", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.project-flow .flow-step--accent .flow-step-idx,
.project-flow .flow-step--accent .flow-step-label {
  color: #cbd5e1;
  opacity: 1;
}

.project-card {
  position: relative;
  background: rgba(24, 25, 28, 0.76);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transform: translateY(16px);
  transition:
    transform 0.55s ease,
    opacity 0.55s ease,
    box-shadow 0.35s ease,
    border-color 0.28s ease;
  opacity: 0;
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-self: start;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.project-card[data-layout="hero"] {
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.project-card[data-layout="hero"] .project-cover {
  background:
    radial-gradient(circle at 80% 16%, rgba(94, 106, 210, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.project-card[data-layout="hero"] .project-cover img {
  transform: scale(1.01);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.03);
}

.project-card[data-layout="hero"] .project-cover::after {
  inset: 14px;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -18px 30px rgba(0, 0, 0, 0.16);
}

.project-card > .project-meta {
  flex: 0 0 auto;
}

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

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 2;
}

.project-card:focus-within {
  border-color: rgba(255, 255, 255, 0.14);
}

@keyframes card-breathe {
  0%,
  100% {
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.6),
      0 22px 44px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(94, 106, 210, 0.22),
      0 0 28px rgba(94, 106, 210, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      inset 0 -22px 44px rgba(0, 0, 0, 0.32);
  }
  50% {
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.6),
      0 28px 56px rgba(0, 0, 0, 0.7),
      0 0 0 1px rgba(94, 106, 210, 0.38),
      0 0 56px rgba(94, 106, 210, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -22px 44px rgba(0, 0, 0, 0.3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card:hover {
    transform: none;
  }
  .project-card:hover img {
    transform: none;
  }
  .project-status--live .status-dot {
    animation: none;
  }
}

@property --featured-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.project-card[data-size="featured"] {
  isolation: isolate;
}

.project-card[data-size="featured"]::after {
  display: none;
}

@keyframes featured-border-flow {
  to {
    --featured-angle: 360deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card[data-size="featured"]::after {
    animation: none;
    background: conic-gradient(
      from 300deg,
      transparent 0deg,
      rgba(94, 106, 210, 0.55) 30deg,
      rgba(167, 139, 250, 0.85) 60deg,
      transparent 90deg,
      transparent 360deg
    );
  }
}

.project-card:hover img {
  transform: scale(1.015);
}

.project-hover-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.7rem;
  padding: 1.1rem 1.15rem 1.15rem;
  background: linear-gradient(
    180deg,
    rgba(11, 12, 14, 0.2) 0%,
    rgba(11, 12, 14, 0.78) 55%,
    rgba(11, 12, 14, 0.94) 100%
  );
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.32s ease;
}

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

.hover-value {
  margin: 0;
  font-size: clamp(0.82rem, 1vw, 0.94rem);
  line-height: 1.6;
  color: var(--text-color);
  letter-spacing: 0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hover-cta {
  display: none !important;
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(11, 12, 14, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.project-card:hover .hover-cta,
.project-card:focus-within .hover-cta {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hover-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.hover-cta-arrow {
  font-weight: 700;
  display: inline-flex;
  transition: transform 0.2s ease;
}

.hover-cta:hover .hover-cta-arrow {
  transform: translate(2px, -2px);
}

.github-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted-text);
  text-decoration: none;
  background: var(--card-bg);
  translate: var(--mag-x, 0px) var(--mag-y, 0px);
  transition:
    color 0.2s ease,
    background 0.2s ease,
    translate 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: translate;
}

.github-cta:hover {
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.04);
}

.github-cta .github-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  color: currentColor;
}

.github-cta .github-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

@media (hover: none) {
  .hover-cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hover-cta {
    transition: opacity 0.2s ease;
    transform: none;
  }
}

.project-hover-overlay .hover-tech {
  margin: 0;
}

@media (hover: none) {
  .project-hover-overlay {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-hover-overlay {
    transition: opacity 0.2s ease;
    transform: none;
  }
}

.project-trigger {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}


.project-card img {
  display: block;
  transition:
    transform 0.35s ease,
    filter 0.35s ease;
  filter: brightness(1.03) contrast(1.03) saturate(1.01);
}

.project-card:hover img {
  filter: brightness(1.05) contrast(1.04) saturate(1.02);
}

.project-card[data-project-id="calendar"] .project-cover img {
  object-position: center 10%;
}

.project-card[data-project-id="digest"] .project-cover img {
  object-position: center 8%;
}

.project-card[data-project-id="money"] .project-cover img {
  object-position: center 18%;
}

.project-card[data-project-id="fx"] .project-cover img {
  object-position: center 16%;
}

.project-card[data-project-id="report"] .project-cover img {
  object-position: center 8%;
}

.project-card[data-layout="hero"][data-project-id="calendar"] .project-cover::before {
  background:
    radial-gradient(circle at 76% 14%, rgba(94, 106, 210, 0.26), transparent 30%),
    radial-gradient(circle at 20% 82%, rgba(255, 204, 112, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(10, 12, 18, 0));
}

.project-card[data-layout="hero"][data-project-id="calendar"] .project-cover img {
  object-position: center 6%;
}

.project-card[data-layout="compact"][data-project-id="digest"] .project-cover,
.project-card[data-layout="compact"][data-project-id="money"] .project-cover,
.project-card[data-layout="compact"][data-project-id="fx"] .project-cover,
.project-card[data-layout="compact"][data-project-id="report"] .project-cover {
  background:
    radial-gradient(circle at 82% 16%, rgba(94, 106, 210, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.project-card[data-layout="compact"] .project-trigger::after,
.project-card[data-layout="hero"] .project-trigger::after {
  content: "了解更多";
  position: absolute;
  top: 0.9rem;
  right: 0.95rem;
  z-index: 4;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 20, 24, 0.42);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(-3px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.project-card[data-layout="compact"]:hover .project-trigger::after,
.project-card[data-layout="compact"]:focus-within .project-trigger::after,
.project-card[data-layout="hero"]:hover .project-trigger::after,
.project-card[data-layout="hero"]:focus-within .project-trigger::after {
  opacity: 1;
  transform: translateY(0);
}

.project-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "idx title status"
    "tech tech tech";
  align-items: center;
  gap: 0.55rem 0.85rem;
  padding: 1.1rem 1.25rem 1.15rem;
  background: rgba(22, 23, 26, 0.56);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-index {
  grid-area: idx;
  font-family: "JetBrains Mono", "Inter", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  padding: 0.22rem 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  line-height: 1;
}

.project-title {
  grid-area: title;
  margin: 0;
  font-family: "Inter", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-color);
  line-height: 1.34;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-status {
  grid-area: status;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.26rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.project-tech {
  grid-area: tech;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem 0.36rem;
  align-items: center;
}

.project-tech li {
  font-family: "Inter", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}

.project-tech li[data-tech-type="lang"] {
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.project-tech li[data-tech-type="framework"] {
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.project-tech li[data-tech-type="ai"] {
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.project-tech li[data-tech-type="tool"] {
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.project-tech li[data-tech-type="deploy"] {
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.project-outcomes {
  margin: 0;
  padding: 0.45rem 1.1rem 0.55rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.project-outcomes li {
  position: relative;
  padding-left: 0.85rem;
  font-size: 0.74rem;
  line-height: 1.5;
  color: rgba(203, 213, 225, 0.95);
  letter-spacing: 0.02em;
}

.project-outcomes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(129, 140, 248, 0.85);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
}

.project-status--live {
  background: rgba(69, 178, 107, 0.14);
  color: #6ED59A;
  border: 1px solid rgba(69, 178, 107, 0.34);
}

.project-status--wip {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted-text);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.project-status .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.project-status--live .status-dot {
  background: var(--success);
  box-shadow:
    0 0 0 0 rgba(69, 178, 107, 0.55),
    0 0 0 1px rgba(69, 178, 107, 0.18),
    0 0 6px rgba(69, 178, 107, 0.6);
  animation: status-pulse-green 2.2s ease-in-out infinite;
  transform-origin: center;
  will-change: transform, box-shadow, opacity;
}

@keyframes status-pulse-green {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
    box-shadow:
      0 0 0 0 rgba(69, 178, 107, 0.55),
      0 0 0 1px rgba(69, 178, 107, 0.18),
      0 0 6px rgba(69, 178, 107, 0.55);
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
    box-shadow:
      0 0 0 5px rgba(69, 178, 107, 0),
      0 0 0 1px rgba(69, 178, 107, 0.35),
      0 0 12px rgba(69, 178, 107, 0.95);
  }
}

.project-content {
  padding: 1rem;
  border-top: 0;
  background: var(--section-bg);
}

.project-summary {
  margin: 0 0 0.75rem;
  color: var(--muted-text);
  line-height: 1.65;
  font-size: 0.95rem;
  min-height: 4.8em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-prompt {
  display: none;
}

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

.project-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.project-links a,
.project-links button {
  color: var(--text-color);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.4rem 0.78rem;
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease;
}

.project-links a:hover,
.project-links button:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
  border-color: var(--accent);
}

.github-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
}

.github-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.live-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
}

.live-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.focus-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.focus-overlay.is-open {
  pointer-events: auto;
  opacity: 1;
}

.focus-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition:
    background 0.46s ease,
    backdrop-filter 0.46s ease,
    -webkit-backdrop-filter 0.46s ease;
}

.focus-overlay.is-animating .focus-backdrop,
.focus-overlay.menu-ready .focus-backdrop {
  background: var(--overlay-tint);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.focus-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(720px, 92vw);
  max-height: min(92vh, 880px);
  border-radius: var(--radius-lg);
  padding: 1.85rem 1rem 1.1rem;
  background: rgba(22, 23, 26, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.24s ease;
}

.focus-overlay.is-open .focus-panel {
  opacity: 1;
}

.focus-close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.focus-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-color);
}

.focus-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.focus-title {
  margin: 0.95rem 0 0.55rem;
  font-family: "Inter", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  letter-spacing: 0.02em;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.focus-body-scroll {
  margin: 0;
  padding: 0 0.15rem 0.65rem 0;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  color: var(--muted-text);
  line-height: 1.65;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  scrollbar-gutter: stable;
}

.focus-body-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 弹层与卡片隐藏区共用的「焦点导出」正文 */
.project-focus-export,
.focus-body-scroll .project-focus-export {
  display: block;
}

.focus-export-flow {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.focus-export-flow > .focus-export-block,
.focus-export-flow > .focus-export-highlights {
  margin: 0;
}

.focus-export-lede {
  margin: 0 0 0.75rem;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.55;
}

.focus-case-hero {
  margin: 0 0 1rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 88% 16%, rgba(94, 106, 210, 0.14), transparent 30%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.focus-case-hero__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.focus-case-hero__title {
  margin: 0;
  font-size: clamp(1.18rem, 2.2vw, 1.65rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text-color);
}

.focus-case-hero__intro {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.66);
}

.focus-case-hero__bullets {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.focus-case-hero__bullet {
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  line-height: 1.25;
}

.focus-export-results {
  margin: 0 0 0.95rem;
}

.focus-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.focus-result-cell {
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 70px;
}

.focus-result-label {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--deep-blue);
}

.focus-result-value {
  margin: 0;
  color: var(--text-color);
  font-size: 0.82rem;
  line-height: 1.4;
}

.focus-export-block {
  margin: 0 0 0.65rem;
}

.focus-export-h {
  margin: 0 0 0.28rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--deep-blue);
}

.focus-export-p {
  margin: 0;
  color: var(--muted-text);
  line-height: 1.68;
}

.focus-export-highlights {
  margin: 0 0 0.65rem;
}

.focus-export-highlights[hidden] {
  display: none !important;
}

.focus-export-ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted-text);
  line-height: 1.55;
}

.focus-export-ul li {
  margin: 0.15rem 0;
}

.focus-pd-dl {
  margin: 0.35rem 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.65rem;
  align-items: start;
}

.focus-pd-dl dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
}

.focus-pd-dl dd {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted-text);
  line-height: 1.55;
}

.focus-excerpt-label {
  margin: 0.55rem 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--deep-blue);
}

.focus-excerpt-pre {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(230, 232, 240, 0.92);
  white-space: pre-wrap;
  word-break: break-word;
}

.focus-excerpt-pre[hidden] {
  display: none !important;
}

.focus-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
  align-items: stretch;
  margin-top: auto;
  padding: 0.65rem 0.1rem 0.05rem;
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(22, 23, 26, 0.98) 72%,
    rgba(22, 23, 26, 0.78) 88%,
    rgba(22, 23, 26, 0) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.focus-overlay.menu-ready .focus-title {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 20ms;
}

.focus-overlay.menu-ready .focus-body-scroll {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 70ms;
}

.focus-overlay.menu-ready .focus-links {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 150ms;
}

.focus-links a {
  justify-content: center;
  white-space: nowrap;
  min-width: 148px;
}

.project-contact-cta {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-contact-cta__title {
  margin: 0 0 0.55rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-text);
}

.project-contact-cta__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.project-contact-link:hover {
  background: rgba(94, 106, 210, 0.16);
  border-color: rgba(94, 106, 210, 0.4);
}

.flying-image {
  position: fixed;
  z-index: 1100;
  object-fit: cover;
  border-radius: 12px;
  pointer-events: none;
  will-change: left, top, width, height;
  transition:
    left 0.58s cubic-bezier(0.22, 0.7, 0.2, 1),
    top 0.58s cubic-bezier(0.22, 0.7, 0.2, 1),
    width 0.58s cubic-bezier(0.22, 0.7, 0.2, 1),
    height 0.58s cubic-bezier(0.22, 0.7, 0.2, 1),
    border-radius 0.58s cubic-bezier(0.22, 0.7, 0.2, 1);
}

.project-card:nth-child(2) {
  transition-delay: 40ms;
}

.project-card:nth-child(3) {
  transition-delay: 80ms;
}

.project-card:nth-child(4) {
  transition-delay: 120ms;
}

@media (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row dense;
  }

  .project-card[data-size="featured"] {
    grid-column: span 1;
    grid-row: span 2;
  }

  .project-card[data-size="wide"] {
    grid-column: span 2;
    grid-row: span 1;
    display: flex;
    flex-direction: column;
  }

  .project-card[data-size="wide"] > .project-trigger,
  .project-card[data-size="wide"] > .project-meta,
  .project-card[data-size="wide"] > .project-outcomes,
  .project-card[data-size="wide"] > .project-flow,
  .project-card[data-size="wide"] > .github-cta {
    grid-column: auto;
    grid-row: auto;
    align-self: auto;
    height: auto;
  }

  .project-card[data-size="wide"] > .hover-cta {
    right: 0.9rem;
  }

  .project-card[data-size="wide"] .project-cover {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
  }

  .project-card[data-size="tall"] {
    grid-column: span 1;
    grid-row: span 2;
  }

  .project-card[data-size="small"] {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (max-width: 980px) {
  .home-layout {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 2rem;
  }

  .home-left {
    position: static;
    top: auto;
    padding-left: 0;
  }

  .profile-card {
    min-height: 220px;
  }
}

@media (max-width: 860px) {
  .focus-case-hero {
    padding: 0.9rem 0.9rem 0.95rem;
  }

  .focus-case-hero__intro {
    font-size: 0.86rem;
  }

  .focus-case-hero__bullets {
    gap: 0.36rem;
  }

  .focus-case-hero__bullet {
    font-size: 0.74rem;
    padding: 0.34rem 0.62rem;
  }

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

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

  .project-card[data-size="featured"],
  .project-card[data-size="wide"],
  .project-card[data-size="tall"],
  .project-card[data-size="small"] {
    grid-column: span 1;
    grid-row: span 1;
  }

  .project-card[data-size="featured"] .project-cover,
  .project-card[data-size="wide"] .project-cover,
  .project-card[data-size="tall"] .project-cover,
  .project-card[data-size="small"] .project-cover {
    aspect-ratio: 16 / 9;
  }

  .focus-links {
    width: 100%;
    min-width: 0;
  }

  .focus-links a {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .focus-result-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------
   首页改版：精选大卡 + 其余 2×2 紧凑卡（措施 1 / 2 / 6）
   ------------------------------------------------------------------------- */

.featured-hero {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.featured-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 1.1rem 0;
}

.featured-hero__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: none;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.34);
  line-height: 1.2;
}

.featured-hero__teaser {
  margin: -0.25rem 0 0.2rem;
  max-width: 28ch;
  font-size: 1.08rem;
  line-height: 1.42;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
}

.featured-hero__highlights {
  margin: -0.1rem 0 0.35rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
}

.featured-hero__highlight {
  padding: 0.46rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.8rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.featured-hero .project-card[data-layout="hero"] {
  border-radius: var(--radius-lg);
}

.featured-hero .project-card[data-layout="hero"] .project-cover {
  aspect-ratio: 16 / 7.5;
  min-height: 260px;
}

.project-card[data-layout="compact"] .project-cover {
  aspect-ratio: 16 / 9;
}

.featured-hero .project-card[data-layout="hero"] .project-title {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.featured-hero .project-card[data-layout="hero"] .project-meta {
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

.featured-hero .project-card[data-layout="hero"] .project-lede {
  font-size: 0.92rem;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.58);
}

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

/* 必须写在本块之后，否则会被上面的 .projects-grid--rest 覆盖 */
@media (max-width: 640px) {
  .projects-grid--rest {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100%, calc(100vw - 20px));
    padding: 20px 0 2.4rem;
  }

  .home-layout {
    gap: 1.15rem;
  }

  .home-main,
  .projects-section {
    gap: 1.05rem;
  }

  .profile-card {
    min-height: 0;
  }

  .profile-card-inner {
    padding: 1rem 1rem 0.95rem;
    gap: 0.45rem;
  }

  .profile-avatar {
    width: 76px;
    box-shadow:
      0 10px 24px rgba(0, 0, 0, 0.46),
      0 0 0 3px rgba(94, 106, 210, 0.28);
  }

  .profile-name {
    margin-top: 0.15rem;
    font-size: 1.95rem;
  }

  .profile-role {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
  }

  .profile-pitch {
    margin-top: 0.3rem;
    font-size: 0.84rem;
    line-height: 1.58;
  }

  .profile-proof {
    margin-top: 0.1rem;
    font-size: 0.77rem;
    line-height: 1.52;
  }

  .profile-education {
    margin-top: 0.35rem;
    gap: 0.45rem;
  }

  .bio-title {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }

  .bio-list {
    gap: 0.38rem;
  }

  .bio-list li {
    gap: 0.08rem;
    font-size: 0.86rem;
  }

  .bio-period {
    font-size: 0.72rem;
  }

  .bio-tags {
    gap: 0.35rem 0.38rem;
  }

  .bio-tags li {
    padding: 0.26rem 0.58rem;
    font-size: 0.75rem;
  }

  .profile-target-tags li:nth-child(n + 3) {
    display: none;
  }

  .profile-availability {
    margin-top: 0.1rem;
    font-size: 0.78rem;
  }

  .profile-resume {
    margin-top: 0.38rem;
    min-height: 2.7rem;
    padding: 0.4rem 0.72rem;
    font-size: 0.82rem;
  }

  .profile-meta {
    margin-top: 0.28rem;
    font-size: 0.74rem;
    gap: 0.28rem 0.48rem;
  }

  .profile-contacts {
    margin-top: 0.16rem;
    gap: 0.38rem;
  }

  .contact-link {
    width: 36px;
    height: 36px;
  }

  .projects-masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0 0 0.15rem;
  }

  .projects-masthead__main {
    gap: 0.34rem;
  }

  .projects-masthead__eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.16em;
  }

  .projects-masthead__title {
    font-size: 1.28rem;
    line-height: 1.22;
  }

  .projects-masthead__desc {
    max-width: none;
    font-size: 0.84rem;
    line-height: 1.58;
  }

  .projects-masthead__meta {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.42rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
  }

  .projects-masthead__meta::-webkit-scrollbar {
    display: none;
  }

  .projects-masthead__pill {
    flex: 0 0 auto;
    min-height: 1.82rem;
    padding: 0.28rem 0.58rem;
    font-size: 0.73rem;
  }

  .projects-group {
    gap: 0.72rem;
  }

  .projects-group__eyebrow {
    font-size: 0.66rem;
  }

  .projects-group__title {
    font-size: 1rem;
  }

  .projects-group__desc {
    display: none;
  }

  .featured-hero__inner {
    gap: 0.48rem;
  }

  .featured-hero__eyebrow {
    display: none;
  }

  .featured-hero__teaser {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.52;
  }

  .featured-hero__highlights {
    gap: 0.38rem;
    margin-top: 0.08rem;
    margin-bottom: 0.1rem;
  }

  .featured-hero__highlight {
    padding: 0.34rem 0.62rem;
    font-size: 0.72rem;
  }

  .featured-hero .project-card[data-layout="hero"] .project-cover {
    aspect-ratio: 16 / 9.8;
    min-height: 0;
  }

  .project-card[data-layout="compact"] .project-cover,
  .featured-hero .project-card[data-layout="hero"] .project-cover {
    padding: 12px;
  }

  .project-card[data-layout="compact"] .project-meta,
  .project-card[data-layout="hero"] .project-meta {
    gap: 0.32rem 0;
    padding: 0.68rem 0.85rem 0.78rem;
  }

  .project-card[data-layout="compact"] .project-title,
  .project-card[data-layout="hero"] .project-title {
    font-size: 0.96rem;
    line-height: 1.42;
  }

  .project-card[data-layout="compact"] .project-lede,
  .project-card[data-layout="hero"] .project-lede {
    font-size: 0.8rem;
    line-height: 1.48;
    -webkit-line-clamp: 2;
  }

  .project-card[data-layout="compact"] .project-tech li:nth-child(n + 4),
  .project-card[data-layout="hero"] .project-tech li:nth-child(n + 4) {
    display: none;
  }

  .project-card[data-layout="compact"] .project-tech li,
  .project-card[data-layout="hero"] .project-tech li {
    font-size: 0.68rem;
    padding: 0.18rem 0.52rem;
  }

  .project-card-actions {
    gap: 0.42rem 0.52rem;
    padding: 0.55rem 0.85rem 0.8rem;
  }

  .project-action {
    min-height: 2.1rem;
    padding: 0 0.82rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .profile-card-inner {
    padding: 0.92rem 0.92rem 0.9rem;
  }

  .profile-name {
    font-size: 1.82rem;
  }

  .projects-masthead__title {
    max-width: none;
    font-size: 1.22rem;
  }

  .projects-masthead__desc {
    font-size: 0.82rem;
  }

  .project-card[data-layout="compact"] .project-cover,
  .featured-hero .project-card[data-layout="hero"] .project-cover {
    padding: 10px;
  }
}

@media (min-width: 981px) {
  .projects-grid--rest .project-card[data-size="uniform"] {
    grid-column: span 1;
    grid-row: span 1;
  }
}

.project-lede {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted-text);
  font-weight: 400;
}

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

.project-card[data-layout="compact"] .project-lede,
.project-card[data-layout="hero"] .project-lede {
  grid-area: lede;
}

.project-card[data-layout="compact"] .project-meta,
.project-card[data-layout="hero"] .project-meta {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "title"
    "lede"
    "tech";
  align-items: start;
  gap: 0.5rem 0;
  padding: 1rem 1.15rem 1.05rem;
}

.project-card[data-layout="compact"] .project-index,
.project-card[data-layout="compact"] .project-status,
.project-card[data-layout="hero"] .project-index,
.project-card[data-layout="hero"] .project-status {
  display: none;
}

.project-card[data-layout="compact"] .project-title,
.project-card[data-layout="hero"] .project-title {
  -webkit-line-clamp: 2;
  font-size: 1.05rem;
  line-height: 1.38;
}

.project-card[data-layout="compact"] .project-lede,
.project-card[data-layout="hero"] .project-lede {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.86rem;
  line-height: 1.54;
  color: rgba(255, 255, 255, 0.54);
}

.project-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  padding: 0.65rem 1rem 0.85rem;
  margin-top: auto;
  border-top: 0;
  background: rgba(255, 255, 255, 0.015);
}

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

.project-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  padding: 0 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.project-action:hover {
  border-color: rgba(94, 106, 210, 0.45);
  background: rgba(94, 106, 210, 0.12);
}

.project-action--demo {
  color: rgba(203, 213, 225, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.project-action--detail {
  font-family: inherit;
  color: #f8fafc;
  border-color: rgba(94, 106, 210, 0.45);
  background: rgba(94, 106, 210, 0.2);
}

.project-action--detail:hover {
  border-color: rgba(120, 130, 230, 0.65);
  background: rgba(94, 106, 210, 0.34);
}

[data-slot="flow-list"]:empty {
  display: none !important;
}

[data-slot="outcomes-list"]:empty {
  display: none !important;
}

[data-slot="github-cta"][hidden] {
  display: none !important;
}

.bio-card--footer,
.method-card--footer {
  margin: 0;
  min-width: 0;
}
