:root {
  color-scheme: dark;
  --ink: #f4f7ff;
  --text: #e7ecf7;
  --muted: #94a3b8;
  --paper: #000000;
  --soft: #101b2d;
  --line: rgba(148, 163, 184, 0.25);
  --blue: #75b3ff;
  --teal: #56f0d8;
  --gold: #ffd36b;
  --rose: #ff7ea8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(217, 226, 239, 0.82);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 15px 24px;
}

.brand {
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
}

.nav-links a:hover {
  background: var(--soft);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  max-width: 1160px;
  min-height: calc(100vh - 70px);
  margin: 0 auto;
  padding: 72px 24px 84px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(30px, 4.5vw, 48px);
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.25;
}

.lead {
  max-width: 660px;
  color: var(--muted);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 800;
}

.button.primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.button.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.hero-visual {
  position: relative;
  min-height: 470px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 22% 18%, rgba(244, 185, 66, 0.28), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(15, 159, 143, 0.2), transparent 30%),
    linear-gradient(145deg, #f8fbff, #eef5ff);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 999px;
  opacity: 0.82;
}

.orb-one {
  width: 220px;
  height: 220px;
  left: 34px;
  bottom: 36px;
  background: rgba(37, 99, 235, 0.16);
}

.orb-two {
  width: 170px;
  height: 170px;
  right: 42px;
  top: 58px;
  background: rgba(228, 90, 122, 0.16);
}

.code-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(78%, 390px);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(20, 33, 61, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 20px 50px rgba(20, 33, 61, 0.12);
  overflow: hidden;
}

.dot-row {
  display: flex;
  gap: 7px;
  padding: 16px 18px 0;
}

.dot-row i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
}

.dot-row i:nth-child(1) {
  background: var(--rose);
}

.dot-row i:nth-child(2) {
  background: var(--gold);
}

.dot-row i:nth-child(3) {
  background: var(--teal);
}

pre {
  margin: 0;
  padding: 22px 18px 24px;
  overflow-x: auto;
  color: var(--ink);
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.7;
}

.mini-card {
  position: absolute;
  padding: 12px 15px;
  border: 1px solid rgba(20, 33, 61, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(20, 33, 61, 0.1);
}

.mini-card.top {
  top: 40px;
  left: 38px;
}

.mini-card.bottom {
  right: 38px;
  bottom: 42px;
}

.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 82px 24px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.concept-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.concept-card,
.resource-card,
.view-panel,
.file-list,
.steps-list {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: 0 12px 36px rgba(20, 33, 61, 0.06);
}

.concept-card,
.resource-card {
  min-height: 310px;
  padding: 26px;
}

.concept-card span {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--blue);
  font-weight: 900;
}

.concept-card p,
.resource-card p,
.view-panel p,
.timeline-item p,
.upload-grid li,
.split-section > div > p {
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  align-items: stretch;
}

.view-tabs,
.timeline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.tab,
.filter {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  cursor: pointer;
}

.tab.active,
.filter.active {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.view-panel {
  padding: 32px;
  background: var(--soft);
}

.view-panel ul {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}

.timeline-section {
  max-width: none;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.timeline-section > * {
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
}

.timeline-list {
  display: grid;
  gap: 16px;
  margin-top: 30px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.timeline-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(20, 33, 61, 0.08);
}

.timeline-item.hidden {
  display: none;
}

.timeline-item time {
  color: var(--teal);
  font-size: 26px;
  font-weight: 900;
}

.resources-section {
  padding-bottom: 44px;
}

.resource-card {
  min-height: 240px;
}

.resource-card:nth-child(1) {
  border-top: 6px solid var(--blue);
}

.resource-card:nth-child(2) {
  border-top: 6px solid var(--teal);
}

.resource-card:nth-child(3) {
  border-top: 6px solid var(--gold);
}

.upload-guide {
  padding-top: 44px;
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) 1.3fr;
  gap: 18px;
}

.file-list,
.steps-list {
  padding: 26px;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--ink);
  font-family: Consolas, "Courier New", monospace;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px max(24px, calc((100vw - 1160px) / 2 + 24px));
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer a {
  color: var(--blue);
  font-weight: 900;
}

body {
  background: var(--paper);
  color: var(--text);
}

.site-header {
  background: rgba(7, 17, 31, 0.88);
  border-bottom-color: rgba(148, 163, 184, 0.22);
}

.nav-links a:hover {
  background: var(--soft);
  color: var(--text);
}

.button.secondary {
  border-color: var(--line);
  background: var(--soft);
  color: var(--text);
}

.hero-visual {
  border-color: var(--line);
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 211, 107, 0.16), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(86, 240, 216, 0.14), transparent 30%),
    linear-gradient(145deg, #0f172a, #111b2e);
}

.code-card {
  border-color: var(--line);
  background: rgba(8, 15, 28, 0.9);
}

.mini-card {
  border-color: var(--line);
  background: rgba(16, 27, 45, 0.95);
  color: var(--text);
}

.concept-card,
.resource-card,
.view-panel,
.file-list,
.steps-list,
.timeline-item,
.tab,
.filter {
  border-color: var(--line);
  background: var(--soft);
  color: var(--text);
}

.concept-card p,
.resource-card p,
.view-panel p,
.timeline-item p,
.upload-grid li,
.split-section > div > p {
  color: var(--muted);
}

.timeline-section {
  background: linear-gradient(180deg, #0b1425 0%, #081120 100%);
}

code {
  background: rgba(16, 27, 45, 0.9);
  color: var(--text);
}

.footer {
  border-top-color: var(--line);
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero,
  .split-section,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 390px;
  }

  .concept-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .concept-card,
  .resource-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero,
  .section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mini-card {
    position: static;
    display: inline-flex;
    margin: 14px 0 0 18px;
  }

  .code-card {
    width: calc(100% - 36px);
  }
}
