:root {
  color-scheme: dark;
  --bg: #06101d;
  --bg-deep: #030811;
  --panel: rgba(7, 18, 32, .72);
  --panel-solid: #0a1828;
  --line: rgba(146, 187, 222, .18);
  --text: #f4f8fb;
  --muted: #9fb0bf;
  --cyan: #5be7c4;
  --blue: #6ba7ff;
  --amber: #f3bf72;
  --danger: #ff7b76;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg-deep); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: radial-gradient(circle at 70% 10%, rgba(39, 103, 151, .14), transparent 34%), var(--bg-deep);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 100;
  padding: .7rem 1rem; background: white; color: black; border-radius: .4rem;
}
.skip-link:focus { top: 1rem; }

#semiconductor-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0;
  pointer-events: none;
}
.ambient-grid {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .3;
  background-image: linear-gradient(rgba(107,167,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(107,167,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.site-header {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 20;
  width: min(calc(100% - 2rem), var(--max)); height: 86px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: .8rem; }
.brand-mark {
  width: 42px; height: 42px; border: 1px solid rgba(91,231,196,.55); border-radius: 50%;
  display: grid; place-items: center; box-shadow: inset 0 0 18px rgba(91,231,196,.16);
}
.brand-mark::before, .brand-mark::after, .brand-mark span::before, .brand-mark span::after {
  content: ""; position: absolute; background: var(--cyan); opacity: .8;
}
.brand-mark { position: relative; }
.brand-mark::before { width: 26px; height: 1px; }
.brand-mark::after { width: 1px; height: 26px; }
.brand-mark span::before { width: 20px; height: 1px; top: 13px; left: 10px; }
.brand-mark span::after { width: 20px; height: 1px; bottom: 13px; left: 10px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { font-size: 1rem; letter-spacing: .16em; }
.brand-copy small { color: var(--muted); font-size: .66rem; letter-spacing: .05em; }
.site-header nav { display: flex; gap: 1.8rem; color: #c9d5df; font-size: .88rem; }
.site-header nav a { position: relative; }
.site-header nav a::after { content: ""; position: absolute; left: 0; bottom: -.5rem; width: 100%; height: 1px; transform: scaleX(0); background: var(--cyan); transition: transform .25s ease; }
.site-header nav a:hover::after, .site-header nav a:focus-visible::after { transform: scaleX(1); }

main, footer { position: relative; z-index: 2; }
.hero {
  min-height: 100svh; width: min(calc(100% - 2rem), var(--max)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, .95fr) minmax(320px, .55fr); align-items: center; gap: 4rem;
  padding: 118px 0 68px;
}
.hero-copy { max-width: 700px; }
.eyebrow { margin: 0 0 1rem; color: var(--cyan); font-size: .72rem; font-weight: 700; letter-spacing: .22em; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; font-size: clamp(3.2rem, 7.4vw, 7rem); line-height: .98; letter-spacing: -.055em; font-weight: 760; }
h1 span { color: transparent; -webkit-text-stroke: 1px rgba(244,248,251,.72); }
.lead { max-width: 650px; margin: 1.8rem 0 0; color: #bdcad4; font-size: clamp(1rem, 1.4vw, 1.16rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
  padding: .7rem 1.25rem; border: 1px solid var(--line); border-radius: .35rem;
  font-size: .9rem; font-weight: 700; letter-spacing: .04em; transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover, .button:focus-visible { transform: translateY(-2px); border-color: rgba(91,231,196,.75); }
.button.primary { color: #04130f; background: var(--cyan); border-color: var(--cyan); }
.button.secondary { background: rgba(8,22,37,.62); backdrop-filter: blur(12px); }
.hero-metrics { display: flex; gap: 2.2rem; margin-top: 3.2rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.hero-metrics div { display: flex; flex-direction: column; }
.hero-metrics strong { font-size: 1.15rem; color: #eaf7f3; }
.hero-metrics span { color: var(--muted); font-size: .72rem; }

.process-console {
  align-self: end; margin-bottom: 6vh; padding: 1.35rem; min-height: 310px;
  background: linear-gradient(145deg, rgba(9,25,42,.84), rgba(4,12,23,.72));
  border: 1px solid rgba(119,167,208,.24); border-radius: .6rem; backdrop-filter: blur(22px);
  box-shadow: 0 25px 80px rgba(0,0,0,.24);
}
.console-heading { display: grid; grid-template-columns: auto 1fr auto; gap: .65rem; align-items: center; color: var(--muted); font-size: .68rem; letter-spacing: .14em; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: blink 1.8s infinite; }
.stage-kicker { margin: 2.7rem 0 .2rem; color: var(--blue); font-size: .7rem; font-weight: 700; letter-spacing: .18em; }
.process-console h2 { margin: 0; font-size: 2.2rem; letter-spacing: -.03em; }
.process-console > p:not(.stage-kicker) { min-height: 82px; color: #adbdc9; font-size: .9rem; }
.progress-track { height: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.progress-track span { display: block; width: 0%; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.pause-button { margin-top: 1rem; padding: 0; border: 0; background: transparent; color: #9eb0bf; font-size: .76rem; cursor: pointer; }
.pause-button:hover, .pause-button:focus-visible { color: var(--cyan); }
.scroll-hint { position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: .7rem; color: #718392; font-size: .62rem; letter-spacing: .16em; }
.scroll-hint span { width: 36px; height: 1px; background: #718392; position: relative; overflow: hidden; }
.scroll-hint span::after { content: ""; position: absolute; inset: 0; background: var(--cyan); animation: scan 2s infinite; }

.process-section, .mission-section, .participate-section {
  width: min(calc(100% - 2rem), var(--max)); margin: 0 auto 8rem;
  border-top: 1px solid var(--line); padding-top: 5.5rem;
}
.section-heading { max-width: 760px; margin-bottom: 3.2rem; }
.section-heading h2, .participate-section h2 { margin: 0; font-size: clamp(2.2rem, 4.5vw, 4.4rem); line-height: 1.08; letter-spacing: -.045em; }
.section-heading > p:last-child { color: var(--muted); }
.process-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 3rem; }
.process-list { border-top: 1px solid var(--line); }
.process-card {
  width: 100%; min-height: 90px; display: grid; grid-template-columns: 54px 1fr 30px; align-items: center; gap: 1rem;
  padding: 0 1rem; text-align: left; cursor: pointer; background: rgba(5,15,27,.42); border: 0; border-bottom: 1px solid var(--line);
  transition: background .25s ease, padding .25s ease;
}
.process-card:hover, .process-card:focus-visible, .process-card.active { background: rgba(13,39,61,.76); padding-left: 1.4rem; }
.process-card > span { color: var(--cyan); font-family: ui-monospace, monospace; font-size: .75rem; }
.process-card div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.process-card strong { font-size: 1.05rem; }
.process-card small { color: var(--muted); }
.process-card i { width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 50%; position: relative; }
.process-card i::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--cyan); transform: scale(0); transition: transform .2s ease; }
.process-card.active i::after { transform: scale(1); }
.process-detail { align-self: start; position: sticky; top: 118px; padding: 2rem; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(18px); }
.detail-label { color: var(--blue); font-size: .66rem; letter-spacing: .17em; }
.process-detail h3 { margin: 1rem 0; font-size: 1.8rem; line-height: 1.25; }
.process-detail > p { color: var(--muted); }
.process-detail dl { margin: 2rem 0 0; }
.process-detail dl div { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.process-detail dt { color: #718696; font-size: .78rem; }
.process-detail dd { margin: 0; font-size: .84rem; }

.section-heading.compact { margin-bottom: 2rem; }
.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.mission-grid article { min-height: 290px; padding: 1.8rem; background: linear-gradient(145deg, rgba(10,29,47,.78), rgba(5,13,23,.7)); border: 1px solid var(--line); }
.mission-grid article > span { color: var(--cyan); font-family: ui-monospace, monospace; font-size: .72rem; }
.mission-grid h3 { margin: 4rem 0 .8rem; font-size: 1.45rem; }
.mission-grid p { color: var(--muted); font-size: .9rem; }

.participate-section { display: grid; grid-template-columns: 1.2fr .8fr auto; gap: 3rem; align-items: end; padding-bottom: 5.5rem; border-bottom: 1px solid var(--line); }
.participate-section h2 { font-size: clamp(2rem, 4vw, 3.7rem); }
.participate-section > p { color: var(--muted); margin: 0; }
footer { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; padding: 0 0 3rem; display: flex; justify-content: space-between; gap: 2rem; color: #728593; font-size: .75rem; }
footer div { display: flex; flex-direction: column; }
footer strong { color: #dbe6ed; letter-spacing: .15em; }
.noscript { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 50; padding: 1rem; background: #3a1e1e; border: 1px solid #ff9d99; }

@keyframes blink { 50% { opacity: .3; } }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

@media (max-width: 900px) {
  .site-header nav { display: none; }
  .hero { grid-template-columns: 1fr; align-content: center; gap: 2rem; }
  .hero-copy { padding-top: 4rem; }
  .process-console { width: min(100%, 460px); margin: 0 0 2rem auto; min-height: auto; }
  .scroll-hint { display: none; }
  .process-layout, .participate-section { grid-template-columns: 1fr; }
  .process-detail { position: relative; top: auto; }
  .mission-grid { grid-template-columns: 1fr; }
  .mission-grid article { min-height: auto; }
  .mission-grid h3 { margin-top: 2rem; }
}

@media (max-width: 600px) {
  .site-header { height: 72px; }
  .brand-copy small { display: none; }
  .hero { width: min(calc(100% - 1.2rem), var(--max)); padding-top: 92px; }
  h1 { font-size: clamp(2.8rem, 15vw, 4.2rem); }
  .hero-metrics { gap: 1rem; justify-content: space-between; }
  .process-section, .mission-section, .participate-section { width: min(calc(100% - 1.2rem), var(--max)); }
  .process-card { grid-template-columns: 38px 1fr 24px; padding-inline: .4rem; }
  .process-card div { flex-direction: column; align-items: flex-start; gap: .1rem; }
  footer { width: min(calc(100% - 1.2rem), var(--max)); flex-direction: column; }
}

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