:root {
  --bg: #f4efe7;
  --paper: #fffdfa;
  --ink: #111827;
  --muted: #5c6777;
  --line: #d8ccbc;
  --panel: #fbf7f1;
  --hero: #183430;
  --hero-2: #a04b29;
  --accent: #c26834;
  --accent-soft: #f7e7d9;
  --shadow: 0 18px 48px rgba(43, 32, 21, 0.14);
  --sidebar-width: 272px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(211, 158, 100, 0.18), transparent 24%),
    linear-gradient(180deg, #f8f4ed 0%, #ede4d7 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.workspace {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  max-width: 1660px;
  margin: 0 auto;
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 24px;
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  background: rgba(255, 253, 250, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 18px;
  border-radius: 20px;
}

.brand {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.brand-kicker {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--hero-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand h1 {
  margin: 12px 0 8px;
  font-size: 28px;
  line-height: 1.1;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.actions {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.action-btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(35, 24, 15, 0.14);
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--hero) 0%, var(--hero-2) 100%);
  color: #fff;
}

.action-btn.secondary {
  background: #f7f1e8;
  color: #5c5144;
  border: 1px solid var(--line);
}

.toc-title,
.project-title,
.tips-title {
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.toc,
.project-list {
  display: grid;
  gap: 8px;
}

.toc a,
.project-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(250, 246, 240, 0.72);
  color: #31404b;
  font-size: 14px;
  line-height: 1.45;
}

.toc a:hover,
.project-list a:hover,
.toc a.is-active {
  border-color: var(--line);
  background: #fff;
}

.tips {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.content {
  flex: 1;
  min-width: 0;
}

.page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  padding: 4mm;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8mm;
  background: linear-gradient(90deg, var(--hero) 0%, var(--hero-2) 56%, #d59a4b 100%);
}

.print-page {
  break-inside: avoid-page;
  page-break-inside: avoid;
}

.page-break {
  display: none;
}

.avoid-break,
.hero,
.meta-card,
.summary-band,
.summary-item,
.section,
.product-grid,
.demo-band,
.feature-grid,
.diagram-grid,
.panel,
.diagram-panel,
.feature-card,
.screenshot-card,
.gif-card,
.kpi-grid,
.kpi-card,
.shot-frame,
.placeholder-box,
.callout,
svg {
  break-inside: avoid;
  page-break-inside: avoid;
}

.eyebrow {
  display: inline-block;
  margin-top: 7mm;
  padding: 2mm 4mm;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--hero-2);
  font-size: 10pt;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero {
  margin-top: 0mm;
  padding-bottom: 8mm;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.5fr 1.2fr;
  gap: 8mm;
  align-items: center;
}

.page-title {
  margin: 0mm 0 3mm;
  font-size: 29pt;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.subtitle {
  max-width: 122mm;
  color: var(--muted);
  font-size: 12.2pt;
  line-height: 1.62;
}

.meta-card,
.panel,
.diagram-panel,
.feature-card,
.screenshot-card,
.kpi-card,
.gif-card,
.cover-panel {
  border: 1px solid var(--line);
  background: var(--panel);
}

.meta-card,
.panel,
.diagram-panel {
  padding: 2mm;
}

.meta-card h3,
.panel h3,
.diagram-panel h3,
.cover-panel h3,
.section-title {
  margin: 0 0 2mm;
  font-size: 12.5pt;
  letter-spacing: 0.03em;
}

.meta-card ul,
.bullet-list {
  margin: 0;
  padding-left: 5mm;
}

.meta-card li,
.bullet-list li {
  margin: 2mm 0;
  line-height: 1.55;
}

.summary-band {
  margin-top: 8mm;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4mm;
}

.summary-item {
  padding: 4mm;
  background: #f7f0e5;
  border-left: 4px solid var(--accent);
}

.summary-item strong {
  display: block;
  margin-bottom: 2mm;
  font-size: 11.5pt;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 10.2pt;
  line-height: 1.55;
}

.cover-grid {
  margin-top: 7mm;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 6mm;
}

.cover-panel {
  padding: 5mm;
  background: linear-gradient(180deg, #fdf8f1 0%, #faf4ea 100%);
}

.cover-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 10.1pt;
  line-height: 1.65;
}

.value-list {
  display: grid;
  gap: 3mm;
  margin-top: 4mm;
}

.value-item {
  padding: 3.2mm 3.6mm;
  border-left: 4px solid var(--accent);
  background: rgba(255,255,255,0.66);
}

.value-item strong {
  display: block;
  margin-bottom: 1mm;
  font-size: 10.8pt;
}

.value-item span {
  display: block;
  color: var(--muted);
  font-size: 9.7pt;
  line-height: 1.55;
}

.quick-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3mm;
  margin-top: 4mm;
}

.fact-card {
  padding: 3.4mm;
  border-radius: 3mm;
  border: 1px solid rgba(112, 93, 71, 0.16);
  background: rgba(255,255,255,0.78);
}

.fact-card strong {
  display: block;
  margin-bottom: 1mm;
  font-size: 10.8pt;
}

.fact-card span {
  color: var(--muted);
  font-size: 9.6pt;
  line-height: 1.5;
}

.section {
  margin-top: 4mm;
}

.section-note {
  margin: -1mm 0 4mm;
  color: var(--muted);
  font-size: 10.3pt;
  line-height: 1.55;
}

.product-grid,
.demo-band,
.diagram-grid {
  display: grid;
  gap: 6mm;
}

.product-grid {
  grid-template-columns: 1.35fr 0.65fr;
}

.demo-band,
.diagram-grid {
  grid-template-columns: 1fr 1fr;
}

.screenshot-card,
.gif-card {
  padding: 4mm;
  background: #fcfaf5;
}

.shot-label {
  margin-bottom: 3mm;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10pt;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.media-image {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 3mm;
  border-radius: 3mm;
  border: 1px solid rgba(112, 93, 71, 0.18);
  object-fit: cover;
  background: #f4ede2;
}

.media-caption {
  margin-top: 3mm;
  color: var(--muted);
  font-size: 9.6pt;
  line-height: 1.55;
}

.shot-frame {
  border: 1px solid #cfbea8;
  background: #f1e7d9;
  border-radius: 4mm;
  overflow: hidden;
}

.shot-frame.dark {
  background: #102422;
  border-color: #234542;
}

.frame-bar {
  height: 8mm;
  padding: 0 3mm;
  display: flex;
  align-items: center;
  gap: 2mm;
  background: linear-gradient(90deg, #ead9c3 0%, #f6eddf 100%);
  border-bottom: 1px solid #d8c6b0;
}

.shot-frame.dark .frame-bar {
  background: linear-gradient(90deg, #17302d 0%, #254846 100%);
  border-bottom-color: #315856;
}

.dot {
  width: 2.4mm;
  height: 2.4mm;
  border-radius: 50%;
  background: #d9a655;
}

.shot-content {
  padding: 4mm;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3mm;
  margin-bottom: 3mm;
}

.dash-metric {
  padding: 3mm;
  border-radius: 3mm;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(111, 95, 72, 0.18);
}

.dash-metric strong {
  display: block;
  margin-top: 1.5mm;
  font-size: 12pt;
}

.dash-metric span {
  font-size: 9.5pt;
  color: var(--muted);
}

.status-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3mm;
  margin-bottom: 3mm;
}

.status-box {
  min-height: 22mm;
  padding: 3mm;
  border-radius: 3mm;
  color: #fff;
}

.status-box.green { background: linear-gradient(135deg, #1c604d, #2c8663); }
.status-box.orange { background: linear-gradient(135deg, #9d4e28, #cb7640); }

.status-box strong {
  display: block;
  margin-top: 2mm;
  font-size: 12.5pt;
}

.table-block {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 2mm;
}

.table-cell {
  padding: 2.6mm 3mm;
  border-radius: 2.5mm;
  background: rgba(255,255,255,0.66);
  font-size: 9.5pt;
}

.dark-shell {
  color: #eff6f4;
}

.terminal-block {
  min-height: 56mm;
  padding: 4mm;
  border-radius: 3mm;
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(115, 167, 156, 0.2);
}

.terminal-line {
  font-family: Consolas, "Courier New", monospace;
  font-size: 9.6pt;
  line-height: 1.55;
  color: #b7ddd4;
}

.terminal-line strong {
  color: #f4e7b0;
}

.placeholder-box {
  margin-top: 3mm;
  padding: 4mm;
  border: 1px dashed #be8b62;
  border-radius: 3mm;
  background: rgba(255,255,255,0.72);
  color: #7a624f;
  font-size: 10pt;
  line-height: 1.6;
}

.gif-window {
  position: relative;
  min-height: 68mm;
  overflow: hidden;
  border-radius: 4mm;
  border: 1px solid #d4c0a7;
  background:
    linear-gradient(135deg, rgba(19, 50, 47, 0.92), rgba(32, 71, 68, 0.92)),
    radial-gradient(circle at 18% 30%, rgba(255,255,255,0.2), transparent 24%);
}

.pulse {
  position: absolute;
  width: 26mm;
  height: 26mm;
  border-radius: 50%;
  border: 2px solid rgba(245, 221, 150, 0.45);
  animation: pulse 2.6s infinite;
}

.pulse.p1 { top: 12mm; left: 14mm; }
.pulse.p2 { top: 18mm; right: 16mm; animation-delay: .7s; }
.pulse.p3 { left: 50%; bottom: 12mm; transform: translateX(-50%); animation-delay: 1.2s; }

@keyframes pulse {
  0% { transform: scale(0.82); opacity: 0.9; }
  70% { transform: scale(1.18); opacity: 0.18; }
  100% { transform: scale(1.18); opacity: 0; }
}

.gif-copy {
  position: absolute;
  left: 6mm;
  right: 6mm;
  bottom: 6mm;
  color: #f5f8f7;
}

.gif-copy strong {
  display: block;
  margin-bottom: 1.5mm;
  font-size: 13pt;
}

.gif-copy span {
  display: block;
  color: rgba(245,248,247,0.84);
  font-size: 10pt;
  line-height: 1.5;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4mm;
}

.feature-card {
  padding: 4mm;
  background: #fbf6ee;
}

.feature-card strong {
  display: block;
  margin-bottom: 2mm;
  font-size: 11pt;
}

.feature-card span {
  color: var(--muted);
  font-size: 9.8pt;
  line-height: 1.55;
}

svg {
  display: block;
  width: 100%;
  height: auto;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4mm;
  margin-bottom: 4mm;
}

.kpi-card {
  padding: 4mm;
  background: #f8f1e6;
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2mm;
}

.kpi-top strong {
  font-size: 16pt;
}

.kpi-top span,
.kpi-sub {
  color: var(--muted);
  font-size: 9.6pt;
}

.kpi-sub {
  line-height: 1.5;
}

.callout {
  margin-top: 6mm;
  padding: 5mm;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #fbf5eb 0%, #f1e5d6 100%);
  font-size: 10.8pt;
  line-height: 1.7;
}

.footer {
  margin-top: 8mm;
  padding-top: 4mm;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9.5pt;
}

.mono {
  font-family: Consolas, "Courier New", monospace;
}

.portfolio-home {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px 56px;
}

.hero-home {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 252, 247, 0.88);
  box-shadow: var(--shadow);
}

.hero-home h1 {
  margin: 14px 0 10px;
  font-size: 42px;
  line-height: 1.05;
}

.hero-home p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.home-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  margin-top: 24px;
}

.home-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.88);
  box-shadow: var(--shadow);
}

.home-panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.project-card {
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fdf8f1 0%, #faf4ea 100%);
}

.project-card + .project-card {
  margin-top: 14px;
}

.project-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.project-card p,
.home-panel li {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.aggregate-stack {
  margin-top: 24px;
  display: grid;
  gap: 24px;
}

.aggregate-section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.9);
  box-shadow: var(--shadow);
}

.aggregate-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 14px;
}

.aggregate-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.aggregate-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.aggregate-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.aggregate-button {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f7f1e8;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
}

.iframe-shell {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.project-embed {
  width: 100%;
  height: 1280px;
  border: 0;
  background: #fff;
}

.home-panel ul {
  margin: 0;
  padding-left: 20px;
}

@media screen and (max-width: 1400px) {
  .workspace {
    flex-direction: column;
  }

  .sidebar {
    position: relative;
    top: 0;
    width: 100%;
  }
}

@media screen and (max-width: 960px) {
  .workspace,
  .portfolio-home {
    padding: 12px;
  }

  .page {
    width: 100%;
    min-height: auto;
    padding: 22px;
  }

  .hero,
  .product-grid,
  .demo-band,
  .diagram-grid,
  .feature-grid,
  .summary-band,
  .kpi-grid,
  .cover-grid,
  .home-grid,
  .quick-facts {
    grid-template-columns: 1fr;
  }

  .dashboard-layout,
  .status-strip,
  .table-block {
    grid-template-columns: 1fr;
  }

  .hero-home h1 {
    font-size: 32px;
  }

  .aggregate-head {
    flex-direction: column;
  }

  .project-embed {
    height: 960px;
  }
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: #fff;
  }

  .workspace {
    display: block;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .sidebar {
    display: none !important;
  }

  .content {
    width: auto;
  }

  .page {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 13mm 14mm 11mm;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }

  .page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .page-break {
    display: none !important;
  }

  .eyebrow {
    margin-top: 4mm;
    background: var(--accent-soft) !important;
    color: var(--hero-2) !important;
  }

  .page {
    background: var(--paper) !important;
  }

  .page::before {
    background: linear-gradient(90deg, var(--hero) 0%, var(--hero-2) 56%, #d59a4b 100%) !important;
  }

  .summary-item {
    background: #f7f0e5 !important;
    border-left-color: var(--accent) !important;
  }

  .meta-card,
  .panel,
  .diagram-panel,
  .feature-card,
  .screenshot-card,
  .kpi-card,
  .placeholder-box,
  .callout {
    background-color: var(--panel) !important;
  }

  .hero {
    gap: 6mm;
    padding-bottom: 6mm;
  }

  .page-title {
    font-size: 25pt;
    line-height: 1.02;
  }

  .subtitle {
    font-size: 11.2pt;
    line-height: 1.5;
  }

  .summary-band,
  .cover-grid,
  .section {
    margin-top: 6mm;
  }

  .summary-item,
  .cover-panel,
  .meta-card,
  .panel,
  .diagram-panel,
  .feature-card,
  .screenshot-card,
  .gif-card,
  .kpi-card {
    padding-top: 3.2mm;
    padding-bottom: 3.2mm;
  }

  .section-title,
  .cover-panel h3,
  .meta-card h3,
  .panel h3,
  .diagram-panel h3 {
    margin-bottom: 3mm;
  }

  .section-note {
    margin-bottom: 3mm;
  }

  .footer {
    margin-top: 6mm;
  }

  .hero,
  .summary-band,
  .cover-grid,
  .section,
  .product-grid,
  .demo-band,
  .diagram-grid,
  .feature-grid,
  .kpi-grid,
  .footer,
  .shot-frame,
  .diagram-panel,
  .screenshot-card,
  .gif-card,
  .panel,
  .feature-card,
  .kpi-card,
  .placeholder-box,
  svg {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }
}
