:root {
  --bg-top: #f6f9ff;
  --bg-mid: #edf4ff;
  --bg-bottom: #f9fbff;
  --text: #10213a;
  --muted: #627089;
  --line: rgba(70, 98, 148, 0.12);
  --line-strong: rgba(70, 98, 148, 0.18);
  --accent: #2d72ea;
  --card-bg: rgba(255,255,255,0.82);
  --card-bg-strong: rgba(255,255,255,0.92);
  --shadow-soft: 0 22px 54px rgba(60, 88, 146, 0.10);
  --shadow-card: 0 18px 40px rgba(50, 78, 132, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body.portfolio-home {
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(164, 201, 255, 0.42), transparent 30%),
    radial-gradient(circle at 100% 18%, rgba(180, 200, 255, 0.34), transparent 26%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 42%, var(--bg-bottom) 100%);
  position: relative;
}

body.portfolio-home::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.04)),
    url("/img/site/noise.png");
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

body.gate-locked,
body.drawer-open {
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }

.shell {
  width: min(1160px, calc(100vw - 48px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 250, 255, 0.74);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(120, 146, 192, 0.10);
}

.topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: .98rem;
  font-weight: 600;
  color: var(--muted);
}

.navlinks a,
.nav-project-trigger {
  position: relative;
  transition: color .2s ease;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.navlinks a::after,
.nav-project-trigger::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5b86f7, #9bb8ff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .24s ease;
}

.navlinks a:hover,
.nav-project-trigger:hover {
  color: var(--text);
}

.navlinks a:hover::after,
.nav-project-trigger:hover::after {
  transform: scaleX(1);
}

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(255,255,255,0.92), rgba(242,247,255,0.72) 30%, rgba(225,236,255,0.94) 78%),
    linear-gradient(180deg, #eef5ff 0%, #e3efff 100%);
  transition: opacity .75s ease, visibility .75s ease, transform .85s ease;
}

.gate-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(133, 160, 210, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(133, 160, 210, 0.12) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.25));
  opacity: .55;
}

.gate-overlay::before,
.gate-overlay::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(36px);
  opacity: .55;
  pointer-events: none;
}

.gate-overlay::before {
  width: 28vw;
  height: 28vw;
  left: 8%;
  top: 16%;
  background: rgba(139, 184, 255, 0.44);
}

.gate-overlay::after {
  width: 30vw;
  height: 30vw;
  right: 6%;
  bottom: 8%;
  background: rgba(179, 203, 255, 0.42);
}

.gate-inner {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100vw - 44px));
  text-align: center;
  padding: 36px 24px 24px;
}

.gate-kicker {
  margin: 0 0 18px;
  color: #7d8aa8;
  font-size: .84rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.gate-title {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 1;
  letter-spacing: .04em;
  font-weight: 600;
  font-family: "STKaiti", "KaiTi", "FangSong", "STSong", serif;
  color: #203a66;
  text-shadow: 0 8px 24px rgba(94, 127, 193, 0.14);
}

.gate-text {
  margin: 18px 0 26px;
  font-size: 1.04rem;
  line-height: 1.85;
  color: #5f6e89;
}

.gate-enter {
  appearance: none;
  border: 0;
  min-width: 148px;
  height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2d72ea, #7aa3ff);
  color: #fff;
  font-size: .98rem;
  font-weight: 700;
  cursor: pointer;
}

.gate-indicator {
  margin: 24px auto 0;
  width: 34px;
  height: 54px;
  border-radius: 999px;
  border: 1.5px solid rgba(91, 112, 154, 0.28);
  position: relative;
}

.gate-indicator span {
  position: absolute;
  left: 50%;
  top: 12px;
  width: 6px;
  height: 12px;
  border-radius: 999px;
  background: rgba(45, 114, 234, 0.72);
  transform: translateX(-50%);
  animation: gateMove 1.45s ease-in-out infinite;
}

@keyframes gateMove {
  0% { opacity: 0; transform: translate(-50%, -4px); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 16px); }
}

.gate-overlay.is-leaving {
  opacity: 0;
  transform: scale(1.02);
  visibility: hidden;
}

.gate-overlay.is-hidden {
  display: none;
}

.project-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  z-index: 70;
  background: rgba(248, 251, 255, 0.96);
  backdrop-filter: blur(16px);
  border-left: 1px solid rgba(120, 146, 192, 0.12);
  box-shadow: -12px 0 36px rgba(45, 68, 112, 0.12);
  transform: translateX(102%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
}

.project-drawer.is-open {
  transform: translateX(0);
}

.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 34, 60, 0.18);
  backdrop-filter: blur(2px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}

.drawer-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(120, 146, 192, 0.12);
}

.drawer-kicker {
  margin: 0 0 8px;
  color: #7e8ba6;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.drawer-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.drawer-close {
  appearance: none;
  border: 0;
  background: rgba(255,255,255,0.72);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #44536d;
}

.drawer-list {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  overflow: auto;
  padding-right: 2px;
}

.drawer-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(120, 146, 192, 0.12);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
}

.drawer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(50, 78, 132, 0.12);
}

.drawer-cover {
  border-radius: 12px;
  overflow: hidden;
  background: #dfe9fb;
}

.drawer-cover img {
  height: 100%;
  object-fit: cover;
}

.drawer-body h3 {
  margin: 2px 0 8px;
  font-size: 1.08rem;
}

.drawer-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: .92rem;
}

.drawer-link {
  display: inline-flex;
  margin-top: 12px;
  font-weight: 700;
  color: var(--accent);
}

.hero-intro {
  padding: 84px 0 34px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: #7e8ba6;
  font-size: .84rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 18px;
  color: #203457;
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: clamp(1.95rem, 3.4vw, 3rem);
  line-height: 1.16;
}

.hero-desc {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .96rem;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

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

.pill-primary {
  background: linear-gradient(135deg, #2d72ea, #7aa3ff);
  color: #fff;
  box-shadow: 0 12px 24px rgba(55, 100, 194, 0.18);
}

.pill-secondary {
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--line-strong);
  color: var(--text);
}

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

.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  line-height: 1.08;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.featured-card,
.project-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-bg-strong), var(--card-bg));
  box-shadow: var(--shadow-card);
}

.featured-card {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 24px;
  margin-bottom: 28px;
  padding: 22px;
  border-radius: 30px;
  transition: transform .26s ease, box-shadow .26s ease;
  cursor: pointer;
}

.featured-card:hover,
.project-card.click-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(60, 88, 146, 0.14);
}

.featured-cover,
.project-cover {
  overflow: hidden;
  background: linear-gradient(155deg, #e6eef9 0%, #d8e6f8 45%, #cddcf3 100%);
}

.featured-cover {
  border-radius: 22px;
  min-height: 0;
  aspect-ratio: 16 / 10;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.project-cover {
  aspect-ratio: 16 / 9;
}

.featured-cover img,
.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-fit--psylens {
  object-position: center 42%;
}

.cover-fit--ai-eval {
  object-position: center 48%;
}

.cover-fit--patch-notes {
  object-position: center 45%;
}

.card-grid--projects-main {
  grid-template-columns: 1fr;
  gap: 28px;
}

.card-grid--projects-main > .featured-card + .featured-card + .project-card {
  margin-top: 8px;
}

.featured-content,
.project-body {
  padding: 8px 4px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: .9rem;
}

.meta-date {
  color: #8190ab;
  letter-spacing: 0.02em;
}

.featured-content h3,
.project-body h3 {
  margin: 0 0 14px;
  line-height: 1.12;
  letter-spacing: -.03em;
}

.featured-content h3 {
  font-size: clamp(1.82rem, 2.5vw, 2.56rem);
}

.project-body h3 {
  font-size: 1.32rem;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  font-size: .98rem;
}

.card-lead {
  margin: 0 0 12px;
  color: var(--text);
  font-weight: 650;
  line-height: 1.65;
  font-size: 1.02rem;
}

.featured-content .card-lead {
  margin-top: 0;
  margin-bottom: 2px;
  color: #3a4d68;
  font-weight: 600;
}

.featured-content .tag-row {
  margin-top: 14px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 18px;
}

.project-actions .text-link {
  margin-top: 0;
}

.text-link-secondary {
  color: var(--muted);
  font-weight: 650;
}

.text-link-secondary:hover {
  color: var(--accent);
}

.card-grid {
  display: grid;
  gap: 22px;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  overflow: hidden;
  transition: transform .26s ease, box-shadow .26s ease;
}

.project-body {
  padding: 20px 20px 22px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(83, 111, 161, 0.12);
  color: #536987;
  font-size: .9rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-weight: 700;
  color: var(--accent);
}

.disabled-link {
  opacity: .9;
}

.is-disabled {
  cursor: default;
  opacity: .98;
}

.cover-soft img {
  filter: saturate(.92) brightness(1.01);
}

.about-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 12px 0 84px;
}

.about-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
  line-height: 1.08;
}

.about-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
}

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

@media (max-width: 980px) {
  .featured-card,
  .about-strip,
  .card-grid-3 {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100vw - 28px, 1160px);
  }

  .topbar-inner {
    min-height: 68px;
    padding: 12px 0;
  }

  .navlinks {
    gap: 16px;
    font-size: .95rem;
  }

  .hero-intro {
    padding: 58px 0 28px;
  }

  .hero-title {
    font-size: clamp(1.55rem, 7vw, 2.2rem);
    line-height: 1.24;
  }

  .hero-desc {
    font-size: .98rem;
    line-height: 1.82;
  }

  .featured-card {
    padding: 14px;
    border-radius: 22px;
  }

  .featured-cover {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .project-body {
    padding: 18px;
  }

  .about-strip {
    padding-bottom: 64px;
  }

  .gate-title {
    font-size: clamp(2.4rem, 11vw, 4rem);
  }

  .project-drawer {
    width: 100vw;
    padding: 18px 16px;
  }

  .drawer-card {
    grid-template-columns: 96px 1fr;
  }
}

/* ===== homepage v2 patch: drawer + hero + cards ===== */

body.portfolio-home {
  overflow-x: hidden;
}

body.drawer-open {
  overflow: hidden;
  height: 100vh;
}

.nav-project-trigger {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.nav-project-trigger:hover {
  color: var(--text);
}

.project-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(420px, 92vw);
  z-index: 110;
  padding: 22px 18px 20px;
  background: rgba(247, 251, 255, 0.96);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(110, 138, 188, 0.12);
  box-shadow: 24px 0 48px rgba(52, 78, 128, 0.10);
  transform: translateX(-104%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .32s ease, opacity .26s ease, visibility .26s ease;
  overflow-y: auto;
}

.project-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(16, 33, 58, 0.20);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .26s ease, visibility .26s ease;
}

.drawer-mask.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.drawer-kicker {
  margin: 0 0 8px;
  color: #7e8ba6;
  font-size: .80rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.drawer-head h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.15;
  color: #203457;
}

.drawer-close {
  appearance: none;
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: #354968;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(78, 103, 150, 0.10);
}

.drawer-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-card {
  border: 1px solid rgba(83, 111, 161, 0.10);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.84));
  box-shadow: 0 18px 38px rgba(60, 88, 146, 0.08);
  cursor: pointer;
}

.drawer-cover {
  aspect-ratio: 16 / 9;
  background: #dfe9fb;
  overflow: hidden;
}

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

.drawer-body {
  padding: 16px 16px 18px;
}

.drawer-body h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.18;
  color: #203457;
}

.drawer-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: .96rem;
}

.drawer-link {
  display: inline-flex;
  margin-top: 14px;
  font-weight: 700;
  color: var(--accent);
}

/* hero */
.hero-intro {
  padding: 86px 0 38px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: #7e8ba6;
  font-size: .84rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 18px;
  color: #203457;
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.14;
}

.hero-desc {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.95;
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease;
}

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

.pill-primary {
  background: linear-gradient(135deg, #2d72ea, #7aa3ff);
  color: #fff;
  box-shadow: 0 12px 28px rgba(55, 100, 194, 0.18);
}

/* section head */
.section-head {
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
  line-height: 1.08;
  color: #203457;
}

.section-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

/* featured card fix */
.featured-content h3 {
  margin: 0 0 14px;
  line-height: 1.12;
  letter-spacing: -.03em;
  font-size: clamp(1.84rem, 2.5vw, 2.62rem);
  color: #203457;
}

.featured-content h3 a {
  color: inherit;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  font-size: .98rem;
}

.click-card {
  cursor: pointer;
}

/* secondary cards */
.card-grid {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.78));
  box-shadow: var(--shadow-soft);
}

.project-cover {
  border-radius: 20px;
  overflow: hidden;
  background: #dfe9fb;
  aspect-ratio: 16 / 9;
}

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

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 2px 4px;
}

.project-body h3 {
  margin: 0 0 12px;
  color: #203457;
  font-size: 1.28rem;
  line-height: 1.2;
}

.project-body .text-link {
  margin-top: auto;
  padding-top: 18px;
}

.cover-soft img {
  opacity: 0.9;
}

/* responsive */
@media (max-width: 980px) {
  .featured-card {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .project-drawer {
    width: 100vw;
    padding: 18px 14px;
  }

  .hero-intro {
    padding: 58px 0 28px;
  }

  .hero-title {
    font-size: clamp(1.52rem, 6vw, 2.1rem);
    line-height: 1.24;
  }

  .featured-card {
    padding: 14px;
    border-radius: 22px;
  }

  .featured-cover {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

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


/* ===== homepage refresh 2026-04-10 ===== */
:root {
  --bg-top: #d7e0ec;
  --bg-mid: #cad5e4;
  --bg-bottom: #e3e9f1;
  --text: #14263d;
  --muted: #55667d;
  --line: rgba(43, 63, 96, 0.14);
  --line-strong: rgba(43, 63, 96, 0.22);
  --accent: #2f69d3;
  --card-bg: rgba(247, 250, 255, 0.78);
  --card-bg-strong: rgba(251, 253, 255, 0.92);
  --shadow-soft: 0 24px 56px rgba(29, 43, 71, 0.12);
  --shadow-card: 0 18px 40px rgba(29, 43, 71, 0.14);
}

body.portfolio-home {
  background:
    radial-gradient(circle at 16% 2%, rgba(104, 136, 196, 0.22), transparent 28%),
    radial-gradient(circle at 100% 12%, rgba(129, 153, 197, 0.18), transparent 24%),
    linear-gradient(180deg, #dbe4ef 0%, #cfdae8 38%, #e5ebf3 100%);
}

body.portfolio-home::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02)),
    url("/img/site/noise.png");
  opacity: 0.12;
}

.topbar {
  background: rgba(224, 232, 242, 0.82);
  border-bottom: 1px solid rgba(65, 88, 127, 0.12);
  box-shadow: 0 8px 24px rgba(21, 36, 61, 0.04);
}

.gate-overlay {
  background:
    radial-gradient(circle at 50% 28%, rgba(243, 247, 252, 0.94), rgba(214, 225, 240, 0.92) 40%, rgba(195, 210, 230, 0.96) 100%),
    linear-gradient(180deg, #d9e5f2 0%, #c6d5e7 100%);
}

.gate-title {
  color: #1f3557;
  text-shadow: 0 10px 28px rgba(52, 78, 122, 0.16);
}

.hero-intro {
  padding: 92px 0 46px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: clamp(34px, 5vw, 84px);
  align-items: center;
}

.hero-portrait-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-portrait-card {
  width: min(100%, 340px);
  padding: 18px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(242, 246, 251, 0.92), rgba(227, 235, 245, 0.84));
  border: 1px solid rgba(50, 75, 114, 0.12);
  box-shadow: 0 28px 60px rgba(21, 36, 61, 0.16);
}

.hero-portrait {
  width: 100%;
  max-height: 640px;
  object-fit: contain;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(248, 250, 253, 0.92), rgba(229, 236, 245, 0.88));
}

.hero-quote {
  margin: 18px 0 0;
  color: #2b3e5f;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-style: italic;
  letter-spacing: 0.05em;
  text-align: center;
  font-family: "Snell Roundhand", "Brush Script MT", "Palatino Linotype", "Book Antiqua", serif;
}

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

.hero-title {
  color: #1b3355;
  font-size: clamp(2.2rem, 3.9vw, 4rem);
  line-height: 1.08;
  margin-bottom: 22px;
}

.hero-desc {
  color: #51627a;
  max-width: 720px;
  font-size: 1.04rem;
}

.pill-primary {
  background: linear-gradient(135deg, #244f9f, #4f7fd8);
  box-shadow: 0 14px 28px rgba(31, 59, 113, 0.18);
}

.featured-card,
.project-card {
  background: linear-gradient(180deg, rgba(249, 251, 255, 0.92), rgba(240, 245, 251, 0.84));
  border-color: rgba(44, 66, 100, 0.12);
}

.featured-cover,
.project-cover,
.drawer-cover {
  background: linear-gradient(180deg, rgba(203, 217, 236, 0.92), rgba(182, 199, 223, 0.90));
}

.featured-card:hover,
.project-card.click-card:hover,
.drawer-card:hover {
  box-shadow: 0 28px 54px rgba(21, 36, 61, 0.14);
}

.tag-row span {
  background: rgba(241, 245, 250, 0.88);
  border: 1px solid rgba(54, 79, 118, 0.10);
  color: #4f6483;
}

.about-strip {
  padding-top: 6px;
}

@media (max-width: 980px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-portrait-column {
    align-items: flex-start;
  }

  .hero-portrait-card {
    width: min(100%, 320px);
  }
}

@media (max-width: 760px) {
  .hero-intro {
    padding: 60px 0 28px;
  }

  .hero-layout {
    gap: 24px;
  }

  .hero-portrait-column {
    align-items: center;
  }

  .hero-portrait-card {
    width: min(100%, 280px);
    padding: 14px;
    border-radius: 24px;
  }

  .hero-portrait {
    border-radius: 18px;
  }

  .hero-title {
    font-size: clamp(1.72rem, 8vw, 2.5rem);
    line-height: 1.18;
  }

  .hero-quote {
    font-size: 1.08rem;
  }
}

.hero-desc-kaiti{
  font-family: "KaiTi","STKaiti","KaiTi_GB2312","Kaiti SC","Noto Serif SC",serif;
  line-height: 1.95;
  letter-spacing: 0.01em;
}


/* === homepage visual refresh override start === */

.hero-desc.hero-desc-kaiti{
  font-family: "KaiTi","STKaiti","KaiTi_GB2312","Kaiti SC","Noto Serif SC",serif;
  font-size: clamp(1.22rem, 1.06rem + 0.42vw, 1.5rem);
  line-height: 2.0;
  letter-spacing: 0.02em;
  color: rgba(66, 84, 122, 0.96);
}

.hero-title,
.home-hero .hero-title,
.homepage-hero .hero-title{
  text-shadow:
    0 2px 0 rgba(255,255,255,0.30),
    0 12px 26px rgba(40, 63, 108, 0.18);
}

.home-hero,
.homepage-hero{
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.home-hero > *,
.homepage-hero > *{
  position: relative;
  z-index: 1;
}

.home-hero::before,
.homepage-hero::before,
.home-hero::after,
.homepage-hero::after{
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.38;
  filter: blur(4px);
  background: radial-gradient(circle,
    rgba(136, 176, 255, 0.28) 0%,
    rgba(136, 176, 255, 0.14) 26%,
    rgba(136, 176, 255, 0.06) 46%,
    rgba(136, 176, 255, 0.00) 68%);
  animation: heroRippleFloat 16s ease-in-out infinite;
}

.home-hero::before,
.homepage-hero::before{
  width: 48rem;
  height: 48rem;
  left: -10rem;
  top: -8rem;
}

.home-hero::after,
.homepage-hero::after{
  width: 36rem;
  height: 36rem;
  right: -8rem;
  bottom: -10rem;
  animation-delay: -8s;
}

@keyframes heroRippleFloat{
  0%   { transform: translate3d(0,0,0) scale(0.92); opacity: 0.24; }
  25%  { transform: translate3d(1.2rem,-0.8rem,0) scale(1.00); opacity: 0.34; }
  50%  { transform: translate3d(0.2rem,1.0rem,0) scale(1.08); opacity: 0.22; }
  75%  { transform: translate3d(-1.0rem,0.6rem,0) scale(0.98); opacity: 0.32; }
  100% { transform: translate3d(0,0,0) scale(0.92); opacity: 0.24; }
}

@media (max-width: 768px){
  .hero-desc.hero-desc-kaiti{
    font-size: 1.08rem;
    line-height: 1.9;
  }

  .home-hero::before,
  .homepage-hero::before{
    width: 26rem;
    height: 26rem;
    left: -6rem;
    top: -4rem;
  }

  .home-hero::after,
  .homepage-hero::after{
    width: 20rem;
    height: 20rem;
    right: -5rem;
    bottom: -6rem;
  }
}

/* === homepage visual refresh override end === */


/* === homepage final visual override start === */

.hero-desc.hero-desc-kaiti{
  font-family: "KaiTi","STKaiti","KaiTi_GB2312","Kaiti SC","Noto Serif SC",serif;
  font-size: clamp(1.26rem, 1.08rem + 0.42vw, 1.52rem);
  line-height: 2.02;
  letter-spacing: 0.02em;
  color: rgba(70, 87, 124, 0.97);
}

.hero-intro .hero-title{
  text-shadow:
    0 1px 0 rgba(255,255,255,0.30),
    0 10px 22px rgba(40, 63, 108, 0.20),
    0 20px 42px rgba(40, 63, 108, 0.12);
}

.hero-intro{
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 56px;
  background: transparent;
  -webkit-mask-image: radial-gradient(
    145% 120% at 50% 50%,
    rgba(0,0,0,1) 58%,
    rgba(0,0,0,0.96) 70%,
    rgba(0,0,0,0.78) 82%,
    rgba(0,0,0,0.44) 91%,
    rgba(0,0,0,0.14) 97%,
    transparent 100%
  );
  mask-image: radial-gradient(
    145% 120% at 50% 50%,
    rgba(0,0,0,1) 58%,
    rgba(0,0,0,0.96) 70%,
    rgba(0,0,0,0.78) 82%,
    rgba(0,0,0,0.44) 91%,
    rgba(0,0,0,0.14) 97%,
    transparent 100%
  );
}

.hero-intro > *{
  position: relative;
  z-index: 2;
}

/* 主体流光：保留柔和感，但让移动更可见 */
.hero-intro::before{
  content: "";
  position: absolute;
  inset: -16%;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(
      112deg,
      rgba(255,255,255,0.00) 0%,
      rgba(255,255,255,0.00) 18%,
      rgba(204,223,255,0.16) 30%,
      rgba(243,248,255,0.34) 42%,
      rgba(184,210,255,0.22) 55%,
      rgba(255,255,255,0.00) 70%,
      rgba(255,255,255,0.00) 100%
    ),
    radial-gradient(42rem 24rem at 18% 28%, rgba(198,218,255,0.18) 0%, rgba(198,218,255,0.00) 72%),
    radial-gradient(34rem 20rem at 78% 34%, rgba(160,190,245,0.14) 0%, rgba(160,190,245,0.00) 74%),
    radial-gradient(36rem 22rem at 58% 78%, rgba(220,235,255,0.14) 0%, rgba(220,235,255,0.00) 72%);
  background-size: 250% 210%, auto, auto, auto;
  background-position: 0% 50%, 0 0, 0 0, 0 0;
  opacity: 0.90;
  filter: blur(10px);
  mix-blend-mode: screen;
  animation: heroWaterSheenMain 54s ease-in-out infinite;
}

/* 斜向流纹：更深、更可见、仍然克制 */
.hero-intro::after{
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background:
    repeating-radial-gradient(
      ellipse 180% 115% at 8% 52%,
      rgba(78, 102, 150, 0.115) 0 2px,
      rgba(255,255,255,0.00) 2px 22px,
      rgba(255,255,255,0.00) 22px 44px
    ),
    repeating-radial-gradient(
      ellipse 170% 108% at 92% 50%,
      rgba(108, 132, 184, 0.098) 0 2px,
      rgba(255,255,255,0.00) 2px 24px,
      rgba(255,255,255,0.00) 24px 48px
    ),
    linear-gradient(
      118deg,
      rgba(255,255,255,0.00) 0%,
      rgba(224,236,255,0.00) 24%,
      rgba(154,180,224,0.102) 40%,
      rgba(245,249,255,0.138) 50%,
      rgba(154,180,224,0.102) 60%,
      rgba(255,255,255,0.00) 76%,
      rgba(255,255,255,0.00) 100%
    );
  background-size: 155% 155%, 165% 165%, 240% 220%;
  background-position: 0% 0%, 100% 0%, 100% 50%;
  opacity: 0.68;
  filter: blur(0.45px);
  mix-blend-mode: multiply;
  animation: heroWaterTexture 74s linear infinite;
}

@keyframes heroWaterSheenMain{
  0%{
    background-position: 0% 50%, 0 0, 0 0, 0 0;
    transform: translate3d(-0.8%, 0, 0) scale(1.00);
    opacity: 0.82;
  }
  50%{
    background-position: 52% 50%, 0 0, 0 0, 0 0;
    transform: translate3d(0.6%, -0.18%, 0) scale(1.014);
    opacity: 0.94;
  }
  100%{
    background-position: 100% 50%, 0 0, 0 0, 0 0;
    transform: translate3d(1.0%, 0.16%, 0) scale(1.008);
    opacity: 0.84;
  }
}

@keyframes heroWaterTexture{
  0%{
    background-position: 0% 0%, 100% 0%, 100% 50%;
    transform: translate3d(-0.45%, 0, 0) scale(1.00);
    opacity: 0.54;
  }
  50%{
    background-position: 42% 10%, 62% 14%, 52% 50%;
    transform: translate3d(0.35%, 0.14%, 0) scale(1.010);
    opacity: 0.68;
  }
  100%{
    background-position: 100% 20%, 0% 24%, 0% 50%;
    transform: translate3d(0.48%, 0.10%, 0) scale(1.005);
    opacity: 0.56;
  }
}
  50%{
    background-position: 42% 10%, 62% 14%, 52% 50%;
    transform: translate3d(0.35%, 0.14%, 0) scale(1.010);
    opacity: 0.68;
  }
  100%{
    background-position: 100% 20%, 0% 24%, 0% 50%;
    transform: translate3d(0.48%, 0.10%, 0) scale(1.005);
    opacity: 0.56;
  }
}
  50%{
    background-position: 42% 10%, 62% 14%, 52% 50%;
    transform: translate3d(0.28%, 0.12%, 0) scale(1.010);
    opacity: 0.34;
  }
  100%{
    background-position: 100% 20%, 0% 24%, 0% 50%;
    transform: translate3d(0.40%, 0.08%, 0) scale(1.005);
    opacity: 0.28;
  }
}
  50%{
    background-position: 46% 18%, 26% 10%, 50% 50%;
    transform: translate3d(0.35%, 0.16%, 0) scale(1.012);
    opacity: 0.46;
  }
  100%{
    background-position: 100% 36%, 64% 22%, 0% 50%;
    transform: translate3d(0.55%, 0.10%, 0) scale(1.006);
    opacity: 0.36;
  }
}

@media (max-width: 768px){
  .hero-desc.hero-desc-kaiti{
    font-size: 1.08rem;
    line-height: 1.9;
  }

  .hero-intro{
    border-radius: 34px;
  }

  .hero-intro::before{
    opacity: 0.74;
    filter: blur(8px);
  }

  .hero-intro::after{
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background:
    repeating-radial-gradient(
      ellipse 180% 115% at 8% 52%,
      rgba(78, 102, 150, 0.115) 0 2px,
      rgba(255,255,255,0.00) 2px 22px,
      rgba(255,255,255,0.00) 22px 44px
    ),
    repeating-radial-gradient(
      ellipse 170% 108% at 92% 50%,
      rgba(108, 132, 184, 0.098) 0 2px,
      rgba(255,255,255,0.00) 2px 24px,
      rgba(255,255,255,0.00) 24px 48px
    ),
    linear-gradient(
      118deg,
      rgba(255,255,255,0.00) 0%,
      rgba(224,236,255,0.00) 24%,
      rgba(154,180,224,0.102) 40%,
      rgba(245,249,255,0.138) 50%,
      rgba(154,180,224,0.102) 60%,
      rgba(255,255,255,0.00) 76%,
      rgba(255,255,255,0.00) 100%
    );
  background-size: 155% 155%, 165% 165%, 240% 220%;
  background-position: 0% 0%, 100% 0%, 100% 50%;
  opacity: 0.68;
  filter: blur(0.45px);
  mix-blend-mode: multiply;
  animation: heroWaterTexture 74s linear infinite;
}
}

/* === homepage final visual override end === */













