:root {
  --bg-top: #e7f0fc;
  --bg-mid: #f5f9fd;
  --bg-bottom: #fbfbfd;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --text: #152443;
  --muted: #5c6f8f;
  --faint: #6e83a0;
  --accent: #1d4ed8;
  --accent-2: #7c3aed;
  --accent-soft: #eaf2ff;
  --border: #e4ecf7;
  --shadow-soft: 0 10px 30px rgba(30, 58, 138, 0.08);
  --shadow-hover: 0 18px 44px rgba(30, 58, 138, 0.14);
}

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

html,
body {
  height: 100%;
  overflow-anchor: none;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 58px;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-mid);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 34%, var(--bg-bottom) 100%);
  pointer-events: none;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 520px;
  height: 520px;
  top: -140px;
  left: -100px;
  background: radial-gradient(circle, rgba(147, 197, 253, 0.5), rgba(147, 197, 253, 0) 70%);
  animation: orb-float 16s ease-in-out infinite;
}

body::after {
  width: 460px;
  height: 460px;
  bottom: -130px;
  right: -90px;
  background: radial-gradient(circle, rgba(196, 181, 253, 0.42), rgba(196, 181, 253, 0) 70%);
  animation: orb-float 19s ease-in-out infinite reverse;
}

@keyframes orb-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(26px, -20px) scale(1.06);
  }
}

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

img {
  display: block;
  max-width: 100%;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 4px;
}

.ph {
  color: var(--muted);
  font-style: normal;
  letter-spacing: 0.03em;
}

.field-note {
  display: block;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.08em;
  font-weight: 400;
  margin-bottom: 4px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ================= 顶部导航（固定置顶） ================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(231, 240, 252, 0.9);
  backdrop-filter: blur(14px) saturate(115%);
  border-bottom: 0;
  box-shadow: none;
}

body[data-page="project"] .site-header {
  position: absolute;
  background: linear-gradient(180deg, rgba(7, 14, 29, 0.34) 0%, rgba(7, 14, 29, 0) 100%);
  backdrop-filter: none;
  transition: opacity 0.28s ease, transform 0.36s cubic-bezier(0.22, 0.8, 0.3, 1);
}

body[data-page="project"]:has(.detail-hero.pinned) .site-header {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

body[data-page="project"] {
  padding-top: 0;
}

body[data-page="project"] .nav-brand,
body[data-page="project"] .nav-link {
  color: #f5f8ff;
  text-shadow: 0 1px 8px rgba(7, 14, 29, 0.36);
}

body[data-page="project"] .nav-link:hover,
body[data-page="project"] .nav-link.active,
body[data-page="project"] .nav-caret:hover {
  color: #bcd0ff;
}

body[data-page="project"] .nav-caret {
  color: #8fa4ca;
}

body[data-page="project"] .dropdown {
  background: rgba(21, 36, 67, 0.97);
  border-color: rgba(188, 208, 255, 0.14);
  box-shadow: 0 24px 56px rgba(7, 14, 29, 0.3);
}

body[data-page="project"] .dropdown-item,
body[data-page="project"] .dropdown-label {
  color: #d8e3f8;
  border-color: rgba(188, 208, 255, 0.12);
}

body[data-page="project"] .dropdown-item:hover {
  background: rgba(188, 208, 255, 0.1);
  color: #ffffff;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.nav.container {
  max-width: 1080px;
  padding-right: 24px;
  padding-left: 24px;
}

.nav-brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.nav-brand .dot {
  color: var(--accent);
}

.nav-menus {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  transition: color 0.2s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link.active {
  font-weight: 600;
}

.nav-caret {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #b9c8da;
  font-size: 18px;
  padding: 8px 2px;
  line-height: 1;
  transition: transform 0.2s, color 0.2s;
}

.nav-item:hover .nav-caret,
.nav-caret:hover {
  color: var(--accent);
  transform: scale(1.25);
}

.dropdown {
  visibility: hidden;
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  min-width: 236px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 24px 56px rgba(30, 58, 138, 0.14);
  border-radius: 16px;
  padding: 14px 12px;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.dropdown::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 0;
  right: 0;
  height: 13px;
}

.nav-item:hover .dropdown,
.dropdown.open {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: block;
  padding: 10px 18px;
  margin: 2px 0;
  border-radius: 10px;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: #3c4c68;
  transition: background 0.2s, color 0.2s;
}

button.dropdown-item {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.dropdown-item:hover {
  background: rgba(219, 234, 254, 0.72);
  color: var(--accent);
}

.dropdown-label {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--faint);
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding: 8px 18px 3px 24px;
}

.dropdown-sub {
  position: relative;
  padding: 5px 18px 5px 26px;
  font-size: 12.5px;
  margin: 1px 0;
}

.dropdown-sub::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
}

.dropdown-sub:hover::before {
  background: var(--accent);
}

/* ================= 首页 ================= */

body[data-page="index"] {
  background-color: #f3efe4;
}

body[data-page="index"] .bg-layer {
  background: #f3efe4;
}

body[data-page="index"]::before,
body[data-page="index"]::after {
  display: none;
}

body[data-page="index"] .site-header {
  background: transparent;
  backdrop-filter: none;
  border-bottom: 0;
}

body[data-page="index"] .site-footer {
  border-top-color: rgba(21, 36, 67, 0.1);
}

main {
  flex: 1;
  width: 100%;
}

body[data-page="index"] main {
  display: flex;
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(500px, 1.18fr);
  align-items: center;
  gap: clamp(72px, 8vw, 118px);
  width: 100%;
}

body[data-page="index"] .hero-inner {
  max-width: 1320px;
  padding-right: clamp(32px, 3vw, 46px);
  padding-left: clamp(32px, 3vw, 46px);
}

@media (min-width: 901px) {
  body[data-page="index"] .hero-inner {
    transform: translateX(clamp(18px, 2vw, 30px));
  }
}

.hero-media {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

body[data-page="index"] .hero-media {
  justify-content: center;
}

body[data-page="index"] .polaroid-stack {
  width: clamp(185px, 20vw, 239px);
  height: clamp(200px, 20.8vw, 261px);
}

body[data-page="index"] .polaroid {
  width: clamp(127px, 13.5vw, 153px);
}

@media (min-width: 901px) {
  body[data-page="index"] .hero-media {
    transform: translateX(8px);
  }
}

.polaroid-stack {
  --fan-offset: 26px;
  --fan-drop: 10px;
  position: relative;
  width: clamp(250px, 28vw, 330px);
  height: clamp(270px, 29vw, 360px);
}

.polaroid {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(170px, 19vw, 210px);
  aspect-ratio: 54 / 86;
  background:
    radial-gradient(ellipse at 22% 16%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 55%),
    linear-gradient(165deg, #fdfcf9 0%, #f7f6f1 55%, #efece5 100%);
  border: none;
  border-radius: 6px;
  --polaroid-ring: inset 0 0 0 1px rgba(23, 32, 52, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(23, 32, 52, 0.04);
  box-shadow: var(--polaroid-ring), 0 14px 30px rgba(21, 36, 67, 0.16);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform-origin: 50% 100%;
  transition: transform 0.55s cubic-bezier(0.22, 0.8, 0.3, 1), box-shadow 0.35s ease;
}

.polaroid-photo {
  display: block;
  position: absolute;
  left: 7.407%;
  right: 7.407%;
  top: 4.651%;
  bottom: 23.256%;
  border: 1px solid rgba(20, 28, 46, 0.1);
  border-radius: 1px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.16), inset 0 -1px 2px rgba(255, 255, 255, 0.65);
  background-size: cover;
  background-position: center;
}

.polaroid.slot-front {
  transform: translate(-50%, -50%) rotate(-2.5deg) scale(1);
  z-index: 30;
  box-shadow: var(--polaroid-ring), 0 14px 30px rgba(21, 36, 67, 0.16);
}

.polaroid.slot-left {
  transform: translate(calc(-50% - var(--fan-offset)), calc(-50% + var(--fan-drop))) rotate(-10deg) scale(0.92);
  z-index: 20;
  box-shadow: var(--polaroid-ring), 0 8px 18px rgba(21, 36, 67, 0.1);
}

.polaroid.slot-right {
  transform: translate(calc(-50% + var(--fan-offset)), calc(-50% + var(--fan-drop))) rotate(10deg) scale(0.92);
  z-index: 10;
  box-shadow: var(--polaroid-ring), 0 8px 18px rgba(21, 36, 67, 0.1);
}

.polaroid:hover,
.polaroid.is-hovered {
  box-shadow: var(--polaroid-ring), 0 18px 36px rgba(21, 36, 67, 0.2);
}

.polaroid.slot-front:hover,
.polaroid.slot-front.is-hovered {
  transform: translate(-50%, -50%) rotate(-2.5deg) scale(1.04);
}

.polaroid.slot-left:hover,
.polaroid.slot-left.is-hovered {
  transform: translate(calc(-50% - var(--fan-offset)), calc(-50% + var(--fan-drop))) rotate(-10deg) scale(1.06);
}

.polaroid.slot-right:hover,
.polaroid.slot-right.is-hovered {
  transform: translate(calc(-50% + var(--fan-offset)), calc(-50% + var(--fan-drop))) rotate(10deg) scale(1.06);
}

.polaroid-stack:hover {
  --fan-offset: 52px;
}

.polaroid-stack {
  animation: polaroidStackRise 1.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes polaroidStackRise {
  from {
    transform: translateY(44px);
  }
  to {
    transform: none;
  }
}

.hero-content {
  min-width: 0;
  padding-right: clamp(8px, 2vw, 30px);
  text-align: left;
  animation: heroRise 1.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes heroRise {
  from {
    opacity: 0.3;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-title {
  font-size: clamp(37px, 4.2vw, 48.5px);
  font-weight: 650;
  line-height: 1.64;
  letter-spacing: 0.02em;
  color: var(--text);
  text-wrap: balance;
}

.hero-mark {
  position: relative;
  z-index: 0;
  isolation: isolate;
  display: inline-block;
  white-space: nowrap;
}

.hero-mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -0.08em;
  bottom: 0.1em;
  left: -0.08em;
  height: 0.3em;
  background: rgba(137, 164, 184, 0.27);
}

.hero-title .accent {
  background: linear-gradient(92deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-role {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.hero-identity {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 22px;
  color: #657079;
  font-size: 15.4px;
  font-weight: 450;
  line-height: 1.7;
}

.hero-identity strong {
  color: var(--text);
  font-weight: 700;
}

.hero-link-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-top: 64px;
}

.hero-link-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 37px;
  padding: 4px 0;
  color: #3f4b55;
  font-size: 17.8px;
  font-weight: 500;
  line-height: 1.45;
  transform-origin: left center;
  transition: color 0.22s ease, transform 0.22s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.hero-link-list a::before {
  content: ">";
  display: inline-block;
  width: 15px;
  margin-right: 5px;
  color: #8b969d;
}

.hero-link-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.hero-link-list a:hover,
.hero-link-list a:focus-visible {
  color: #0c1422;
  font-weight: 700;
  transform: scale(1.035);
}

.hero-link-list a:hover::after,
.hero-link-list a:focus-visible::after {
  transform: scaleX(1);
}

.hero-link-list:not(.is-alt-active) a:first-child {
  color: #0c1422;
  font-weight: 700;
}

.hero-link-list:not(.is-alt-active) a:first-child::after {
  transform: scaleX(1);
}

.hero-tagline {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 30px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  border: none;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.38);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.35);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: var(--surface-solid);
  border-color: rgba(37, 99, 235, 0.55);
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.98);
}

.hero-actions .btn-primary::after {
  content: "→";
  transition: transform 0.2s ease;
}

.hero-actions .btn-primary:hover::after {
  transform: translateX(4px);
}

/* ================= 内容页通用 ================= */

.page-body {
  padding-top: 44px;
  padding-bottom: 88px;
  animation: pageIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-subtitle {
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.9;
  margin-bottom: 36px;
}

.page-subtitle-strong {
  font-weight: 700;
  color: var(--text);
}

.about-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.about-subtitle {
  max-width: 610px;
  margin-bottom: 30px;
  color: var(--text);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: -0.015em;
}

.page-subtitle strong {
  color: var(--text);
}

.page-head {
  max-width: 760px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--faint);
  margin-bottom: 26px;
}

.breadcrumb a {
  color: var(--faint);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.crumb-sep {
  color: #c3d2e6;
}

.empty {
  color: var(--muted);
  padding: 40px 0;
  text-align: center;
}

.empty-box {
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px dashed rgba(147, 167, 196, 0.55);
  border-radius: 14px;
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

/* ================= 作品集目录页 ================= */

.works-sections {
  max-width: 760px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.works-sec {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background-color: var(--surface);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 30%, rgba(255, 255, 255, 0.82) 60%, rgba(255, 255, 255, 0.72) 100%),
    linear-gradient(90deg, rgba(37, 99, 235, 0) 0%, rgba(37, 99, 235, 0.1) 42%, rgba(99, 102, 241, 0.18) 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.works-sec:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-hover);
  border-color: rgba(37, 99, 235, 0.35);
}

.works-sec-no {
  font-size: 13px;
  color: var(--faint);
  letter-spacing: 0.08em;
}

.works-sec-title {
  font-size: 23px;
  font-weight: 700;
  margin-bottom: 4px;
}

.works-sec-desc {
  font-size: 14px;
  color: var(--muted);
}

.works-sec-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.works-sec-count.dim {
  color: var(--muted);
  background: rgba(226, 232, 240, 0.6);
}

.works-sec-arrow {
  color: var(--faint);
  opacity: 0.4;
  transition: opacity 0.2s, color 0.2s, transform 0.2s;
}

.works-sec:hover .works-sec-arrow {
  opacity: 1;
  color: var(--accent);
  transform: translateX(3px);
}

/* ================= 作品页精选画廊 ================= */

.featured-gallery {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  min-height: 500px;
  margin: 0 0 30px;
  padding: 56px 0 106px;
  overflow: visible;
  background: transparent;
  width: calc(100% + 92px);
}

.featured-media {
  position: relative;
  min-height: 0;
  aspect-ratio: 1.42 / 1;
  overflow: hidden;
  background: #dfe8f4;
}

.featured-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.featured-image-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  height: 100%;
  padding: 0 clamp(30px, 3.4vw, 52px) 0 clamp(58px, 5vw, 78px);
  background: transparent;
  transition: background 0.22s ease;
}

.featured-copy:hover,
.featured-copy:focus-visible {
  background: transparent;
}

.featured-type {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.06em;
}

.featured-title {
  color: var(--text);
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.025em;
}

.featured-summary {
  margin-top: 7px;
  color: #33445f;
  font-size: 16px;
  line-height: 1.8;
}

.featured-meta {
  margin-top: 12px;
  color: var(--faint);
  font-size: 13px;
}

.featured-enter {
  align-self: flex-start;
  margin-top: 17px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  border-bottom: 1px solid currentColor;
}

.featured-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(12, 22, 40, 0.42);
  backdrop-filter: blur(8px);
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.featured-arrow svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.featured-gallery:has(.featured-media:hover) .featured-arrow,
.featured-gallery:has(.featured-copy:hover) .featured-arrow,
.featured-gallery:has(.featured-copy:focus-visible) .featured-arrow,
.featured-gallery.controls-visible .featured-arrow,
.featured-arrow:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.featured-arrow:hover,
.featured-arrow:focus-visible {
  background: rgba(12, 22, 40, 0.72);
  transform: translateY(-50%) scale(1.06);
}

.featured-prev {
  left: 18px;
}

.featured-next {
  right: 18px;
}

.featured-progress {
  position: absolute;
  right: 18px;
  bottom: 15px;
  z-index: 2;
  color: #ffffff;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.75);
}

.featured-footer {
  position: absolute;
  bottom: 28px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.featured-scroll-hint {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 10px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(46, 72, 113, 0.08);
  opacity: 1;
  transition: opacity 0.35s ease;
}

.featured-gallery.is-past-gallery .featured-scroll-hint {
  opacity: 0;
}

.featured-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.featured-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 1px solid rgba(47, 67, 96, 0.58);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.featured-dots button.on {
  background: #263954;
  transform: scale(1.08);
}

.featured-gallery.is-changing.is-forward .featured-image {
  animation: featuredSlideForward 0.48s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.featured-gallery.is-changing.is-backward .featured-image {
  animation: featuredSlideBackward 0.48s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.featured-gallery.is-changing .featured-copy > * {
  animation: featuredTextFade 0.4s ease both;
}

@keyframes featuredSlideForward {
  from { opacity: 0.35; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes featuredSlideBackward {
  from { opacity: 0.35; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes featuredTextFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ================= 项目目录页 ================= */

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: 1080px;
}

.category-grid.peek {
  -webkit-mask-image: linear-gradient(180deg, #000 70%, rgba(0, 0, 0, 0) 98%);
  mask-image: linear-gradient(180deg, #000 70%, rgba(0, 0, 0, 0) 98%);
  padding-bottom: 12px;
}

.p-card {
  display: block;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.p-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: rgba(37, 99, 235, 0.35);
}

.p-card-img {
  position: relative;
  aspect-ratio: 1.72 / 1;
  overflow: hidden;
  background: #eef2f8;
}

.p-card-cat-overlay {
  position: absolute;
  left: 13px;
  bottom: 11px;
  z-index: 2;
  color: #ffffff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-shadow: none;
  pointer-events: none;
}

.p-card-cat-overlay.on-light {
  color: #13213c;
  text-shadow: none;
}

.p-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.p-card:hover .p-card-img img {
  transform: scale(1.04);
}

.p-card-body {
  padding: 12px 16px 15px;
}

.p-card-cat {
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.field-label {
  display: block;
  margin-bottom: 3px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.p-card-title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.p-card-title .field-label {
  font-size: 10px;
}

.p-card-desc {
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.p-card-meta {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--faint);
}

.p-card-meta .field-label,
.p-card-caps .field-label {
  margin-bottom: 2px;
}

.more-hint {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 60;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  font-size: 13px;
}

.more-arrow {
  font-size: 18px;
  animation: bounce-down 1.6s ease-in-out infinite;
}

.scroll-fab {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

.scroll-fab.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
}

@keyframes bounce-down {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* ================= 项目展示页 ================= */

.detail-hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9;
  overflow-anchor: none;
  width: 100%;
  height: 66vh;
  min-height: 400px;
  overflow: hidden;
  background: #152443;
  will-change: height;
}

.detail-hero.pinned {
  height: 84px;
  min-height: 84px;
}

.detail-hero-spacer {
  width: 100%;
  height: 66vh;
  min-height: 400px;
  pointer-events: none;
}

.detail-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #152443;
}

.detail-hero.pinned .detail-hero-img {
  object-position: bottom;
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 22, 0.3) 0%, rgba(8, 12, 22, 0.16) 55%, rgba(8, 12, 22, 0.35) 100%);
}

.detail-hero-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8, 12, 22, 0.42) 0%, rgba(8, 12, 22, 0.62) 40%, rgba(8, 12, 22, 0.7) 100%);
}

.detail-hero.pinned .detail-hero-bar {
  top: 0;
}

.detail-hero-content {
  position: static;
  padding: 22px 24px 28px;
  z-index: 2;
  color: #ffffff;
  text-align: left;
  opacity: var(--hero-full-opacity, 1);
  transform: translateY(var(--hero-full-shift, 0));
  will-change: opacity, transform;
}

.detail-hero.pinned .detail-hero-content {
  pointer-events: none;
}

.detail-hero-compact {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  color: #ffffff;
  opacity: var(--hero-compact-opacity, 0);
  transform: translateY(var(--hero-compact-shift, 8px));
  will-change: opacity, transform;
  pointer-events: none;
}

.detail-compact-title {
  max-width: min(760px, 72vw);
  overflow: hidden;
  color: #ffffff;
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(7, 14, 29, 0.45);
  white-space: nowrap;
}

.detail-compact-meta {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12.5px;
  line-height: 1.35;
}

.detail-category {
  font-size: 13px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.detail-title {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  max-width: 900px;
  color: #ffffff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.detail-summary {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 8px;
  max-width: 860px;
}

.detail-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.detail-main {
  padding-top: 40px;
  padding-bottom: 72px;
}

.detail-intro {
  max-width: 640px;
  margin: 0;
  text-align: left;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.detail-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-top: 44px;
}

.detail-main-content {
  flex: 1;
  min-width: 0;
  max-width: 700px;
}

.detail-intro-text {
  font-size: 18px;
  font-weight: 600;
  color: #26344d;
  line-height: 1.9;
  margin-bottom: 20px;
}

.detail-overview-cards {
  display: grid;
  width: 100%;
  gap: 14px;
}

.detail-overview-card {
  display: grid;
  grid-template-columns: minmax(116px, 0.22fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 28px;
  padding: 24px 26px;
  border: 1px solid rgba(38, 70, 123, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 44px rgba(58, 91, 145, 0.08);
}

.detail-overview-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.detail-overview-card p {
  margin: 0;
  color: #26344d;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.75;
}

.detail-overview-card-combined {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 0;
  padding: 26px;
}

.detail-overview-heading {
  min-width: 0;
  padding: 0;
}

.detail-overview-heading + .detail-overview-heading {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(38, 70, 123, 0.12);
}

.detail-overview-card-combined .detail-overview-heading h2 {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.detail-overview-card-combined .detail-overview-heading p {
  color: var(--text);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.015em;
}

.detail-overview-card-role p {
  font-size: 15px;
  font-weight: 500;
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.detail-tags {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
}

.detail-stats {
  margin: 34px 0 8px;
}

.stats-v1 {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stats-item {
  flex: 1;
  min-width: 130px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
}

.stats-value {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
}

.stats-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #26344d;
  margin-top: 4px;
}

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

.stats-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.stats-card svg {
  display: block;
  color: var(--accent);
  margin-bottom: 12px;
}

.stats-v3 {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.stats-v3 .stats-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 13px 18px;
}

.stats-v3 .stats-line + .stats-line {
  border-top: 1px solid var(--border);
}

.stats-v3 .stats-k {
  font-size: 14px;
  color: var(--muted);
}

.stats-v3 .stats-v {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.cap-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 4px 0 22px;
}

.cap-filter-label {
  font-size: 13px;
  color: var(--muted);
  margin-right: 2px;
}

.cap-filter-chip {
  border: 1px solid rgba(86, 105, 132, 0.2);
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.cap-filter-chip.on {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(36, 87, 166, 0.16);
}

.cap-chip {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cap) 10%, white);
  color: var(--cap);
  border: 1px solid color-mix(in srgb, var(--cap) 30%, transparent);
}

.p-card-caps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.p-card-empty {
  color: var(--faint);
  font-size: 12px;
}

.p-card.hidden {
  display: none;
}

.cat-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 26px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.filter-row-label {
  font-size: 13px;
  color: var(--muted);
  margin-right: 2px;
}

.f-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.f-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.f-chip.cap {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.f-chip.cap:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}

.f-chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.18);
}

.f-chip.cap.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.18);
}

.filter-clear {
  display: none;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.filter-clear:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.p-card-caps .cap-chip {
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
}

.p-card-caps .cap-chip:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
}

.detail-body {
  max-width: 700px;
  margin: 0;
  padding-top: 4px;
  scroll-margin-top: 96px;
}

.proj-sec {
  scroll-margin-top: 96px;
}

.proj-sec h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 44px 0 14px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.proj-sec + .proj-sec h2 {
  margin-top: 72px;
}

.proj-heading-prefix {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.4;
  margin-bottom: 5px;
}

.proj-heading-rest {
  display: block;
  font-size: 24px;
  line-height: 1.45;
  color: var(--text);
}

.proj-sec > div {
  font-size: 16px;
  color: #1c2a40;
  line-height: 2;
}

.proj-sec > div h3 {
  margin: 30px 0 12px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
}

.proj-sec > div h3 .proj-heading-prefix {
  font-size: 13px;
}

.proj-sec > div h3 .proj-heading-rest {
  font-size: 20px;
}

.proj-sec > div h4 {
  margin: 22px 0 8px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy);
}

.proj-sec > div ul,
.proj-sec > div ol {
  margin: 10px 0 18px;
  padding-left: 1.45em;
}

.proj-sec > div li + li {
  margin-top: 5px;
}

.proj-imgs {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.proj-img {
  margin: 0;
  width: 70%;
  max-width: 70%;
}

.proj-img img {
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  cursor: zoom-in;
}

.proj-img.is-portrait img {
  width: auto;
  max-height: 60vh;
}

.proj-img.is-panorama {
  width: 100%;
  max-width: 100%;
}

.proj-video-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 12px;
  background: #0b1020;
  box-shadow: var(--shadow-soft);
}

.proj-video-poster {
  position: absolute;
  inset: 0;
  background-color: #152443;
  background-position: center;
  background-size: cover;
  filter: brightness(0.72);
}

.proj-video-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}

.video-load-btn {
  min-width: 132px;
}

.video-external-link {
  color: #ffffff;
  font-size: 12px;
  text-decoration: underline;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
}

.proj-video {
  width: 100%;
  margin-top: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  background: #000;
}

.proj-video-frame {
  display: block;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #0b1020;
}

.proj-sec a {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
}

.proj-img figcaption {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 9px;
  font-size: 14px;
  line-height: 1.6;
  color: #526581;
  text-align: left;
}

.proj-img figcaption::before {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  border-top: 6px solid currentColor;
  opacity: 0.72;
}

.detail-share {
  max-width: 700px;
  margin: 34px 0 0;
  text-align: center;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.detail-gallery-strip {
  max-width: 700px;
  margin-top: 72px;
}

.detail-gallery-strip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.detail-gallery-strip-head small {
  color: var(--faint);
  font-size: 12px;
  font-weight: 400;
}

.detail-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.detail-gallery-thumbs button {
  aspect-ratio: 1.42 / 1;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: #e7edf5;
  cursor: pointer;
}

.detail-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.detail-gallery-thumbs button:hover img,
.detail-gallery-thumbs button:focus-visible img {
  opacity: 0.86;
  transform: scale(1.035);
}

.detail-project-pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  max-width: 700px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.detail-project-pager a {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-project-pager a:hover,
.detail-project-pager a:focus-visible {
  color: var(--text);
}

.detail-project-next {
  text-align: right;
}

.detail-toc {
  width: 190px;
  position: sticky;
  top: 172px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  isolation: isolate;
}

.detail-toc::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50px;
  bottom: 18px;
  left: 10px;
  width: 1px;
  background: rgba(93, 113, 147, 0.2);
}

.detail-toc .toc-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text);
  padding: 0 10px 12px;
}

.detail-toc .toc-item {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 7px 10px 7px 30px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.detail-toc .toc-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 7px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(93, 113, 147, 0.5);
  border-radius: 50%;
  background: #f4f8fd;
  box-shadow: 0 0 0 3px rgba(244, 248, 253, 0.9);
  transform: translateY(-50%);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.detail-toc .toc-item::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 10px;
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, transparent, rgba(29, 78, 216, 0.72), transparent);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.24s ease;
}

.detail-toc .toc-item:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.detail-toc .toc-item:hover::before,
.detail-toc .toc-item.active::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(219, 234, 254, 0.95), 0 0 12px rgba(29, 78, 216, 0.34);
  transform: translateY(-50%) scale(1.12);
}

.detail-toc .toc-item:hover::after,
.detail-toc .toc-item.active::after {
  opacity: 1;
}

.detail-toc .toc-item.active {
  color: var(--accent);
  font-weight: 600;
}

/* ================= 图集查看器 ================= */

.viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 12, 22, 0.78);
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  user-select: none;
}

.viewer.open {
  display: flex;
}

.viewer-panel {
  position: relative;
  display: flex;
  width: min(1200px, 96vw);
  height: 90vh;
  background: rgba(12, 16, 28, 0.62);
  border-radius: 14px;
  overflow: hidden;
}

.viewer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.viewer-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.06);
}

.viewer-count {
  display: block;
  flex: 0 0 auto;
  padding-top: 8px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.viewer-main {
  flex: 1;
  position: relative;
  padding: 14px 20px 12px;
  min-width: 0;
}

.viewer-stage {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer-image-frame {
  position: relative;
  display: flex;
  max-width: 100%;
  max-height: 100%;
}

.viewer-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
  transition: opacity 0.16s ease;
}

.viewer-image-title {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 3;
  max-width: min(70%, 560px);
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(8, 12, 22, 0.56);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.viewer-zone {
  position: absolute;
  left: 0;
  right: 0;
  height: 34%;
  z-index: 1;
}

.viewer-zone-top {
  top: 0;
}

.viewer-zone-bottom {
  bottom: 0;
}

.viewer-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #ffffff;
  line-height: 1;
  padding: 10px 16px;
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.6));
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 2;
}

.viewer-prev {
  top: 8px;
}

.viewer-next {
  bottom: 8px;
}

.viewer-zone-top:hover ~ .viewer-prev,
.viewer-zone-bottom:hover ~ .viewer-next,
.viewer-prev:hover,
.viewer-next:hover {
  opacity: 1;
  pointer-events: auto;
}

.viewer-thumbs-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 132px;
  margin: 50px 20px 50px 0;
}

.viewer-thumbs-wrap .viewer-close {
  position: static;
  align-self: flex-end;
  width: 34px;
  height: 34px;
  font-size: 18px;
  margin-bottom: 10px;
}

.viewer-thumbs {
  flex: 1;
  min-height: 0;
  width: 100%;
  border-radius: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.75) transparent;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.viewer-thumbs::-webkit-scrollbar {
  width: 4px;
}

.viewer-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.viewer-thumbs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
}

.thumb {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}

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

.thumb.active {
  border-color: #ffffff;
}

/* ================= 关于我 ================= */

.about-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.about-head .page-head {
  flex: 1;
}

.about-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.about-layout {
  display: flex;
  gap: 44px;
  margin-top: 30px;
}

.about-sections {
  flex: 1;
  min-width: 0;
  max-width: 760px;
}

.about-toc {
  width: 180px;
  position: sticky;
  top: 92px;
  align-self: flex-start;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
}

.about-toc.visible {
  display: flex;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  background: none;
  border: none;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.toc-item:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.toc-item.active {
  color: var(--accent);
  font-weight: 600;
}

.toc-dot {
  font-size: 9px;
  color: var(--faint);
}

.about-item {
  border-bottom: 1px solid #d8e9ff;
  background: transparent;
  transform-origin: left center;
  scroll-margin-top: 96px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-item:hover {
  box-shadow: 0 10px 22px rgba(30, 58, 138, 0.08);
}

.about-item-head {
  position: static;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease,
    border-radius 0.3s ease, transform 0.3s ease, width 0.3s ease;
}

.about-triangle {
  font-size: 20px;
  color: #a9b9cf;
  width: 18px;
  flex: 0 0 auto;
  transition: transform 0.25s;
}

.about-item.open .about-triangle {
  transform: rotate(90deg);
}

.about-title {
  font-size: 21px;
  font-weight: 700;
}

.about-item-body {
  display: none;
  padding: 4px 48px 30px 34px;
}

.about-item.open .about-item-body {
  display: block;
}

.about-item-body p {
  font-size: 15px;
  color: #1c2a40;
  margin-bottom: 8px;
  line-height: 1.9;
}

.about-entry {
  margin: 20px 0;
}

.entry-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.entry-title {
  font-size: 18px;
  font-weight: 700;
}

.entry-title.weak {
  font-size: 18px;
  font-weight: 500;
  color: #64789a;
}

.entry-role {
  font-size: 14px;
  color: var(--muted);
}

.entry-head.student .entry-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.entry-head.student .entry-title.weak {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.entry-head.student .entry-title + .entry-role {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.entry-head.student .entry-title.weak + .entry-role {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.entry-sub {
  font-size: 17px !important;
  font-weight: 700;
  color: var(--text) !important;
  margin: 14px 0 4px !important;
}

.about-entry.oneline .entry-head {
  align-items: baseline;
}

.about-entry.oneline .entry-role {
  font-size: 15px;
  color: var(--muted);
}

/* ================= 技能特长 ================= */

.skills-page .page-head {
  margin-bottom: 32px;
}

.skills-grid {
  max-width: 900px;
  display: grid;
  gap: 16px;
}

.skill-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(38, 70, 123, 0.07);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.skill-card:hover {
  border-color: rgba(67, 98, 145, 0.3);
  box-shadow: 0 16px 34px rgba(38, 70, 123, 0.11);
  transform: translateY(-2px);
}

.skill-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: 0 0 auto;
}

.skill-icon img {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0.62;
}

.skill-icon-research img {
  transform: scale(1.08);
}

.skill-icon-tools img {
  transform: scale(0.94);
}

.skill-icon-language img {
  transform: scale(0.9);
}

.skill-content {
  min-width: 0;
}

.skill-card h2 {
  margin: 0 0 12px;
  font-size: 21px;
  color: var(--text);
}

.skill-card-body .about-entry {
  margin: 12px 0 0;
}

.skill-card-body .entry-title {
  font-size: 16px;
}

.skill-card-body .entry-lines p {
  margin-bottom: 2px;
}

/* ================= 时间轴 ================= */

.timeline-page .page-head {
  margin-bottom: 16px;
}

.timeline-intro {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.timeline {
  max-width: 1040px;
  padding: 48px 0 40px;
}

.constellation-sky {
  position: relative;
  overflow: hidden;
  padding: 28px 24px 14px;
  border: 1px solid rgba(148, 178, 255, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 22%, rgba(132, 167, 255, 0.16), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(134, 91, 220, 0.16), transparent 30%),
    linear-gradient(145deg, #071126 0%, #0b1834 48%, #17143a 100%);
  box-shadow: 0 24px 54px rgba(7, 17, 38, 0.22);
}

.constellation-sky::before,
.constellation-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.constellation-sky::before {
  opacity: 0.68;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.86) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(174, 198, 255, 0.68) 0 1px, transparent 1.5px);
  background-position: 12px 18px, 48px 62px;
  background-size: 88px 86px, 126px 118px;
}

.constellation-sky::after {
  background: linear-gradient(180deg, transparent 58%, rgba(7, 13, 31, 0.28));
}

.constellation-track {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 252px;
  padding: 0 10px;
}

.constellation-year {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 104px;
}

.constellation-nodes {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  padding-bottom: 12px;
}

.constellation-year-label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(222, 231, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.constellation-node {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  transform: translateY(calc(var(--node-rise) * -1));
  transition: transform 260ms ease, filter 260ms ease;
  animation: constellationArrive 560ms cubic-bezier(0.2, 0.75, 0.25, 1) var(--delay, 0ms) backwards;
}

.constellation-node svg {
  width: var(--star-size, 30px);
  height: var(--star-size, 30px);
  fill: #9fb8ea;
  stroke: rgba(241, 246, 255, 0.96);
  stroke-width: 1;
  filter: drop-shadow(0 0 7px rgba(146, 181, 255, 0.72));
  transition: fill 220ms ease, filter 220ms ease;
}

.constellation-node.is-low {
  --star-size: 18px;
}

.constellation-node.is-medium {
  --star-size: 25px;
}

.constellation-node.is-high {
  --star-size: 36px;
}

.constellation-node.is-high svg {
  fill: #f5f7ff;
  filter: drop-shadow(0 0 7px rgba(212, 226, 255, 0.92)) drop-shadow(0 0 17px rgba(118, 158, 255, 0.76));
}

.constellation-node.is-project svg {
  fill: #c3a7ff;
  filter: drop-shadow(0 0 8px rgba(193, 163, 255, 0.9)) drop-shadow(0 0 18px rgba(135, 95, 230, 0.64));
}

.constellation-node:hover,
.constellation-node:focus-visible,
.constellation-node.active {
  z-index: 5;
  transform: translateY(calc(var(--node-rise) * -1 - 6px)) scale(1.12);
}

.constellation-node:focus-visible {
  outline: 2px solid #dbe7ff;
  outline-offset: 5px;
  border-radius: 50%;
}

.constellation-node-label {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  width: max-content;
  max-width: 190px;
  padding: 6px 9px;
  border: 1px solid rgba(190, 209, 255, 0.22);
  border-radius: 8px;
  background: rgba(10, 22, 49, 0.94);
  box-shadow: 0 10px 26px rgba(1, 6, 18, 0.42);
  color: #f4f7ff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.constellation-node:hover .constellation-node-label,
.constellation-node:focus-visible .constellation-node-label,
.constellation-node.active .constellation-node-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.constellation-year:first-child .constellation-node-label {
  left: 0;
  transform: translate(0, 4px);
}

.constellation-year:first-child .constellation-node:hover .constellation-node-label,
.constellation-year:first-child .constellation-node:focus-visible .constellation-node-label,
.constellation-year:first-child .constellation-node.active .constellation-node-label {
  transform: none;
}

.constellation-year:last-child .constellation-node-label {
  right: 0;
  left: auto;
  transform: translate(0, 4px);
}

.constellation-year:last-child .constellation-node:hover .constellation-node-label,
.constellation-year:last-child .constellation-node:focus-visible .constellation-node-label,
.constellation-year:last-child .constellation-node.active .constellation-node-label {
  transform: none;
}

.constellation-detail {
  max-width: 680px;
  margin: 24px 0 0;
  padding: 22px 26px;
  border: 1px solid rgba(136, 161, 218, 0.2);
  border-radius: 16px;
  background: linear-gradient(145deg, #0b1834, #17143a);
  box-shadow: 0 18px 40px rgba(7, 17, 38, 0.18);
  color: #eef3ff;
  animation: constellationDetailIn 260ms ease both;
}

.constellation-detail > p {
  margin: 0;
  color: rgba(229, 236, 255, 0.82);
  font-size: 15px;
  line-height: 1.85;
}

.constellation-detail h2 {
  margin: 8px 0 9px;
  color: #f7f9ff;
  font-size: 21px;
  line-height: 1.45;
}

.constellation-detail-meta {
  display: flex;
  gap: 10px;
  color: #a9c2ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.constellation-detail-meta span + span::before {
  content: "·";
  margin-right: 10px;
  color: rgba(218, 228, 255, 0.45);
}

.constellation-project-link {
  display: inline-flex;
  margin-top: 14px;
  color: #b9ccff;
  font-weight: 700;
  text-decoration: none;
}

.constellation-project-link:hover {
  text-decoration: underline;
}

@keyframes constellationArrive {
  from { opacity: 0; transform: translateY(calc(var(--node-rise) * -1 + 12px)) scale(0.72); }
  to { opacity: 1; transform: translateY(calc(var(--node-rise) * -1)) scale(1); }
}

@keyframes constellationDetailIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* 动态轨迹时间轴：节点沿同一条经历轨迹展开 */
.journey-map {
  position: relative;
  min-height: 270px;
  overflow: visible;
}

.journey-route {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 230px;
  overflow: visible;
}

.journey-route-base,
.journey-route-draw {
  fill: none;
  stroke-linecap: round;
}

.journey-route-base {
  stroke: rgba(110, 140, 190, 0.2);
  stroke-width: 2;
}

.journey-route-draw {
  stroke: url(#journey-gradient);
  stroke: #6a8ed8;
  stroke-width: 2.5;
  stroke-dasharray: 1300;
  stroke-dashoffset: 1300;
  animation: journeyRouteDraw 1.35s cubic-bezier(0.2, 0.7, 0.2, 1) 100ms forwards;
}

@keyframes journeyRouteDraw {
  to { stroke-dashoffset: 0; }
}

.journey-node {
  position: absolute;
  z-index: 2;
  top: var(--node-y);
  left: var(--node-x);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  touch-action: manipulation;
  transform: translate(-50%, -50%) scale(0.72);
  animation: journeyNodeIn 380ms cubic-bezier(0.16, 1, 0.3, 1) var(--delay) forwards;
  transition: z-index 0s, transform 220ms ease;
}

@keyframes journeyNodeIn {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.journey-node-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #7d9bd2;
  box-shadow: 0 0 0 4px rgba(125, 155, 210, 0.13), 0 6px 12px rgba(39, 68, 121, 0.2);
  transform: translate(-50%, -50%);
  transition: width 220ms ease, height 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.journey-node.is-medium .journey-node-core {
  width: 16px;
  height: 16px;
  background: #4c73bc;
}

.journey-node.is-high .journey-node-core {
  width: 22px;
  height: 22px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12), 0 8px 16px rgba(37, 99, 235, 0.28);
}

.journey-node.is-project .journey-node-core {
  background: #7356c7;
}

.journey-node.is-project.active .journey-node-core::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px solid currentColor;
  border-radius: inherit;
  color: #7356c7;
  animation: journeyPulse 1.5s ease-out infinite;
}

@keyframes journeyPulse {
  from { opacity: 0.65; transform: scale(0.65); }
  to { opacity: 0; transform: scale(1.2); }
}

.journey-node:hover,
.journey-node:focus-visible,
.journey-node.active {
  z-index: 5;
  transform: translate(-50%, calc(-50% - 6px)) scale(1.08);
}

.journey-node:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.journey-node-label {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 200px;
  padding: 6px 9px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(28, 42, 64, 0.13);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.journey-node:hover .journey-node-label,
.journey-node:focus-visible .journey-node-label,
.journey-node.active .journey-node-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.journey-year-label {
  position: absolute;
  top: 235px;
  left: var(--node-x);
  color: var(--faint);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: translateX(-50%);
}

.journey-detail {
  min-height: 148px;
  max-width: 680px;
  margin: 28px 0 0;
  padding: 22px 26px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.journey-detail > p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.journey-detail h2 {
  margin: 8px 0 9px;
  color: var(--text);
  font-size: 21px;
  line-height: 1.45;
}

.journey-detail-meta {
  display: flex;
  gap: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.journey-detail-meta span + span::before {
  content: "·";
  margin-right: 10px;
  color: var(--faint);
}

.journey-project-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.journey-project-link:hover { text-decoration: underline; }

/* 沉浸式时间星图 */
body[data-page="timeline"] {
  --cosmos-ink: #f4f7ff;
  --cosmos-muted: #a9b7d2;
  --cosmos-line: rgba(151, 177, 230, 0.2);
  background: #050b18;
  color: var(--cosmos-ink);
  color-scheme: dark;
  overflow-x: hidden;
}

body[data-page="timeline"]::before,
body[data-page="timeline"]::after {
  display: none;
}

body[data-page="timeline"] .site-header {
  background: rgba(7, 16, 31, 0.92);
  border-bottom: 0;
  box-shadow: none;
}

body[data-page="timeline"] .nav-brand,
body[data-page="timeline"] .nav-link {
  color: #eaf0ff;
}

body[data-page="timeline"] .nav-link:hover,
body[data-page="timeline"] .nav-link.active,
body[data-page="timeline"] .nav-caret:hover {
  color: #a9c4ff;
}

body[data-page="timeline"] .nav-caret {
  color: #6f7f9f;
}

body[data-page="timeline"] .dropdown {
  background: rgba(12, 22, 43, 0.96);
  border-color: rgba(174, 198, 245, 0.16);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
}

body[data-page="timeline"] .dropdown-item,
body[data-page="timeline"] .dropdown-label {
  color: #c9d5ed;
  border-color: rgba(174, 198, 245, 0.12);
}

body[data-page="timeline"] .dropdown-item:hover {
  background: rgba(116, 151, 225, 0.12);
  color: #f4f7ff;
}

body[data-page="timeline"] .site-footer {
  border-top-color: rgba(174, 198, 245, 0.1);
  background: #050b18;
  color: #7585a3;
}

.timeline-page {
  flex: 0 0 auto;
  min-height: calc(100dvh - 68px);
  background:
    radial-gradient(circle at 18% 12%, rgba(51, 91, 165, 0.2), transparent 26%),
    radial-gradient(circle at 82% 26%, rgba(105, 63, 170, 0.16), transparent 28%),
    linear-gradient(180deg, #07101f 0%, #050b18 54%, #070817 100%);
}

.timeline-heading {
  position: relative;
  z-index: 5;
  padding-top: 16px;
}

.timeline-page .breadcrumb {
  color: #7587a8;
}

.timeline-page .breadcrumb a:hover {
  color: #d5e1fa;
}

.timeline-page .page-head {
  margin: 12px 0 0;
}

.timeline-page .page-title {
  color: #f7f9ff;
  font-size: 30px;
  letter-spacing: 0;
  text-shadow: 0 6px 24px rgba(118, 154, 231, 0.14);
}

.timeline-eyebrow {
  margin-bottom: 4px;
  color: #8096c2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.timeline-intro {
  color: var(--cosmos-muted);
  font-size: 15px;
}

.timeline {
  width: 100%;
  max-width: none;
  padding: 4px 0 0;
}

.cosmos-field {
  --sky-x: 0;
  --sky-y: 0;
  position: relative;
  height: clamp(450px, calc(100dvh - 226px), 620px);
  min-height: 450px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 48% 42%, rgba(34, 54, 106, 0.22), transparent 48%),
    radial-gradient(ellipse at 76% 62%, rgba(89, 52, 142, 0.14), transparent 38%);
}

.cosmos-field::before,
.cosmos-field::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.cosmos-field::before {
  width: 46vw;
  height: 46vw;
  min-width: 460px;
  min-height: 460px;
  top: 3%;
  left: 23%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 112, 201, 0.12), rgba(64, 72, 151, 0.05) 38%, transparent 70%);
  filter: blur(18px);
  transform: translate3d(calc(var(--sky-x) * -18px), calc(var(--sky-y) * -18px), 0);
  transition: transform 180ms ease-out;
}

.cosmos-field::after {
  right: 0;
  bottom: 0;
  left: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(4, 8, 18, 0.86));
}

.cosmos-dust {
  position: absolute;
  inset: -28px;
  z-index: -1;
  pointer-events: none;
}

.cosmos-dust-far {
  opacity: 0.5;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.76) 0 0.7px, transparent 1px),
    radial-gradient(circle, rgba(143, 173, 233, 0.7) 0 0.8px, transparent 1.1px);
  background-position: 8px 14px, 56px 68px;
  background-size: 92px 88px, 137px 129px;
  transform: translate3d(calc(var(--sky-x) * -7px), calc(var(--sky-y) * -7px), 0);
}

.cosmos-dust-near {
  opacity: 0.32;
  background-image: radial-gradient(circle, #dbe8ff 0 1px, transparent 1.5px);
  background-position: 32px 41px;
  background-size: 181px 167px;
  transform: translate3d(calc(var(--sky-x) * 12px), calc(var(--sky-y) * 12px), 0);
}

.cosmos-viewport {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cosmos-map {
  position: relative;
  width: calc(100vw - 48px);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
}

.cosmos-paths {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cosmos-link {
  stroke: var(--cosmos-line);
  stroke-width: 1;
  stroke-dasharray: 2 8;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: stroke 260ms ease, stroke-width 260ms ease, filter 260ms ease;
}

.cosmos-link.group-education {
  stroke: rgba(135, 180, 255, 0.24);
}

.cosmos-link.group-campus {
  stroke: rgba(166, 150, 236, 0.2);
}

.cosmos-link.group-internship {
  stroke: rgba(111, 204, 220, 0.22);
}

.cosmos-link.group-project {
  stroke: rgba(202, 157, 255, 0.24);
}

.cosmos-link.active {
  stroke: rgba(169, 198, 255, 0.82);
  stroke-width: 1.7;
  filter: drop-shadow(0 0 5px rgba(126, 163, 242, 0.76));
}

.cosmos-year {
  position: absolute;
  top: var(--year-y);
  left: var(--year-x);
  color: rgba(146, 165, 201, 0.56);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  transform: translate(-50%, -50%) rotate(-6deg);
}

.cosmos-year::before {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(100% + 9px);
  width: 22px;
  height: 1px;
  background: currentColor;
}

.cosmos-node {
  --star-size: 24px;
  position: absolute;
  z-index: 4;
  top: var(--node-y);
  left: var(--node-x);
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #afc8fb;
  opacity: 0.42;
  cursor: pointer;
  touch-action: manipulation;
  transform: translate(-50%, -50%);
  transition: transform 260ms ease, color 260ms ease, opacity 240ms ease;
  animation: cosmosNodeArrive 520ms cubic-bezier(0.18, 0.8, 0.22, 1) var(--delay) backwards;
}

.cosmos-node svg {
  position: relative;
  z-index: 2;
  width: var(--star-size);
  height: var(--star-size);
  overflow: visible;
  filter: drop-shadow(0 0 6px rgba(135, 174, 255, 0.72));
}

.cosmos-node .star-main {
  fill: currentColor;
  stroke: rgba(241, 246, 255, 0.86);
  stroke-width: 0.7;
}

.cosmos-node .star-core {
  fill: #ffffff;
}

.cosmos-node.is-low {
  --star-size: 18px;
  color: #7188b5;
  opacity: 0.3;
}

.cosmos-node.is-medium {
  --star-size: 23px;
  color: #a4bff2;
  opacity: 0.46;
}

.cosmos-node.is-high {
  --star-size: 31px;
  color: #eef4ff;
  opacity: 0.62;
}

.cosmos-node.is-hero {
  --star-size: 39px;
  color: #ffffff;
  opacity: 0.82;
}

.cosmos-node.is-project {
  color: #c3a7ff;
}

.cosmos-flare {
  position: absolute;
  inset: -24px;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.36) rotate(-12deg);
  transition: opacity 180ms ease, transform 520ms cubic-bezier(0.16, 0.84, 0.22, 1);
}

.cosmos-flare::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 47% 45%, rgba(255, 255, 255, 0.88) 0 4%, rgba(170, 201, 255, 0.42) 14%, transparent 48%),
    radial-gradient(ellipse at 56% 54%, rgba(177, 157, 255, 0.34) 0 8%, transparent 58%);
  filter: blur(1.4px) drop-shadow(0 0 8px rgba(132, 171, 255, 0.68));
}

.cosmos-flare::after {
  content: "";
  position: absolute;
  inset: 23%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.82), rgba(143, 179, 255, 0.2) 28%, transparent 70%);
  filter: blur(4px);
}

.cosmos-flare i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #eef5ff;
  box-shadow: 0 0 7px rgba(172, 201, 255, 0.9);
}

.cosmos-flare i:nth-child(1) { top: 17%; left: 72%; }
.cosmos-flare i:nth-child(2) { top: 68%; left: 12%; }
.cosmos-flare i:nth-child(3) { top: 78%; left: 81%; }

.cosmos-node:hover,
.cosmos-node:focus-visible,
.cosmos-node.active {
  z-index: 9;
  color: #ffffff;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.16);
}

.cosmos-node:hover .cosmos-flare,
.cosmos-node:focus-visible .cosmos-flare {
  opacity: 0.72;
  transform: scale(0.82) rotate(0deg);
}

.cosmos-node.active .cosmos-flare {
  opacity: 1;
  transform: scale(1.15) rotate(7deg);
}

.cosmos-node.is-low:hover .cosmos-flare,
.cosmos-node.is-low:focus-visible .cosmos-flare,
.cosmos-node.is-low.active .cosmos-flare {
  animation: cosmosLowTwinkle 3.6s ease-in-out infinite;
}

.cosmos-node.is-medium:hover .cosmos-flare,
.cosmos-node.is-medium:focus-visible .cosmos-flare,
.cosmos-node.is-medium.active .cosmos-flare {
  animation: cosmosMediumDrift 3.1s ease-in-out infinite;
}

.cosmos-node.is-high:hover .cosmos-flare,
.cosmos-node.is-high:focus-visible .cosmos-flare,
.cosmos-node.is-high.active .cosmos-flare {
  animation: cosmosHighBreath 2.7s ease-in-out infinite;
}

.cosmos-node.is-project:hover .cosmos-flare,
.cosmos-node.is-project:focus-visible .cosmos-flare,
.cosmos-node.is-project.active .cosmos-flare {
  animation: cosmosProjectOrbit 4.8s ease-in-out infinite;
}

.cosmos-node.active .cosmos-flare i:nth-child(1) { animation: cosmosDustOne 2.4s ease-in-out infinite; }
.cosmos-node.active .cosmos-flare i:nth-child(2) { animation: cosmosDustTwo 3s ease-in-out 180ms infinite; }
.cosmos-node.active .cosmos-flare i:nth-child(3) { animation: cosmosDustThree 2.7s ease-in-out 320ms infinite; }

.cosmos-node.active svg {
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.96)) drop-shadow(0 0 16px rgba(135, 174, 255, 0.96)) drop-shadow(0 0 30px rgba(111, 89, 224, 0.56));
}

.cosmos-node.active .star-main {
  fill: #ffffff;
}

.cosmos-node:focus-visible {
  outline: none;
}

.cosmos-node:focus-visible svg {
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.96)) drop-shadow(0 0 14px rgba(137, 177, 255, 0.92));
}

.cosmos-node-label {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 230px;
  padding: 9px 11px;
  border: 1px solid rgba(177, 203, 255, 0.2);
  border-radius: 10px;
  background: rgba(7, 16, 34, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
  color: #eff4ff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.cosmos-node.is-top .cosmos-node-label {
  top: calc(100% + 8px);
  bottom: auto;
}

.cosmos-node-label small {
  display: block;
  margin-bottom: 2px;
  color: #8398bf;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.cosmos-node:hover .cosmos-node-label,
.cosmos-node:focus-visible .cosmos-node-label,
.cosmos-node.active .cosmos-node-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cosmos-node.active .cosmos-node-label {
  opacity: 0;
}

.cosmos-node[data-index="0"] .cosmos-node-label,
.cosmos-node[data-index="1"] .cosmos-node-label {
  left: 0;
  transform: translate(0, 6px);
}

.cosmos-node[data-index="0"]:hover .cosmos-node-label,
.cosmos-node[data-index="0"]:focus-visible .cosmos-node-label,
.cosmos-node[data-index="0"].active .cosmos-node-label,
.cosmos-node[data-index="1"]:hover .cosmos-node-label,
.cosmos-node[data-index="1"]:focus-visible .cosmos-node-label,
.cosmos-node[data-index="1"].active .cosmos-node-label {
  transform: none;
}

.cosmos-detail {
  position: absolute;
  z-index: 12;
  top: calc(var(--detail-y) + 24px);
  left: calc(var(--detail-x) + 30px);
  width: min(360px, calc(100vw - 48px));
  padding: 21px 48px 22px 24px;
  border: 1px solid rgba(164, 193, 250, 0.22);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(14, 29, 57, 0.94), rgba(18, 18, 48, 0.94));
  box-shadow: 0 22px 62px rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  color: #eef3ff;
  animation: cosmosDetailIn 260ms cubic-bezier(0.2, 0.76, 0.26, 1) both;
}

.cosmos-detail.is-left {
  right: calc(100% - var(--detail-x) + 30px);
  left: auto;
}

.cosmos-detail.is-upper {
  top: auto;
  bottom: calc(100% - var(--detail-y) + 16px);
}

.cosmos-detail::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 22px;
  width: 74px;
  height: 1px;
  background: linear-gradient(90deg, #aac5ff, transparent);
  box-shadow: 0 0 10px rgba(142, 180, 255, 0.7);
}

.cosmos-detail-meta {
  display: flex;
  gap: 10px;
  color: #9db9ee;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.cosmos-detail-meta span + span::before {
  content: "·";
  margin-right: 10px;
  color: #536685;
}

.cosmos-detail h2 {
  margin: 7px 0 8px;
  color: #f8faff;
  font-size: 19px;
  line-height: 1.45;
}

.cosmos-detail p {
  margin: 0;
  color: #bcc9df;
  font-size: 14px;
  line-height: 1.75;
}

.cosmos-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(164, 193, 250, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #aab8d1;
  cursor: pointer;
}

.cosmos-detail-close:hover,
.cosmos-detail-close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.cosmos-detail-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.cosmos-project-link {
  display: inline-flex;
  gap: 6px;
  margin-top: 13px;
  color: #c3d5ff;
  font-size: 13px;
  font-weight: 700;
}

.cosmos-project-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

@keyframes cosmosNodeArrive {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.55); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes cosmosDetailIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes cosmosLowTwinkle {
  0%, 100% { opacity: 0.44; transform: scale(0.72) rotate(-5deg); }
  42% { opacity: 0.78; transform: scale(0.86) rotate(2deg); }
  68% { opacity: 0.56; transform: scale(0.78) rotate(5deg); }
}

@keyframes cosmosMediumDrift {
  0%, 100% { opacity: 0.62; transform: translate3d(-1px, 1px, 0) scale(0.84) rotate(-4deg); }
  50% { opacity: 0.94; transform: translate3d(2px, -2px, 0) scale(1.02) rotate(4deg); }
}

@keyframes cosmosHighBreath {
  0%, 100% { opacity: 0.72; transform: scale(0.96) rotate(3deg); }
  50% { opacity: 1; transform: scale(1.14) rotate(8deg); }
}

@keyframes cosmosProjectOrbit {
  0%, 100% { opacity: 0.74; transform: translate3d(0, 0, 0) scale(1) rotate(-7deg); }
  35% { opacity: 1; transform: translate3d(2px, -1px, 0) scale(1.13) rotate(5deg); }
  70% { opacity: 0.82; transform: translate3d(-2px, 2px, 0) scale(1.05) rotate(10deg); }
}

@keyframes cosmosDustOne {
  0%, 100% { opacity: 0.35; transform: translate3d(0, 0, 0) scale(0.7); }
  50% { opacity: 1; transform: translate3d(5px, -6px, 0) scale(1.15); }
}

@keyframes cosmosDustTwo {
  0%, 100% { opacity: 0.3; transform: translate3d(0, 0, 0) scale(0.7); }
  50% { opacity: 0.9; transform: translate3d(-6px, 4px, 0) scale(1.1); }
}

@keyframes cosmosDustThree {
  0%, 100% { opacity: 0.25; transform: translate3d(0, 0, 0) scale(0.65); }
  50% { opacity: 0.88; transform: translate3d(6px, 5px, 0) scale(1.08); }
}

.entry-date {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.entry-more {
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  transition: color 0.2s;
}

.entry-more:hover {
  color: var(--accent);
}

.entry-lines {
  margin-top: 6px;
  padding-left: 18px;
}

.entry-lines p {
  margin-bottom: 6px;
}

/* ================= 联系我 ================= */

.contact-list {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  background: var(--surface);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.contact-info {
  flex: 1;
  min-width: 0;
}

.contact-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.contact-value {
  font-size: 16px;
  font-weight: 600;
  word-break: break-all;
}

.qr-btn {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border: none;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.qr-btn:hover {
  background: #dbeafe;
}

.copy-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: color 0.2s, border-color 0.2s;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ================= 覆盖窗口（二维码 / 下载简历） ================= */

.qr-modal,
.resume-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 12, 22, 0.75);
  align-items: center;
  justify-content: center;
}

.qr-modal.open,
.resume-modal.open {
  display: flex;
}

.qr-box,
.resume-box {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
}

.qr-box img {
  max-width: 300px;
  max-height: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.qr-box p {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.resume-box {
  width: min(380px, calc(100vw - 32px));
  padding: 32px 24px 20px;
  font-size: 12px;
  text-align: left;
}

.resume-box h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
}

.resume-section + .resume-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.resume-section h4 {
  margin: 0 0 9px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.resume-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  font-weight: 400;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.resume-option:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.resume-option.is-unavailable {
  border-style: dashed;
  color: #526581;
  cursor: default;
  opacity: 1;
  background: rgba(248, 250, 252, 0.7);
}

.resume-option.is-unavailable:hover {
  border-color: var(--border);
  background: transparent;
}

.resume-option span {
  color: var(--text);
  font-size: 12px;
}

.resume-option span:first-child {
  font-size: 13px;
  font-weight: 400;
}

.resume-option span:last-child {
  color: #526581;
  font-weight: 400;
}

.qr-box .viewer-close,
.resume-box .viewer-close {
  background: #eef2f8;
  color: #334155;
}

/* ================= Toast ================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(21, 36, 67, 0.92);
  color: #ffffff;
  font-size: 13px;
  padding: 10px 24px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================= 页脚 ================= */

.site-footer {
  border-top: 1px solid rgba(226, 234, 244, 0.8);
  padding: 20px 0;
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}

.site-footer .postscript-link {
  font-size: inherit;
  color: var(--faint);
  margin-left: 12px;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.site-footer .postscript-link:hover {
  color: var(--accent);
}

.postscript-body {
  max-width: 760px;
  font-size: 16px;
  color: #26344d;
  line-height: 2;
}

.postscript-body p {
  margin-bottom: 28px;
}

.postscript-sign {
  margin-top: 26px;
  font-size: 13px;
  color: var(--faint);
}

.detail-fab {
  position: fixed;
  right: max(24px, calc((100vw - 1080px) / 2 + 24px));
  bottom: 26px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.detail-fab.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(30, 58, 138, 0.16);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, color 0.2s, box-shadow 0.2s;
}

.back-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-top:hover {
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(30, 58, 138, 0.22);
}

.fab-btn {
  min-width: 46px;
  max-width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(30, 58, 138, 0.16);
  transition: color 0.2s, transform 0.2s, box-shadow 0.2s, max-width 0.25s, padding 0.25s, border-radius 0.25s;
}

.fab-btn:hover,
.fab-btn:focus-visible {
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(30, 58, 138, 0.22);
  max-width: 150px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
}

.fab-label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  opacity: 0;
  margin-left: 0;
  transition: max-width 0.25s, opacity 0.2s, margin-left 0.25s;
}

.fab-btn:hover .fab-label,
.fab-btn:focus-visible .fab-label {
  max-width: 120px;
  opacity: 1;
  margin-left: 8px;
}

/* ================= 响应式 ================= */

@media (max-width: 900px) {
  body::before,
  body::after {
    filter: blur(56px);
    animation-duration: 24s;
  }

  .polaroid-stack {
    --fan-offset: 18px;
    --fan-drop: 10px;
  }

  .polaroid-stack:hover {
    --fan-offset: 38px;
  }

  .hero-inner {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  body[data-page="index"] .hero-inner {
    padding-right: 24px;
    padding-left: 24px;
  }

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

  body[data-page="index"] .hero-media {
    transform: none;
  }

  .hero-content {
    width: min(calc(100% - 32px), 420px);
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    text-align: left;
  }

  .hero-link-list a {
    min-height: 38px;
  }

  .hero-identity {
    justify-content: flex-start;
  }

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

  .about-toc,
  .about-toc.visible,
  .detail-toc {
    display: none;
  }

  .viewer {
    padding: 0;
    background: rgba(8, 12, 22, 0.94);
  }

  .viewer-panel {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    border-radius: 0;
    background: transparent;
  }

  .viewer-main {
    flex: 1;
    padding: 0;
  }

  .viewer-stage img {
    max-height: calc(100dvh - 170px);
  }

  .viewer-image-title {
    top: 12px;
    left: 12px;
    max-width: calc(100% - 84px);
    font-size: 12px;
  }

  .viewer-zone,
  .viewer-arrow {
    display: none;
  }

  .viewer-count {
    display: block;
    padding-top: 6px;
    font-size: 12px;
  }

  .viewer-thumbs-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    margin: 0 10px 14px;
  }

  .viewer-thumbs-wrap .viewer-close {
    position: fixed;
    top: 14px;
    right: 14px;
    bottom: auto;
    width: 46px;
    height: 46px;
    font-size: 24px;
    margin: 0;
    background: rgba(255, 255, 255, 0.16);
  }

  .viewer-thumbs {
    flex: none;
    width: auto;
    height: 72px;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
    background: rgba(12, 16, 28, 0.55);
  }

  .viewer-thumbs::-webkit-scrollbar {
    width: auto;
    height: 4px;
  }

  .thumb {
    flex: 0 0 58px;
    width: 58px;
  }

  .detail-hero {
    height: 56vh;
    min-height: 300px;
  }

  .detail-hero-spacer {
    height: 56vh;
    min-height: 300px;
  }

  .detail-hero.pinned {
    height: 90px;
    min-height: 90px;
  }

  .detail-hero.pinned .detail-title {
    font-size: 15px;
    line-height: 1.25;
    max-width: 94%;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .detail-compact-title {
    max-width: calc(100vw - 48px);
    font-size: 15px;
    line-height: 1.25;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .detail-hero.pinned .detail-meta {
    display: block;
    font-size: 11.5px;
  }

  .scroll-fab {
    bottom: 14px;
    padding: 10px 20px;
  }

  .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .copy-btn {
    width: 44px;
    height: 44px;
  }

  .qr-btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    overflow: visible;
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .constellation-sky {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 24px 12px 10px;
    border-radius: 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(190, 209, 255, 0.34) transparent;
  }

  .constellation-track {
    min-width: 920px;
    min-height: 210px;
    padding: 0 14px;
  }

  .constellation-year {
    min-width: 132px;
  }

  .constellation-detail {
    min-width: 0;
    margin-top: 48px;
    padding: 19px 20px;
  }

  .constellation-detail h2 {
    font-size: 19px;
  }

  .journey-map {
    min-width: 920px;
    min-height: 270px;
  }

  .journey-detail {
    min-width: 0;
    margin-top: 28px;
    padding: 19px 20px;
  }

  .journey-detail h2 {
    font-size: 19px;
  }

  .proj-heading-rest {
    font-size: 20px;
  }

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

  .nav-menus {
    gap: 8px;
  }

  .nav-link {
    padding: 8px 4px;
    font-size: 12.5px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .nav-link::after {
    left: 4px;
    right: 4px;
  }

  .nav-brand {
    font-size: 15px;
  }

  .dropdown {
    min-width: 200px;
  }

  .works-sec {
    padding: 20px;
    gap: 14px;
  }

  .works-sec-title {
    font-size: 20px;
  }

  .contact-item {
    flex-wrap: wrap;
    padding: 18px;
  }

  .qr-btn {
    order: 3;
  }

  .detail-fab {
    right: 14px;
    bottom: 18px;
    gap: 8px;
  }

  .fab-btn {
    min-width: 42px;
    max-width: 42px;
    height: 42px;
  }

  .back-top {
    right: 14px;
    bottom: 18px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 760px) {
  .featured-gallery {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-bottom: 24px;
    padding: 24px 0 92px;
    width: 100%;
  }

  .featured-media,
  .featured-image {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .featured-copy {
    height: auto;
    padding: 28px 22px 34px;
  }

  .featured-type {
    margin-bottom: 9px;
    font-size: 12px;
  }

  .featured-title {
    font-size: 23px;
  }

  .featured-summary {
    margin-top: 8px;
    font-size: 14px;
  }

  .featured-meta {
    margin-top: 12px;
  }

  .featured-enter {
    margin-top: 18px;
  }

  .featured-arrow {
    width: 42px;
    height: 42px;
  }

  .featured-prev {
    left: 12px;
  }

  .featured-next {
    right: 12px;
  }

  .featured-footer {
    bottom: 20px;
  }

  .detail-overview-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px;
  }

  .detail-overview-card p {
    font-size: 15px;
  }

  .detail-overview-card-combined {
    gap: 0;
  }

  .detail-overview-heading,
  .detail-overview-heading + .detail-overview-heading {
    padding: 0;
  }

  .detail-overview-heading + .detail-overview-heading {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(38, 70, 123, 0.12);
    border-left: 0;
  }

  .detail-overview-card-combined .detail-overview-heading p {
    font-size: 21px;
  }

  .detail-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
  }

  .detail-gallery-thumbs button {
    flex: 0 0 104px;
  }

  .detail-project-pager {
    gap: 14px;
  }

  .timeline-heading {
    padding-top: 14px;
  }

  .timeline-page .page-head {
    margin-top: 10px;
  }

  .timeline-page .page-title {
    font-size: 30px;
  }

  .timeline-intro {
    max-width: 290px;
    font-size: 15px;
  }

  .timeline {
    padding: 4px 0 0;
  }

  .cosmos-field {
    height: clamp(500px, calc(100dvh - 210px), 620px);
    min-height: 500px;
  }

  .cosmos-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(146, 174, 230, 0.3) transparent;
    overscroll-behavior-x: contain;
  }

  .cosmos-map {
    width: 920px;
    height: 100%;
    min-height: 0;
    margin: 0;
  }

  .cosmos-node-label {
    display: none;
  }

  .cosmos-detail,
  .cosmos-detail.is-left,
  .cosmos-detail.is-upper {
    position: absolute;
    top: auto;
    right: 16px;
    bottom: 18px;
    left: 16px;
    width: auto;
    padding: 20px 54px 21px 21px;
  }

  .cosmos-detail h2 {
    font-size: 18px;
  }

  .cosmos-detail p {
    font-size: 14px;
  }

  .cosmos-detail-close {
    top: 10px;
    right: 10px;
  }
}

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