:root {
  --ink: #10120f;
  --paper: #f4f1e7;
  --paper-2: #e9e5d8;
  --acid: #c9ff3d;
  --orange: #ff623e;
  --blue: #6377ff;
  --muted: #6e7168;
  --line: rgba(16, 18, 15, .18);
  --white: #fffdf7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; background: var(--acid); border: 2px solid var(--ink); font-weight: 800; }
.skip-link:focus { top: 1rem; }

.topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 72px; padding: 0 4vw; background: rgba(244, 241, 231, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.logo { display: inline-flex; align-items: center; gap: .65rem; width: max-content; font-family: Consolas, monospace; font-weight: 900; letter-spacing: -.04em; }
.logo-bug { display: grid; place-items: center; min-width: 44px; height: 30px; padding: 0 .45rem; background: var(--ink); color: var(--acid); border-radius: 4px; font-size: .8rem; letter-spacing: .08em; }
.topbar nav { display: flex; gap: 2rem; font-size: .88rem; font-weight: 700; }
.topbar nav a { padding: .55rem 0; border-bottom: 2px solid transparent; }
.topbar nav a:hover, .topbar nav a:focus-visible { border-color: var(--ink); }
.top-cta { justify-self: end; padding: .7rem 1rem; background: var(--acid); border: 1px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-size: .82rem; font-weight: 800; }

.hero { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 7vw; min-height: 680px; padding: 8rem 6vw 7rem; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-grid { position: absolute; inset: 0; opacity: .23; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(to bottom, black, transparent 92%); }
.hero-copy, .hero-console { position: relative; z-index: 1; }
.terminal-line { display: flex; gap: .55rem; width: max-content; margin: 0 0 2.2rem; padding: .45rem .65rem; background: var(--ink); color: #bfc5b7; font-family: Consolas, monospace; font-size: .78rem; }
.terminal-line span { color: var(--acid); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 820px; margin-bottom: 1.8rem; font-size: clamp(3.4rem, 7vw, 7.3rem); line-height: .92; letter-spacing: -.075em; }
h1 em, .closing h2 em { color: var(--orange); font-style: normal; }
.hero-lede { max-width: 690px; margin-bottom: 2.2rem; color: #44483f; font-size: 1.08rem; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.4rem; min-height: 50px; padding: .85rem 1.05rem; border: 1px solid var(--ink); font-weight: 850; transition: transform .15s, box-shadow .15s; }
.button:hover, .button:focus-visible { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.button-primary { background: var(--acid); }
.button-ghost { background: var(--white); }
.button-dark { background: var(--ink); color: var(--white); border-color: var(--ink); }
.button-dark:hover, .button-dark:focus-visible { box-shadow: 5px 5px 0 var(--acid); }

.hero-console { align-self: center; background: var(--ink); color: var(--white); border: 1px solid var(--ink); box-shadow: 18px 18px 0 var(--orange); transform: rotate(1.4deg); }
.console-head { display: flex; align-items: center; gap: .45rem; padding: .8rem 1rem; border-bottom: 1px solid #3b3e38; }
.console-head span { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.console-head span:nth-child(2) { background: #ffd43a; }
.console-head span:nth-child(3) { background: var(--acid); }
.console-head b { margin-left: auto; color: #969c90; font: 400 .72rem Consolas, monospace; }
.console-body { min-height: 260px; padding: 1.7rem; font: .91rem/1.9 Consolas, monospace; }
.console-body p { margin-bottom: .42rem; }
.prompt { color: var(--blue); }
.ok { color: var(--acid); }
.blink { color: var(--orange); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.console-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #3b3e38; }
.console-metrics div { display: grid; gap: .2rem; padding: 1rem; text-align: center; border-right: 1px solid #3b3e38; }
.console-metrics div:last-child { border: 0; }
.console-metrics strong { color: var(--acid); font: 800 1.8rem Consolas, monospace; }
.console-metrics span { color: #8f9588; font: .58rem Consolas, monospace; letter-spacing: .12em; }

.principle { display: flex; align-items: center; justify-content: center; gap: 2.2rem; padding: 1.25rem 3vw; background: var(--ink); color: var(--white); font-family: Consolas, monospace; font-size: .85rem; letter-spacing: .08em; overflow: hidden; white-space: nowrap; }
.principle i { color: var(--acid); font-style: normal; }
.section { padding: 7rem 6vw; }
.section-head { display: grid; grid-template-columns: 1fr minmax(260px, 430px); gap: 4rem; align-items: end; margin-bottom: 3.2rem; }
.section-head h2, .featured h2, .closing h2 { margin-bottom: 0; font-size: clamp(2.5rem, 5vw, 5.4rem); line-height: .98; letter-spacing: -.065em; }
.section-head > p { margin-bottom: .2rem; color: var(--muted); line-height: 1.8; }
.section-label { margin-bottom: 1rem; color: var(--muted); font: 800 .74rem Consolas, monospace; letter-spacing: .13em; }

.roadmap { background: var(--paper-2); }
.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.module-card { display: grid; grid-template-columns: 70px 1fr; gap: 1.3rem; min-height: 300px; padding: 2rem; background: var(--paper); border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.module-card.module-wide { grid-column: 1 / -1; grid-template-columns: 120px 1fr; min-height: 260px; background: var(--ink); color: var(--white); }
.module-code { color: var(--orange); font: 800 1rem Consolas, monospace; }
.module-card > div > p { color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.module-wide > div > p { color: #aeb3a9; }
.module-card h3 { max-width: 620px; margin-bottom: 1.6rem; font-size: clamp(1.7rem, 2.7vw, 3.1rem); line-height: 1.1; letter-spacing: -.045em; }
.module-card ul { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.module-wide ul { color: #c2c7bc; }
.module-card li::before { content: "↳"; margin-right: .55rem; color: var(--orange); }
.module-accent { background: var(--acid); }
.module-accent .module-code, .module-accent li::before { color: var(--ink); }
.module-accent > div > p, .module-accent ul { color: #3f4930; }

.featured { display: grid; grid-template-columns: 1fr 1fr; min-height: 760px; background: var(--acid); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.featured-copy { padding: 7rem 6vw; }
.featured-tag { display: inline-block; margin: .3rem 0 1.5rem; padding: .45rem .65rem; background: var(--ink); color: var(--acid); font: 700 .7rem Consolas, monospace; }
.featured h2 { max-width: 680px; margin-bottom: 2rem; }
.featured-copy > p:not(.section-label) { max-width: 670px; color: #394028; font-size: 1.02rem; line-height: 1.85; }
.featured-points { display: flex; flex-wrap: wrap; gap: .55rem; margin: 2rem 0; }
.featured-points span { padding: .5rem .7rem; background: rgba(255,255,255,.45); border: 1px solid var(--ink); font-size: .78rem; font-weight: 800; }
.featured-visual { position: relative; min-height: 650px; overflow: hidden; background: var(--blue); border-left: 1px solid var(--ink); }
.orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; transform: translate(-50%, -50%); }
.orbit-one { width: 68%; aspect-ratio: 1; }
.orbit-two { width: 42%; aspect-ratio: 1; }
.visual-center { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 180px; aspect-ratio: 1; background: var(--ink); color: var(--white); border-radius: 50%; transform: translate(-50%, -50%); }
.visual-center strong { color: var(--acid); font: 900 1.35rem Consolas, monospace; }
.visual-center span { font: .65rem Consolas, monospace; letter-spacing: .12em; }
.visual-center small { color: #a9ada5; font: .55rem Consolas, monospace; }
.city { position: absolute; display: grid; gap: .15rem; width: 105px; padding: .7rem; background: var(--white); border: 1px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.city b { font: 900 1rem Consolas, monospace; }
.city span { font: 700 .59rem Consolas, monospace; letter-spacing: .09em; }
.city-1 { left: 9%; top: 12%; transform: rotate(-6deg); }.city-2 { right: 12%; top: 9%; transform: rotate(4deg); }.city-3 { right: 5%; top: 38%; transform: rotate(-3deg); }.city-4 { right: 11%; bottom: 11%; transform: rotate(6deg); }.city-5 { left: 43%; bottom: 5%; transform: rotate(-4deg); }.city-6 { left: 8%; bottom: 14%; transform: rotate(4deg); }.city-7 { left: 4%; top: 41%; transform: rotate(-2deg); }.city-8 { left: 42%; top: 7%; transform: rotate(3deg); }

.workflow { background: var(--paper); }
.loop-list { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); list-style: none; }
.loop-list li { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; min-height: 190px; padding: 1.6rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.loop-list > li > span { color: var(--orange); font: 800 .85rem Consolas, monospace; }
.loop-list h3 { margin-bottom: .7rem; font-size: 1.25rem; }
.loop-list p { color: var(--muted); line-height: 1.65; }

.library { padding: 7rem 6vw; background: var(--ink); color: var(--white); }
.library .section-label, .library-head > p { color: #9fa59a; }
.library-controls { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 1rem; align-items: center; margin-bottom: 1.4rem; }
.search-box { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .65rem; min-height: 52px; padding: 0 .9rem; background: #1e211d; border: 1px solid #4b5048; }
.search-box span { color: var(--acid); font-size: 1.4rem; }
.search-box input { width: 100%; background: transparent; color: var(--white); border: 0; outline: 0; }
.search-box input::placeholder { color: #7f857a; }
.search-box button { background: none; color: var(--acid); border: 0; cursor: pointer; font-size: .75rem; }
.filters { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }
.filters button { padding: .58rem .78rem; background: transparent; color: #bfc5ba; border: 1px solid #4b5048; cursor: pointer; font-size: .75rem; }
.filters button:hover, .filters button:focus-visible, .filters button.active { background: var(--acid); color: var(--ink); border-color: var(--acid); }
.result-bar { display: flex; justify-content: space-between; padding: 1rem 0; color: #8e9489; border-top: 1px solid #343832; font: .72rem Consolas, monospace; }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #4b5048; border-left: 1px solid #4b5048; }
.resource-card { display: flex; flex-direction: column; min-height: 290px; padding: 1.6rem; border-right: 1px solid #4b5048; border-bottom: 1px solid #4b5048; transition: background .15s, color .15s; }
.resource-card:hover, .resource-card:focus-visible { background: var(--acid); color: var(--ink); outline: none; }
.resource-meta { display: flex; justify-content: space-between; color: #8e9489; font: .68rem Consolas, monospace; }
.resource-card:hover .resource-meta, .resource-card:focus-visible .resource-meta { color: #465135; }
.resource-card h3 { margin: 2.2rem 0 .8rem; font-size: 1.35rem; line-height: 1.25; }
.resource-card p { color: #aab0a5; line-height: 1.65; font-size: .86rem; }
.resource-card:hover p, .resource-card:focus-visible p { color: #37402a; }
.resource-link { display: flex; justify-content: space-between; margin-top: auto; padding-top: 1rem; border-top: 1px solid #4b5048; font-size: .74rem; font-weight: 800; }
.resource-card:hover .resource-link, .resource-card:focus-visible .resource-link { border-color: var(--ink); }
.empty-state { grid-column: 1 / -1; padding: 4rem 1.5rem; text-align: center; color: #aab0a5; }

.closing { display: grid; place-items: center; padding: 8rem 6vw; text-align: center; background: var(--orange); }
.closing .section-label { color: #5f2113; }
.closing h2 { max-width: 900px; margin-bottom: 1.5rem; }
.closing h2 em { color: var(--white); }
.closing > p:not(.section-label) { max-width: 660px; margin-bottom: 2rem; line-height: 1.8; }
footer { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; padding: 3rem 6vw; background: var(--paper); border-top: 1px solid var(--ink); }
footer > div p, footer > p { margin: .8rem 0 0; color: var(--muted); font-size: .75rem; line-height: 1.6; }
footer > p { justify-self: end; max-width: 500px; text-align: right; }

@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 6rem; }
  .hero-console { max-width: 620px; }
  .section-head { grid-template-columns: 1fr; gap: 1rem; }
  .featured { grid-template-columns: 1fr; }
  .featured-visual { border-left: 0; border-top: 1px solid var(--ink); }
  .loop-list, .resource-grid { grid-template-columns: repeat(2, 1fr); }
  .library-controls { grid-template-columns: 1fr; }
  .filters { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .topbar { min-height: 62px; padding: 0 1rem; }
  .top-cta { display: none; }
  .hero { min-height: auto; padding: 5rem 1.2rem 4.5rem; }
  h1 { font-size: clamp(3rem, 16vw, 4.8rem); }
  .hero-console { box-shadow: 8px 8px 0 var(--orange); }
  .console-body { min-height: 220px; padding: 1.1rem; font-size: .76rem; }
  .principle { justify-content: flex-start; gap: 1rem; overflow-x: auto; }
  .section, .library { padding: 5rem 1.2rem; }
  .module-grid, .loop-list, .resource-grid { grid-template-columns: 1fr; }
  .module-card, .module-card.module-wide { grid-column: auto; grid-template-columns: 46px 1fr; padding: 1.35rem; }
  .featured-copy { padding: 5rem 1.2rem; }
  .featured-visual { min-height: 560px; }
  .city { width: 86px; padding: .52rem; }
  .city-8 { top: 16%; left: 38%; }
  .result-bar span:last-child { display: none; }
  .closing { padding: 6rem 1.2rem; }
  footer { grid-template-columns: 1fr; padding: 2.5rem 1.2rem; }
  footer > p { justify-self: start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
