/* ===== Reset & Tokens ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root{
  --space-bg:#0A1128;
  --space-bg-2:#101B3A;
  --surface:#1A2440;
  --neon-green:#00FFA3;
  --neon-cyan:#00E5FF;
  --metal-silver:#AEB6C2;
  --near-white:#F4F7FB;
  --muted-blue:#AFC0D0;
  --amber:#FFC857;
  --soft-green:#7CF29C;
  --header-h:80px;
  --container-w:1280px;
  --font-body:"PingFang SC","Noto Sans SC","Microsoft YaHei","Hiragino Sans GB","Source Han Sans SC",sans-serif;
  --font-heading:"PingFang SC","Noto Sans SC","Microsoft YaHei","Source Han Sans SC",sans-serif;
  --font-mono:ui-monospace,"SF Mono","Roboto Mono","JetBrains Mono","Cascadia Code",Consolas,monospace;
}

html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}

body{
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.7;
  color:var(--near-white);
  background:
    linear-gradient(rgba(0,229,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,.028) 1px, transparent 1px),
    var(--space-bg);
  background-size:48px 48px;
  padding-top:var(--header-h);
  -webkit-font-smoothing:antialiased;
}

img{max-width:100%;display:block}
ul{list-style:none}
a{color:inherit}
button{font:inherit;background:none;border:none;cursor:pointer}

/* ===== Accessibility ===== */
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

:focus-visible{
  outline:2px solid var(--neon-green);
  outline-offset:3px;
  border-radius:2px;
}

.skip-link{
  position:fixed;
  top:8px;
  left:8px;
  z-index:3000;
  background:var(--neon-green);
  color:var(--space-bg);
  padding:10px 16px;
  border-radius:999px;
  font-weight:700;
  font-size:14px;
  transform:translateY(-160%);
  transition:transform .2s ease;
}
.skip-link:focus{
  transform:translateY(0);
}

/* ===== Layout / Container ===== */
.container{
  max-width:var(--container-w);
  margin:0 auto;
  padding:0 32px;
}

.divider{
  height:1px;
  border:0;
  background:linear-gradient(90deg, transparent, rgba(0,229,255,.3), transparent);
  margin:40px 0;
}

/* ===== Buttons ===== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 24px;
  border-radius:999px;
  font-size:15px;
  font-weight:600;
  line-height:1.2;
  border:1px solid transparent;
  cursor:pointer;
  text-decoration:none;
  transition:background .2s ease,border-color .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease;
}
.btn-primary{
  background:var(--neon-green);
  color:var(--space-bg);
}
.btn-primary:hover{
  background:var(--soft-green);
  transform:translateY(-1px);
  box-shadow:0 8px 24px rgba(0,255,163,.25);
}
.btn-ghost{
  border-color:rgba(0,229,255,.4);
  color:var(--near-white);
  background:rgba(0,229,255,.05);
}
.btn-ghost:hover{
  border-color:var(--neon-cyan);
  background:rgba(0,229,255,.12);
  transform:translateY(-1px);
}

/* ===== Breadcrumb ===== */
.breadcrumb{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:28px;
  font-size:14px;
  color:var(--muted-blue);
}
.breadcrumb li::after{
  content:"/";
  margin-left:8px;
  color:rgba(0,229,255,.45);
  font-family:var(--font-mono);
}
.breadcrumb li:last-child::after{content:""}
.breadcrumb a{
  color:var(--metal-silver);
  text-decoration:none;
  transition:color .2s ease;
}
.breadcrumb a:hover{color:var(--neon-green)}
.breadcrumb .current{
  color:var(--neon-green);
  font-weight:600;
}

/* ===== Header ===== */
.site-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:1000;
  background:rgba(10,17,40,.16);
  transition:background .3s ease,box-shadow .3s ease;
}
.site-header.scrolled{
  background:rgba(10,17,40,.92);
  box-shadow:0 12px 32px rgba(0,0,0,.28);
}

.header-inner{
  max-width:1440px;
  margin:0 auto;
  height:var(--header-h);
  display:flex;
  align-items:center;
  gap:24px;
  padding:0 32px;
}

/* Brand */
.site-brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  color:var(--near-white);
  text-decoration:none;
  flex-shrink:0;
}
.brand-mark{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg, var(--neon-green), #00c97d);
  clip-path:polygon(18% 0, 100% 0, 82% 100%, 0 100%);
  color:var(--space-bg);
  font-weight:900;
  font-size:20px;
  line-height:1;
  font-family:var(--font-heading);
}
.brand-mark-text{transform:skewX(-10deg)}
.brand-lockup{
  display:flex;
  flex-direction:column;
  line-height:1.2;
}
.brand-title{
  font-size:20px;
  font-weight:900;
  letter-spacing:.02em;
  font-family:var(--font-heading);
}
.brand-subtitle{
  font-size:12px;
  color:var(--metal-silver);
  letter-spacing:.08em;
  font-weight:500;
}

/* Main nav */
.main-nav{
  display:flex;
  justify-content:center;
  flex:1;
  min-width:0;
}
.nav-list{
  display:flex;
  align-items:center;
  gap:2px;
}
.nav-link{
  position:relative;
  display:inline-block;
  padding:10px 13px;
  border-radius:999px;
  color:var(--near-white);
  font-size:15px;
  font-weight:500;
  text-decoration:none;
  white-space:nowrap;
  transition:color .2s ease,background .2s ease;
}
.nav-link:hover{
  color:var(--neon-green);
  background:rgba(0,255,163,.1);
}
.nav-link[aria-current="page"]{
  color:var(--neon-green);
}
.nav-link[aria-current="page"]::after{
  content:"";
  position:absolute;
  left:13px;
  right:13px;
  bottom:2px;
  height:2px;
  background:var(--neon-green);
  border-radius:2px;
  box-shadow:0 0 8px rgba(0,255,163,.5);
}

/* Header tools */
.header-tools{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
.tool-btn{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:500;
  color:var(--near-white);
  background:rgba(10,17,40,.3);
  border:1px solid rgba(0,255,163,.3);
  transition:border-color .2s ease,background .2s ease,color .2s ease;
}
.tool-btn:hover{
  border-color:var(--neon-green);
  background:rgba(0,255,163,.12);
}
.tool-btn.is-faved{
  background:rgba(124,242,156,.14);
  border-color:var(--soft-green);
  color:var(--soft-green);
}
.tool-btn.is-faved .tool-icon{
  color:var(--amber);
  text-shadow:0 0 8px rgba(255,200,87,.5);
}
.tool-icon{
  font-size:15px;
  line-height:1;
  transition:color .2s ease;
}
.tool-text{
  font-size:13px;
}

/* Nav toggle (hamburger) */
.nav-toggle{
  display:none;
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(10,17,40,.4);
  position:relative;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  transition:border-color .2s ease;
}
.nav-toggle:hover{border-color:var(--neon-green)}
.toggle-line{
  display:block;
  width:20px;
  height:2px;
  background:var(--near-white);
  border-radius:2px;
  transition:transform .3s ease,opacity .3s ease;
}
.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(1){transform:translateY(7px) rotate(45deg)}
.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(2){opacity:0}
.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.nav-toggle.is-active .toggle-line:nth-child(1){transform:translateY(7px) rotate(45deg)}
.nav-toggle.is-active .toggle-line:nth-child(2){opacity:0}
.nav-toggle.is-active .toggle-line:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* Scroll progress */
.header-progress{
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  height:2px;
  background:linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
  transform:scaleX(0);
  transform-origin:left center;
  opacity:0;
  transition:opacity .3s ease;
}
.site-header.scrolled .header-progress{
  opacity:1;
}

/* ===== Page Hero ===== */
.page-hero{
  min-height:100vh;
  display:flex;
  align-items:center;
  margin-top:calc(var(--header-h) * -1);
  padding:calc(var(--header-h) + 40px) 0 64px;
  position:relative;
  overflow:hidden;
}
.page-hero-inner{
  width:100%;
  max-width:var(--container-w);
  margin:0 auto;
  padding:0 32px;
}

.page-header{
  margin-top:calc(var(--header-h) * -1);
  padding:calc(var(--header-h) + 40px) 0 20px;
  background:var(--space-bg);
  border-bottom:1px solid rgba(0,229,255,.15);
}
.page-title{
  font-size:40px;
  font-weight:900;
  letter-spacing:-.02em;
  line-height:1.2;
  font-family:var(--font-heading);
}
.page-intro{
  margin-top:12px;
  color:var(--muted-blue);
  max-width:720px;
  font-size:16px;
}

/* ===== Section ===== */
.section{
  padding:80px 0;
}
.section-head{
  max-width:720px;
  margin-bottom:48px;
}
.kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 14px;
  border-radius:999px;
  background:rgba(0,255,163,.1);
  border:1px solid rgba(0,255,163,.3);
  color:var(--neon-green);
  font-size:13px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-family:var(--font-mono);
}
.section-title{
  font-size:34px;
  line-height:1.2;
  margin-top:16px;
  font-weight:900;
  letter-spacing:-.01em;
  font-family:var(--font-heading);
}
.section-desc{
  margin-top:12px;
  color:var(--muted-blue);
  font-size:16px;
  line-height:1.7;
}

/* ===== Grid ===== */
.grid{
  display:grid;
  gap:24px;
}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}

/* ===== Card ===== */
.card{
  background:var(--space-bg-2);
  border:1px solid rgba(174,182,194,.14);
  border-radius:20px;
  padding:28px;
  transition:background .25s ease,border-color .25s ease,transform .25s ease,box-shadow .25s ease;
}
.card:hover{
  background:var(--surface);
  border-color:rgba(0,255,163,.3);
  transform:translateY(-2px);
  box-shadow:0 12px 32px rgba(0,0,0,.25);
}

/* ===== Panel / Metric ===== */
.panel{
  background:linear-gradient(135deg, var(--space-bg-2), var(--surface));
  border:1px solid rgba(0,229,255,.15);
  border-radius:20px;
  padding:28px;
}
.metric-list{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}
.metric{
  background:var(--space-bg-2);
  border-radius:16px;
  padding:18px 20px;
  border-left:3px solid var(--neon-green);
  min-width:140px;
}
.metric-value{
  font-family:var(--font-mono);
  font-size:24px;
  color:var(--neon-green);
  font-weight:700;
  line-height:1.2;
}
.metric-label{
  font-size:13px;
  color:var(--muted-blue);
  margin-top:4px;
}

/* ===== Tags ===== */
.tag-group{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.tag{
  padding:8px 16px;
  border-radius:999px;
  background:var(--space-bg-2);
  border:1px solid rgba(174,182,194,.2);
  color:var(--muted-blue);
  font-size:14px;
  cursor:pointer;
  transition:background .2s ease,color .2s ease,border-color .2s ease;
}
.tag:hover,
.tag[data-active="true"]{
  background:rgba(0,255,163,.12);
  color:var(--neon-green);
  border-color:rgba(0,255,163,.4);
}

/* ===== Timeline ===== */
.timeline{
  position:relative;
  padding-left:28px;
  border-left:1px solid rgba(0,229,255,.25);
  display:flex;
  flex-direction:column;
  gap:28px;
}
.timeline-item{
  position:relative;
}
.timeline-item::before{
  content:"";
  position:absolute;
  left:-33px;
  top:6px;
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--neon-green);
  box-shadow:0 0 12px rgba(0,255,163,.6);
}
.timeline-item.is-past::before{
  background:var(--surface);
  border:2px solid var(--neon-cyan);
  box-shadow:none;
}
.timeline-time{
  font-family:var(--font-mono);
  font-size:13px;
  color:var(--neon-cyan);
  margin-bottom:4px;
}
.timeline-content{
  font-size:15px;
  color:var(--muted-blue);
  line-height:1.6;
}

/* ===== Footer ===== */
.site-footer{
  position:relative;
  z-index:10;
  background:#060B1A;
  border-top:1px solid transparent;
  overflow:hidden;
}
.site-footer::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:1px;
  background:linear-gradient(90deg, transparent, var(--neon-green), var(--neon-cyan), transparent);
  opacity:.8;
}
.site-footer::after{
  content:"";
  position:absolute;
  right:0;
  bottom:0;
  width:360px;
  height:220px;
  background:
    radial-gradient(circle, rgba(0,255,163,.12) 0, transparent 60%),
    linear-gradient(90deg, transparent 94%, rgba(0,229,255,.3) 94%),
    linear-gradient(180deg, transparent 94%, rgba(0,229,255,.3) 94%);
  background-size:auto, 24px 24px, 24px 24px;
  clip-path:polygon(100% 0, 100% 100%, 0 100%);
  opacity:.35;
  pointer-events:none;
}

.footer-inner{
  max-width:var(--container-w);
  margin:0 auto;
  padding:72px 32px 48px;
  display:grid;
  grid-template-columns:1.2fr 2fr;
  gap:56px;
  position:relative;
  z-index:1;
}
.footer-brand-wrap{
  display:flex;
  flex-direction:column;
  gap:20px;
}
.footer-statement{
  font-size:14px;
  line-height:1.8;
  color:var(--muted-blue);
  max-width:440px;
}

.footer-cols{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:36px;
}
.footer-group{
  min-width:0;
}
.footer-title{
  font-size:13px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--metal-silver);
  margin-bottom:16px;
  padding-bottom:8px;
  border-bottom:1px solid rgba(0,229,255,.18);
  display:inline-block;
  font-family:var(--font-mono);
}
.footer-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.footer-list a{
  color:var(--near-white);
  text-decoration:none;
  font-size:15px;
  transition:color .2s ease,padding-left .2s ease;
}
.footer-list a:hover{
  color:var(--neon-green);
  padding-left:4px;
}

.footer-contact{
  grid-column:span 2;
}
.footer-contact-list{
  list-style:none;
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:8px 20px;
  font-size:14px;
  color:var(--muted-blue);
  line-height:1.6;
}

.footer-bottom{
  border-top:1px solid rgba(174,182,194,.12);
  padding:20px 0;
  position:relative;
  z-index:1;
}
.footer-bottom-inner{
  max-width:var(--container-w);
  margin:0 auto;
  padding:0 32px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:12px 24px;
  color:var(--muted-blue);
  font-size:13px;
  font-family:var(--font-mono);
}
.footer-copy{
  color:var(--metal-silver);
}
.footer-icp{
  color:var(--muted-blue);
  letter-spacing:.04em;
}

/* ===== Toast ===== */
.toast-region{
  position:fixed;
  bottom:24px;
  left:50%;
  z-index:2000;
  transform:translateX(-50%) translateY(16px);
  background:var(--space-bg);
  border:1px solid var(--neon-green);
  box-shadow:0 8px 32px rgba(0,0,0,.4);
  border-radius:999px;
  padding:12px 20px;
  color:var(--near-white);
  font-size:14px;
  line-height:1.5;
  max-width:min(560px, calc(100vw - 32px));
  text-align:center;
  opacity:0;
  visibility:hidden;
  transition:opacity .3s ease,transform .3s ease,visibility .3s ease;
}
.toast-region.is-visible{
  opacity:1;
  visibility:visible;
  transform:translateX(-50%) translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px){
  .main-nav{
    display:block;
    position:absolute;
    inset:100% 0 auto;
    background:var(--space-bg);
    border-bottom:1px solid rgba(0,229,255,.2);
    padding:16px 20px 24px;
    box-shadow:0 24px 48px rgba(0,0,0,.35);
    opacity:0;
    visibility:hidden;
    transform:translateY(-8px);
    transition:opacity .25s ease,transform .25s ease,visibility .25s ease;
  }
  .main-nav[data-open]{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
  }
  .nav-list{
    flex-direction:column;
    gap:4px;
    align-items:stretch;
  }
  .nav-link{
    display:block;
    width:100%;
    padding:14px 18px;
    border-radius:12px;
    font-size:17px;
    border-bottom:1px solid rgba(174,182,194,.08);
  }
  .nav-link[aria-current="page"]{
    background:rgba(0,255,163,.1);
  }
  .nav-link[aria-current="page"]::after{
    display:none;
  }
  .nav-toggle{
    display:inline-flex;
  }
  .header-inner{
    justify-content:space-between;
  }
  .header-tools{
    margin-left:auto;
  }
}

@media (max-width: 900px){
  .footer-inner{
    grid-template-columns:1fr;
    gap:40px;
  }
  .footer-cols{
    grid-template-columns:repeat(2,1fr);
  }
  .footer-contact{
    grid-column:span 2;
  }
}

@media (max-width: 600px){
  :root{
    --header-h:64px;
  }
  .header-inner{
    padding:0 16px;
    gap:12px;
  }
  .container,
  .page-hero-inner,
  .footer-bottom-inner{
    padding-left:16px;
    padding-right:16px;
  }
  .brand-subtitle{
    display:none;
  }
  .brand-title{
    font-size:17px;
  }
  .brand-mark{
    width:36px;
    height:36px;
    font-size:17px;
  }
  .tool-btn{
    width:40px;
    height:40px;
    padding:0;
    justify-content:center;
  }
  .tool-text{
    display:none;
  }
  .nav-toggle{
    width:40px;
    height:40px;
  }
  .page-title{
    font-size:30px;
  }
  .section{
    padding:56px 0;
  }
  .section-title{
    font-size:26px;
  }
  .grid-2,
  .grid-3,
  .grid-4{
    grid-template-columns:1fr;
  }
  .footer-inner{
    padding:48px 16px 32px;
  }
  .footer-cols{
    grid-template-columns:1fr;
  }
  .footer-contact{
    grid-column:span 1;
  }
  .footer-contact-list{
    grid-template-columns:1fr;
  }
  .footer-bottom-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }
  .page-hero{
    padding-top:calc(var(--header-h) + 24px);
  }
  .page-header{
    padding-top:calc(var(--header-h) + 24px);
  }
}

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