/* ========== 浅青灰工程实验室主题变量与基础重置 ========== */
:root {
  --bg-outer: #1b2830;
  --ink-primary: #f2f8f7;
  --ink-secondary: #cddadb;
  --ink-muted: #a6bcbf;
  --hairline: rgba(178, 212, 214, 0.24);
  --copper: #b0dbd3;
  --instrument: #bfe3dc;
  --amber: #efc194;
  --focus: #dcf5f0;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --serif: 'Songti SC', 'STSong', 'Noto Serif SC', Georgia, serif;
  --sans: 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --gutter: clamp(26px, 5vw, 104px);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-thumb { background: rgba(178, 212, 214, 0.30); border-radius: 99px; }
.dialog-tabs::-webkit-scrollbar,
.dialog-scroll::-webkit-scrollbar { display: none; }

html, body {
  width: 100%;
  min-height: 100%;
  background: var(--bg-outer);
  color: var(--ink-primary);
  font-family: var(--sans);
  overflow: auto;
}

button { font: inherit; color: inherit; }
button:focus-visible,
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ========== 主画布容器（浅一号的青灰工程实验室质感） ========== */
.main-card.assembly-gallery {
  isolation: isolate;
  position: relative;
  width: 100%;
  min-height: 660px;
  height: 100svh;
  overflow: hidden;
  user-select: none;
  background:
    radial-gradient(ellipse 36% 15% at 68% 80%, rgba(11, 21, 28, 0.42), transparent),
    radial-gradient(ellipse 36% 58% at 80% 36%, rgba(212, 174, 114, 0.24), transparent 85%),
    radial-gradient(ellipse 62% 64% at 67% 45%, #568a8b 0%, #375763 48%, transparent 90%),
    linear-gradient(125deg, #1d2b33 0%, #273b45 53%, #1d2c35 100%);
}

.main-card.assembly-gallery::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(195, 224, 221, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(195, 224, 221, 0.075) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 64% 34%, #0009 10%, transparent 72%);
}

/* ========== 顶部导航栏 ========== */
.top-bar {
  position: absolute;
  inset: 0 var(--gutter) auto;
  height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(9px, 1.4vw, 22px);
  border-bottom: 1px solid var(--hairline);
  z-index: 60;
  pointer-events: none;
}

.top-bar > * { pointer-events: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--ink-primary);
  min-width: 0;
  text-align: left;
}

.brand-identity {
  display: grid;
  gap: 2px;
  line-height: 1.25;
  white-space: nowrap;
}

.brand-name { font-size: 15px; font-weight: 650; letter-spacing: 0.08em; }

.brand-direction {
  color: var(--ink-secondary);
  font-size: 11px;
}

.resume-shortcuts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.15vw, 20px);
  margin-inline: auto;
}

.resume-shortcuts button,
.intro-profile {
  border: 0;
  background: none;
  color: var(--ink-primary);
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 560;
  padding: 10px 6px;
  transition: color 0.2s ease;
}

.resume-shortcuts button:hover,
.intro-profile:hover { color: var(--instrument); }
.resume-shortcuts button { font-size: 15px; font-weight: 620; }
.resume-shortcuts .resume-download {
  padding: 8px 12px;
  border: 1px solid #b7ddd678;
  border-radius: 6px;
  background: #a1d5c91c;
  color: #def5ef;
  font-size: 14px;
}
.resume-shortcuts .resume-download:hover { background: #a1d5c939; }
.resume-shortcuts span,
.intro-profile span { color: var(--instrument); margin-left: 3px; }

.top-right-controls {
  display: flex;
  align-items: center;
  flex: none;
  gap: 8px;
}

.resume-request-dialog {
  position: fixed;
  inset: 0;
  width: min(435px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  border: 1px solid #9dc4c173;
  border-radius: 14px;
  background: #243940;
  color: var(--ink-primary);
  box-shadow: 0 20px 70px #0711168a;
}
.resume-request-dialog::backdrop { background: #101e23bc; backdrop-filter: blur(5px); }
.resume-request-dialog form { display: grid; gap: 14px; padding: 22px; }
.resume-request-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.resume-request-dialog h2 { font-size: 21px; }
.resume-request-dialog p { color: var(--ink-secondary); font-size: 13px; line-height: 1.6; }
.resume-request-dialog label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.resume-request-dialog input {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #80aca97a;
  border-radius: 6px;
  background: #1b2f37;
  color: var(--ink-primary);
  font: 16px var(--sans);
}
.resume-request-dialog input::placeholder { color: #aac5c8; }
.resume-request-dialog input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.resume-request-status:empty { display: none; }
.resume-submit {
  min-height: 42px;
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  background: var(--instrument);
  color: #172d33;
  font-weight: 700;
  cursor: pointer;
}
.resume-submit:disabled { opacity: 0.65; cursor: wait; }

.top-right-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: rgba(49, 71, 80, 0.56);
  color: var(--ink-primary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.top-right-btn:hover {
  background: rgba(66, 94, 105, 0.85);
  border-color: rgba(176, 219, 211, 0.50);
}

.assembly-replay:disabled { opacity: 0.45; cursor: default; }
.assembly-replay > span:first-child,
.assembly-reset > span:first-child { color: var(--copper); font-size: 14px; line-height: 0.8; }

.motion-icon {
  width: 7px;
  height: 9px;
  border-inline: 1.5px solid var(--copper);
}

.paused .motion-icon {
  border: 0;
  border-left: 6px solid var(--copper);
  border-block: 4px solid transparent;
}

/* ========== 左侧介绍区（通透留白排版） ========== */
.left-intro {
  position: absolute;
  top: 50%;
  left: var(--gutter);
  transform: translateY(-50%);
  width: min(27vw, 355px);
  padding-bottom: 5px;
  z-index: 50;
  pointer-events: auto;
}

.left-intro .tagline {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--copper);
  margin-bottom: 16px;
  white-space: nowrap;
}

.left-intro .tagline::before {
  content: '';
  display: inline-block;
  width: 16px;
  margin: 0 9px 3px 0;
  border-top: 1px solid currentColor;
}

.left-intro h1 {
  font-weight: 600;
  line-height: 1.06;
  margin-bottom: 16px;
}

#uiName {
  display: inline-block;
  margin-left: -0.04em;
  font-family: system-ui, sans-serif;
  font-size: clamp(46px, 4.9vw, 82px);
  font-weight: 690;
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: var(--ink-primary);
  background: linear-gradient(149deg, #fff9ec 12%, #eaf7f0 50%, #b1d1cd 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.left-intro .role-line {
  display: block;
  margin-top: 12px;
  font-family: system-ui, sans-serif;
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 500;
  letter-spacing: 0.025em;
  line-height: 1.35;
  color: var(--ink-primary);
  white-space: nowrap;
  opacity: 0.95;
}

.left-intro .desc {
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-line;
  color: var(--ink-secondary);
  margin-bottom: 22px;
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.left-intro .btn-view {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 43px;
  padding: 10px 18px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(130deg, #f0dfc2, #bde0d7);
  color: #142c30;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 6px 24px #9ccfc12c, inset 0 1px #fff8e6a6;
  transition: transform 0.22s ease, filter 0.22s ease;
}

.left-intro .btn-view:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.left-intro .btn-view .arrow { font-size: 16px; line-height: 1; }
.intro-profile { font-size: 12.5px; }

.featured-work {
  margin-top: clamp(26px, 4.5vh, 46px);
  max-width: 320px;
}

.featured-work h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--ink-primary);
  font-size: 12.5px;
  font-weight: 600;
}

.featured-work h2 span {
  color: var(--ink-muted);
  font: 10px var(--mono);
  letter-spacing: 0.14em;
}

.featured-item {
  display: grid;
  align-items: center;
  grid-template-columns: 20px 1fr 16px;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  text-align: left;
  padding: 8px 4px;
  cursor: pointer;
  border: 0;
  border-top: 1px solid var(--hairline);
  color: var(--ink-primary);
  background: transparent;
  transition: background 0.2s ease;
}

.featured-item:last-child { border-bottom: 1px solid var(--hairline); }
.featured-item:hover { background: rgba(198, 237, 226, 0.12); }
.featured-item strong,
.featured-item small { display: block; font-size: 12.5px; line-height: 1.4; }
.featured-item small { color: var(--ink-muted); font-size: 11px; margin-top: 2px; }
.featured-item > span:first-child { color: var(--ink-muted); font: 10px var(--mono); }
.featured-item > span:last-child { color: var(--instrument); font-size: 14px; }

/* ========== 3D 实验台舞台与轨道入口 ========== */
.assembly-stage {
  position: absolute;
  inset: 0;
  z-index: auto;
  overflow: hidden;
  pointer-events: none;
}

.assembly-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 21;
  background: linear-gradient(90deg, rgba(24, 37, 44, 0.62) 0%, rgba(28, 43, 51, 0.34) 24%, transparent 46%);
  pointer-events: none;
}

#assemblyCanvas {
  position: absolute;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  display: none;
  outline: none;
}

.assembly-live #assemblyCanvas {
  display: block;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
}

.assembly-live #assemblyCanvas:active { cursor: grabbing; }
#assemblyCanvas:focus-visible { outline: 1px dashed #93bdb9; outline-offset: -9px; }

.assembly-progress {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}

.assembly-pins {
  position: absolute;
  inset: 0;
  z-index: 23;
  pointer-events: none;
}

.assembling .assembly-pins { visibility: hidden; }

.assembly-pin {
  --orbit-size: clamp(76px, 6.35vw, 105px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: absolute;
  width: max-content;
  height: var(--orbit-size);
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: none;
  color: var(--ink-primary);
  cursor: pointer;
  pointer-events: auto;
}

.assembly-pin[data-key="about"] { --orbit-size: clamp(92px, 7.8vw, 126px); }
.assembly-pin[data-side="left"] { flex-direction: row-reverse; }

.assembly-pin-slot {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--orbit-size);
  height: var(--orbit-size);
}

.assembly-pin:is(:hover, :focus-visible, .active) { z-index: 2; }
.assembly-pin:focus-visible { outline: 1px solid #d1eee7; outline-offset: 2px; }
.assembly-pin-fallback { display: none; color: #b9dcd2; }
.assembly-pin-fallback svg { display: block; width: 16px; height: 16px; }

.assembly-pin-label {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(168, 212, 210, 0.36);
  border-radius: 5px;
  background: linear-gradient(155deg, rgba(64, 92, 102, 0.90), rgba(38, 57, 66, 0.94) 74%);
  box-shadow: 0 3px 10px rgba(12, 22, 27, 0.32), inset 0 1px rgba(210, 238, 236, 0.14);
  color: var(--ink-primary);
  white-space: nowrap;
  font: 620 12.5px/1.15 system-ui, sans-serif;
  letter-spacing: 0.04em;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.assembly-pin.active .assembly-pin-label {
  border-color: rgba(183, 228, 220, 0.85);
  background: linear-gradient(155deg, rgba(72, 105, 115, 0.95), rgba(44, 67, 77, 0.96) 74%);
  box-shadow: 0 0 14px rgba(146, 214, 196, 0.24), inset 0 1px rgba(226, 248, 244, 0.22);
}

.assembly-pin:is(:hover, :focus-visible) .assembly-pin-label {
  border-color: #bfe8e0;
  background: #486b75;
}

/* WebGL 降级网格模式 */
.assembly-stage:not(.assembly-live) .assembly-pins {
  inset: 19% var(--gutter) 19% auto;
  width: min(48%, 430px);
  align-content: center;
  justify-content: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.assembly-stage:not(.assembly-live) .assembly-pin {
  display: flex;
  justify-content: center;
  gap: 6px;
  position: relative;
  inset: auto !important;
  width: 100%;
  height: auto;
  min-height: 44px;
  padding: 7px 5px;
  transform: none;
  border: 1px solid #a0cbc466;
  border-radius: 6px;
  background: #30454f;
}

.assembly-stage:not(.assembly-live) .assembly-pin-fallback { display: block; }
.assembly-stage:not(.assembly-live) .assembly-pin-slot { width: auto; height: auto; }
.assembly-stage:not(.assembly-live) .assembly-pin-label {
  position: static;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
}

.robot-show {
  position: absolute;
  right: var(--gutter);
  bottom: 66px;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  pointer-events: auto;
}

.robot-show[hidden],
.assembling .robot-show { display: none; }
.robot-show i { color: var(--amber); font-size: 14px; font-style: normal; line-height: 1; }
#robotCanvas { position: absolute; inset: 0; z-index: 22; width: 100%; height: 100%; pointer-events: none; }

/* ========== 底部状态栏与目录抽屉 ========== */
.gallery-footer {
  position: absolute;
  inset: auto var(--gutter) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  height: 52px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-secondary);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  z-index: 30;
}

.gallery-footer > span:first-child { display: flex; align-items: center; gap: 8px; }

.gallery-footer i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #92d6c4;
  box-shadow: 0 0 7px #9de3ce60;
}

.resume-index {
  position: relative;
  display: block;
  z-index: 1;
  letter-spacing: normal;
}

.resume-index summary {
  list-style: none;
  min-height: 35px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  cursor: pointer;
  font: 600 12px system-ui, sans-serif;
  color: var(--ink-primary);
  background: #2f434e;
}

.resume-index summary::-webkit-details-marker { display: none; }
.resume-index summary span { color: var(--instrument); transition: transform 0.2s ease; }
.resume-index[open] summary span { transform: rotate(45deg); }

.resume-index #rightList {
  position: absolute;
  bottom: calc(100% + 7px);
  right: 0;
  display: block;
  width: 192px;
  padding: 5px 10px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  background: #253841;
  box-shadow: 0 12px 30px #091115b3;
}

.right-list .list-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: none;
  display: grid;
  grid-template-columns: 24px 1fr 14px;
  gap: 6px;
  align-items: center;
  text-align: left;
  padding: 10px 2px;
  min-height: 38px;
  font-size: 12px;
  color: var(--ink-secondary);
  cursor: pointer;
}

.right-list .list-item:last-child { border-bottom: 0; }
.item-num { color: var(--ink-muted); font-family: var(--mono); font-size: 9px; }

.right-list .list-item:is(.active, :hover) {
  font-weight: 500;
  color: #f2f8f7;
  background: linear-gradient(90deg, #98d4ca29, transparent);
}

.right-list .list-item:is(.active, :hover) .item-num,
.right-list .list-item:is(.active, :hover) .item-arrow { color: var(--copper); }

/* ========== 浅一号的深青科技风履历详情模态窗 ========== */
.detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 24, 30, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.detail-modal.active { display: flex; }

.detail-dialog {
  width: 92%;
  max-width: 860px;
  max-height: 86dvh;
  color: var(--ink-primary);
  background:
    radial-gradient(ellipse 62% 38% at 86% 0%, rgba(132, 202, 196, 0.16), transparent 72%),
    linear-gradient(155deg, rgba(31, 49, 58, 0.97), rgba(20, 33, 40, 0.99));
  border: 1px solid rgba(178, 212, 214, 0.28);
  border-radius: 18px;
  box-shadow:
    0 32px 90px rgba(6, 14, 19, 0.58),
    inset 0 1px 0 rgba(220, 245, 240, 0.10);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: dialogPop 0.2s cubic-bezier(0.2, 0.85, 0.2, 1);
}

.detail-dialog:has(.portfolio-grid) { max-height: calc(100dvh - 32px); }

@keyframes dialogPop {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(20, 32, 39, 0.45);
}

.dialog-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.dialog-tab {
  padding: 7px 13px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.dialog-tab:hover {
  color: var(--ink-primary);
  background: rgba(168, 216, 213, 0.14);
  border-color: rgba(178, 212, 214, 0.20);
}

.dialog-tab.active {
  background: linear-gradient(130deg, #f0dfc2, #bde0d7);
  color: #142c30;
  font-weight: 650;
}

.dialog-close {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid var(--hairline);
  background: rgba(168, 216, 213, 0.10);
  color: var(--ink-primary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.dialog-close:hover {
  background: rgba(176, 219, 211, 0.24);
  border-color: rgba(176, 219, 211, 0.55);
}

.dialog-scroll {
  padding: 28px 36px 32px;
  overflow-y: auto;
  flex: 1;
  user-select: text;
}

.dialog-scroll * { user-select: text; overflow-wrap: anywhere; }

.detail-dialog:has(.portfolio-grid) .dialog-scroll { padding-top: 24px; padding-bottom: 24px; }
.detail-dialog:has(.portfolio-grid) .dialog-hero { padding-bottom: 18px; margin-bottom: 18px; }

.dialog-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 22px;
}

.dialog-meta-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 8px;
}

.dialog-title {
  font-family: system-ui, sans-serif;
  font-size: 30px;
  font-weight: 680;
  color: var(--ink-primary);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.dialog-subtitle {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.75;
}

.dialog-icon-box {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: rgba(168, 216, 213, 0.10);
  border: 1px solid rgba(178, 212, 214, 0.24);
  box-shadow: inset 0 0 24px rgba(146, 214, 196, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dialog-icon-box svg,
.dialog-icon-box img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.editorial-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editorial-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 18px 20px;
  background: rgba(36, 56, 66, 0.72);
  border: 1px solid rgba(178, 212, 214, 0.18);
  border-radius: 12px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.editorial-row:hover {
  background: rgba(42, 65, 76, 0.86);
  border-color: rgba(178, 212, 214, 0.30);
}

.editorial-row.featured-highlight {
  background: rgba(176, 219, 211, 0.11);
  border: 1px solid rgba(176, 219, 211, 0.36);
  box-shadow: inset 3px 0 0 var(--amber);
}

.editorial-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--copper);
  padding-top: 3px;
}

.editorial-main h4 {
  font-size: 15.5px;
  font-weight: 630;
  color: var(--ink-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editorial-main h4 span.tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--copper);
  background: rgba(168, 216, 213, 0.12);
  border: 1px solid rgba(178, 212, 214, 0.24);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.editorial-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.editorial-meta .meta-sep { opacity: 0.45; }
.editorial-meta .meta-role { color: var(--amber); }

.editorial-main p {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.78;
}

.editorial-bullets {
  list-style: none;
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.editorial-bullets li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.72;
  color: var(--ink-secondary);
}

.editorial-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--copper);
  opacity: 0.85;
}

.editorial-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(178, 212, 214, 0.14);
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stack-chip {
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(178, 212, 214, 0.20);
  background: rgba(168, 216, 213, 0.08);
  color: #c2dcda;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.3;
}

.editorial-foot .entry-actions {
  margin-top: 0;
  margin-left: auto;
}

/* ========== 联系方式操作按钮 ========== */
.entry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.entry-action-btn,
.entry-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 5px;
  border: 1px solid rgba(178, 212, 214, 0.28);
  background: rgba(168, 216, 213, 0.10);
  color: var(--ink-primary);
  font-family: var(--mono);
  font-size: 11.5px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.entry-action-btn:hover,
.entry-action-link:hover {
  background: rgba(168, 216, 213, 0.24);
  border-color: rgba(176, 219, 211, 0.60);
  color: #ffffff;
}

.entry-action-btn.copied {
  border-color: rgba(146, 214, 196, 0.78);
  background: rgba(146, 214, 196, 0.20);
  color: #c2ffef;
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 36px;
  border-top: 1px solid var(--hairline);
  background: rgba(17, 29, 35, 0.72);
}

.nav-step-btn {
  background: none;
  border: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  padding: 4px 2px;
  transition: color 0.18s ease;
}

.nav-step-btn:hover { color: var(--copper); }

/* ========== 作品集：小红书名片、独立网站展示、小工具与预览器 ========== */
.portfolio-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.portfolio-sections > section { scroll-margin-top: 12px; }
.portfolio-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; }
.portfolio-shortcuts button {
  padding: 6px 10px;
  border: 1px solid var(--hairline);
  border-radius: 5px;
  background: #a4d2c817;
  color: var(--ink-primary);
  font-size: 12px;
  cursor: pointer;
}
.portfolio-shortcuts button:is(:hover, :focus-visible) {
  border-color: var(--copper);
  background: #a4d2c835;
}

.portfolio-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.portfolio-section-head h3 {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-primary);
  letter-spacing: 0.03em;
}

.portfolio-section-head span {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
}

.xhs-creator-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(178, 212, 214, 0.26);
  background:
    radial-gradient(ellipse 65% 90% at 95% 15%, rgba(239, 193, 148, 0.10), transparent 70%),
    rgba(36, 56, 66, 0.80);
}

.xhs-qr-box {
  width: 112px;
  height: 112px;
  border-radius: 10px;
  border: 1px dashed rgba(176, 219, 211, 0.45);
  background: rgba(19, 31, 37, 0.72);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6px;
}

.xhs-qr-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.xhs-qr-placeholder {
  display: grid;
  place-items: center;
  gap: 4px;
  text-align: center;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.35;
}

.xhs-qr-placeholder svg {
  width: 44px;
  height: 44px;
  color: var(--copper);
  opacity: 0.88;
}

.xhs-creator-info h4 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 640;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.xhs-id-pill {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--amber);
  background: rgba(239, 193, 148, 0.13);
  border: 1px solid rgba(239, 193, 148, 0.30);
}

.xhs-creator-info p {
  font-size: 13px;
  line-height: 1.72;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}

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

.portfolio-web-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 11px;
  border: 1px solid rgba(178, 212, 214, 0.24);
  background: rgba(36, 56, 66, 0.84);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-web-card:hover {
  transform: translateY(-2px);
  border-color: var(--copper);
  box-shadow: 0 10px 26px rgba(6, 14, 19, 0.42);
}

.portfolio-web-domain {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--copper);
  margin-bottom: 6px;
}

.portfolio-web-card h4 {
  font-size: 15px;
  font-weight: 640;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.portfolio-web-card p {
  font-size: 12.5px;
  line-height: 1.68;
  color: var(--ink-secondary);
}

.portfolio-web-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(178, 212, 214, 0.14);
}

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

.portfolio-cover {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(178, 212, 214, 0.24);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(36, 56, 66, 0.85);
  color: var(--ink-primary);
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-cover img {
  width: 100%;
  height: clamp(121px, 19vh, 185px);
  display: block;
  object-fit: cover;
  background: #142127;
}
.portfolio-cover img.portfolio-portrait {
  object-fit: contain;
  background: linear-gradient(115deg, #303044, #26404a);
}

.portfolio-cover-placeholder {
  width: 100%;
  height: clamp(121px, 19vh, 185px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 46px 16px 16px;
  background:
    radial-gradient(ellipse 75% 75% at 85% 20%, rgba(154, 224, 206, 0.18), transparent 65%),
    linear-gradient(145deg, #213640, #16252c);
  border-bottom: 1px solid rgba(178, 212, 214, 0.16);
}

.portfolio-cover-placeholder small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--amber);
  margin-bottom: 4px;
}

.portfolio-cover-placeholder span {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-primary);
}

.portfolio-cover:is(:hover, :focus-visible) {
  transform: translateY(-2px);
  border-color: var(--copper);
  box-shadow: 0 10px 26px rgba(6, 14, 19, 0.45);
}

.portfolio-cover-copy {
  display: grid;
  gap: 4px;
  padding: 12px 39px 13px 14px;
}

.portfolio-cover-copy strong { font: 650 14.5px/1.4 system-ui, sans-serif; color: var(--ink-primary); }
.portfolio-cover-copy span,
.portfolio-category { color: var(--ink-muted); font: 500 11px/1.4 var(--mono); letter-spacing: 0.06em; }
.portfolio-cover-copy p { font-size: 12px; line-height: 1.55; color: var(--ink-secondary); margin-top: 2px; }

.portfolio-view-symbol {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 1px solid rgba(176, 219, 211, 0.42);
  background: rgba(20, 34, 41, 0.85);
  color: var(--ink-primary);
  font-size: 15px;
}

.portfolio-viewer {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(1030px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid rgba(178, 212, 214, 0.30);
  border-radius: 16px;
  background: linear-gradient(155deg, #21343e, #16242c);
  color: var(--ink-primary);
  box-shadow: 0 26px 80px rgba(4, 10, 15, 0.72);
}

.portfolio-viewer::backdrop {
  background: rgba(12, 21, 26, 0.76);
  backdrop-filter: blur(8px);
}

.portfolio-viewer-inner { display: grid; gap: 12px; padding: 18px; }
.portfolio-viewer-header,
.portfolio-viewer-footer { display: flex; align-items: center; gap: 9px; }
.portfolio-viewer-header { justify-content: space-between; }
.portfolio-viewer-header h2 { margin-top: 4px; font-size: clamp(17px, 3.1vw, 24px); color: var(--ink-primary); }
.portfolio-viewer-header .dialog-close { flex: none; }
.portfolio-figure { margin: 0; min-width: 0; }

.portfolio-media {
  display: grid;
  place-items: center;
  min-height: 90px;
  overflow: hidden;
  border-radius: 9px;
  border: 1px solid rgba(178, 212, 214, 0.18);
  background: #101a20;
}

.portfolio-media :is(img, video) {
  display: block;
  width: 100%;
  max-height: min(65dvh, 735px);
  object-fit: contain;
}

.portfolio-figure figcaption {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-secondary);
  white-space: pre-line;
}

.portfolio-media-nav:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 8px;
  color: var(--ink-secondary);
  font-size: 12px;
}

.portfolio-viewer-footer button, .portfolio-media-nav button {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid rgba(178, 212, 214, 0.26);
  border-radius: 6px;
  background: rgba(168, 216, 213, 0.11);
  color: var(--ink-primary);
  font: 600 12.5px system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.portfolio-viewer-footer button:hover, .portfolio-media-nav button:hover:not(:disabled) {
  background: rgba(168, 216, 213, 0.24);
  border-color: var(--copper);
}

.portfolio-media-nav button { min-height: 32px; padding: 3px 12px; }
.portfolio-media-nav button:disabled { cursor: default; opacity: .45; }

.portfolio-viewer-footer .portfolio-related { margin-left: auto; }

#portfolioCounter {
  min-width: 38px;
  color: var(--ink-muted);
  text-align: center;
  font: 12px var(--mono);
}

/* ========== 响应式适配 ========== */
@media (min-width: 801px) and (max-height: 760px) {
  .top-bar { height: 61px; }
  .left-intro { top: 52%; }
  .left-intro .tagline { margin-bottom: 12px; }
  #uiName { font-size: clamp(44px, 4.8vw, 72px); }
  .featured-work { margin-top: 18px; }
}

@media (min-width: 801px) and (max-width: 1120px) {
  .top-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 51px auto;
    height: auto;
    gap: 0 8px;
  }
  .brand { justify-self: start; }
  .top-right-controls { grid-column: 2; grid-row: 1; }
  .top-right-controls { gap: 5px; }
  .top-right-btn { padding: 7px 9px; }
  .resume-shortcuts { grid-column: 1 / -1; gap: 12px; }
}

@media (max-width: 800px) {
  :root { --gutter: clamp(18px, 5vw, 34px); }

  .main-card.assembly-gallery {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100svh;
  }

  .main-card.assembly-gallery::before {
    mask-image: linear-gradient(transparent 14%, #000a 35%, #000 64%, transparent);
  }

  .top-bar {
    position: relative;
    inset: auto;
    margin-inline: var(--gutter);
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 53px auto;
    gap: 0 8px;
    height: auto;
    order: -1;
  }

  .brand { justify-self: start; gap: 7px; }
  .brand-name { font-size: 13px; }
  .brand-direction { font-size: 10px; }
  .top-right-controls { justify-self: end; gap: 4px; }
  .top-right-btn { padding: 5px 7px; gap: 4px; font-size: 9.5px; }

  .resume-shortcuts {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    width: 100%;
  }

  .resume-shortcuts button { padding: 9px 0 10px; font-size: 14px; }
  .resume-shortcuts .resume-download { padding: 6px 7px; font-size: 13px; }

  .left-intro {
    position: relative;
    inset: auto;
    transform: none;
    display: block;
    order: 0;
    width: auto;
    margin: 24px var(--gutter) 0;
    padding: 0;
  }

  #uiName { font-size: clamp(42px, 8.8vw, 64px); }
  .left-intro .tagline { margin-bottom: 12px; font-size: 10px; }
  .left-intro .role-line { margin-top: 6px; font-size: 19px; }
  .left-intro .desc { margin-bottom: 15px; }
  .featured-work { margin-top: 22px; max-width: none; }
  .featured-item { min-height: 44px; }

  .assembly-stage {
    position: relative;
    inset: auto;
    width: 100%;
    order: 1;
    height: clamp(374px, 103vw, 570px);
    margin: 6px 0 0;
    flex: none;
  }

  .assembly-stage::after { display: none; }
  .assembly-live #assemblyCanvas { touch-action: pan-y pinch-zoom; }
  .assembly-stage:not(.assembly-live) { height: 210px; }
  .assembly-pin { --orbit-size: 60px; gap: 2px; }
  .assembly-pin[data-key="about"] { --orbit-size: 72px; }
  .assembly-pin-label { padding: 4px 6px; font-size: 11px; letter-spacing: 0.01em; }
  .assembly-stage:not(.assembly-live) .assembly-pins { inset: 14px var(--gutter); width: auto; }
  .robot-show { bottom: 5px; min-height: 34px; }

  .gallery-footer {
    position: relative;
    inset: auto;
    margin-inline: var(--gutter);
    order: 2;
  }

  .dialog-topbar { padding: 12px 16px; gap: 8px; }
  .dialog-scroll { padding: 20px 18px; }
  .dialog-hero { gap: 12px; }
  .dialog-icon-box { width: 54px; height: 54px; }
  .dialog-icon-box svg,
  .dialog-icon-box img { width: 42px; height: 42px; }
  .editorial-row { grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 14px; }
  .editorial-main h4 { flex-wrap: wrap; gap: 6px; }
  .editorial-foot .entry-actions { margin-left: 0; }
  .dialog-footer { padding: 12px 18px; }
}

@media (max-width: 640px) {
  .xhs-creator-card { grid-template-columns: 1fr; }
  .xhs-qr-box { width: 104px; height: 104px; }
  .portfolio-web-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .resume-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px 4px;
    padding-bottom: 6px;
  }
  .resume-shortcuts button { min-width: 0; font-size: 13px; }
  .assembly-reset > span:last-child,
  .assembly-replay > span:last-child { display: none; }
  .assembly-reset,
  .assembly-replay { min-width: 28px; min-height: 28px; justify-content: center; padding: 5px 7px; }
  .portfolio-grid { gap: 9px; }
  .portfolio-cover img,
  .portfolio-cover-placeholder { height: auto; aspect-ratio: 16 / 10; }
  .portfolio-cover-copy { padding: 9px; }
  .portfolio-cover-copy strong { font-size: 12px; }
  .portfolio-view-symbol { width: 24px; height: 24px; top: 6px; right: 6px; font-size: 13px; }
  .portfolio-viewer-inner { padding: 12px; }
}

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