:root {
  color-scheme: dark;
  --background: #080b19;
  --ink: #f3f2ff;
  --muted: #b4b8d2;
  --line: #303551;
  --cyan: #a4f1ff;
  --gold: #f8d68c;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--background);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, ul { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.frame { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }

.site-header, .site-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.site-header { min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.05rem; font-weight: 750; }
.brand-mark { width: 31px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #49496b; border-radius: 9px; background: #1a1c38; }
.brand-mark::before { content: ""; width: 12px; aspect-ratio: 1; border: 1px solid var(--gold); border-radius: 2px; transform: rotate(45deg); box-shadow: 0 0 10px #f8d68669; }
.site-header nav { display: flex; gap: 8px; }
.nav-link, .site-footer { color: var(--muted); font-size: .875rem; }
.nav-link { padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; }
.nav-link:hover, .site-footer a:hover { color: var(--cyan); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 486px;
  display: flex;
  align-items: center;
  color: #fff;
  background:
    radial-gradient(ellipse at 78% 39%, #382667 0%, transparent 47%),
    radial-gradient(ellipse at 96% 92%, #104262 0%, transparent 57%),
    #101228;
  border: 1px solid #3a4169;
  border-radius: 22px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 23px 31px, #ccdfffcc 1px, transparent 1.8px),
    radial-gradient(circle at 68px 47px, #cbb1ff9e 1px, transparent 1.7px),
    radial-gradient(circle at 117px 23px, #d2efff70 .7px, transparent 1.4px),
    radial-gradient(circle at 104px 119px, #fff1cba8 .8px, transparent 1.5px);
  background-size: 163px 137px, 193px 103px, 139px 89px, 151px 173px;
  mask-image: linear-gradient(100deg, #0004, #000 56%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; padding: 48px clamp(30px, 6vw, 84px); }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.65rem); line-height: 1.14; letter-spacing: -.055em; font-weight: 800; }
.hero h1 span { color: var(--cyan); text-shadow: 0 0 32px #7cc9ff61; }
.intro { margin-top: 19px; color: #e2dcef; line-height: 1.65; }
.hero-link { display: inline-block; margin-top: 26px; padding: 12px 20px; border-radius: 8px; background: var(--cyan); color: #0e2034; font-weight: 750; box-shadow: 0 0 28px #69ddfa3d; }
.hero-link:hover { background: #d4fbff; }
.hero-link:focus-visible { outline-color: white; }

.art { position: absolute; inset: 0 0 0 auto; width: 56%; overflow: hidden; }
.art-grid { position: absolute; inset: 48% -36% -40%; background-image: linear-gradient(#83d8ff45 1px, transparent 1px), linear-gradient(90deg, #83d8ff45 1px, transparent 1px); background-size: 38px 38px; transform: perspective(230px) rotateX(56deg); mask-image: radial-gradient(ellipse, #000 0%, transparent 64%); }
.orbit, .core, .portal-glow { position: absolute; left: 53%; top: 49%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); }
.portal-glow { width: min(94%, 460px); background: radial-gradient(circle, #c7dcff70, #6861d94d 43%, transparent 66%); }
.orbit { border: 1px solid #a598ed82; }
.orbit-outer { width: min(82%, 410px); border-style: dashed; }
.orbit-middle { width: min(71%, 355px); border-color: #81d9f9b3; box-shadow: 0 0 24px #74dfff36, inset 0 0 24px #74dfff23; }
.orbit-middle::before { content: ""; position: absolute; inset: 6px; border-radius: inherit; background: repeating-conic-gradient(#b3eaff 0deg 1deg, transparent 1deg 6deg); mask-image: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); opacity: .65; }
.orbit-inner { width: min(57%, 286px); border: 3px double #f7d68bb3; box-shadow: 0 0 26px #ecd49142, inset 0 0 28px #b38efc70; }
.core { width: min(44%, 220px); display: grid; place-items: center; border: 1px solid #d6bfffaa; background: radial-gradient(circle at 50% 50%, #604ea8 0%, #312957 53%, #171b38 85%); box-shadow: 0 0 52px #8e7aff70; }
.core span { width: 37%; aspect-ratio: 1; position: relative; transform: rotate(45deg); border: 1px solid var(--gold); border-radius: 10%; box-shadow: 0 0 25px #f9c87870, inset 0 0 23px #f9c87840; }
.core span::after { content: ""; position: absolute; inset: 31%; border: 1px solid #e2f9ff; border-radius: 50%; background: #b9e8ff; box-shadow: 0 0 24px 5px #7edfff; }
.satellite { position: absolute; width: 13px; aspect-ratio: 1; border-radius: 50%; }
.satellite-gold { top: 22%; left: 74%; background: var(--gold); box-shadow: 0 0 22px #f8d68cbf; }
.satellite-violet { top: 71%; left: 31%; background: #bc9bff; box-shadow: 0 0 22px #bc9bffba; }
.satellite-white { top: 61%; left: 87%; width: 8px; background: #f1e9ff; box-shadow: 0 0 18px #e3ccff; }
.art-cross { position: absolute; color: #e5d8ffab; font-family: monospace; font-size: 1.2rem; }
.cross-top { top: 24%; left: 24%; }
.cross-bottom { bottom: 16%; right: 12%; }

.directory { padding-block: 38px 34px; scroll-margin-top: 18px; }
.section-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.section-heading h2 { font-size: 1.55rem; letter-spacing: -.025em; }
.section-rule { flex: 1; height: 1px; background: var(--line); }
.directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0; list-style: none; }
.site-card { min-height: 94px; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 16px 18px; border-radius: 13px; border: 1px solid var(--line); background: #11162a; }
.featured-site { grid-column: 1 / -1; }
.featured-site .site-card { background: linear-gradient(110deg, #152d43, #16192e 68%); border-color: #426682; }
a.site-card { transition: border-color .18s, box-shadow .18s, transform .18s; }
a.site-card:hover, .featured-site a.site-card:hover { border-color: #77c5e2; box-shadow: 0 5px 20px #63c6ef1c; transform: translateY(-2px); }
.site-card h3 { font-size: 1.05rem; overflow-wrap: anywhere; }
.site-card p { margin-top: 4px; color: var(--muted); font-size: .875rem; line-height: 1.45; overflow-wrap: anywhere; }
.site-status { padding: 4px 9px; border-radius: 999px; color: #c3c6e1; background: #242940; font-size: .875rem; white-space: nowrap; }
a .site-status { color: var(--cyan); background: #1a394e; }
.site-icon { display: grid; place-items: center; width: 47px; aspect-ratio: 1; border-radius: 11px; color: #cebbff; background: #2b2346; }
.site-icon span { position: relative; display: block; width: 18px; height: 18px; }
.toolbox { color: var(--cyan); background: #214258; }
.toolbox span { border: 2px solid; border-radius: 3px; }
.toolbox span::after { content: ""; position: absolute; inset: 3px auto auto 3px; width: 3px; height: 3px; background: currentColor; box-shadow: 5px 0 currentColor, 0 5px currentColor, 5px 5px currentColor; }
.journal span { border: 2px solid currentColor; border-radius: 3px; }
.journal span::after { content: ""; position: absolute; inset: 4px 3px auto; height: 2px; background: currentColor; box-shadow: 0 4px currentColor; }
.projects { color: #ffc3a9; background: #402c37; }
.projects span::before, .projects span::after { content: ""; position: absolute; width: 12px; height: 12px; border: 2px solid; border-radius: 3px; }
.projects span::after { right: 0; bottom: 0; background: #402c37; }
.archive { color: #98e2d5; background: #1b3a42; }
.archive span { height: 14px; border: 2px solid; border-radius: 3px; }
.archive span::after { content: ""; position: absolute; inset: 3px 4px auto; height: 2px; background: currentColor; }
.profile { color: #abc8ff; background: #253652; }
.profile span::before, .profile span::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 2px solid; }
.profile span::before { width: 8px; height: 8px; border-radius: 50%; }
.profile span::after { width: 16px; height: 8px; bottom: 0; border-radius: 8px 8px 3px 3px; }
.site-footer { min-height: 65px; border-top: 1px solid var(--line); }
.tools-page { padding-bottom: 34px; }
.tools-hero { min-height: 255px; }
.tool-list:not(:empty), .empty-state { margin-top: 24px; }
.empty-state { padding: 24px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); }

@media (max-width: 780px) {
  .frame { width: calc(100% - 40px); }
  .hero { min-height: 410px; }
  .tools-hero { min-height: 235px; }
  .art { width: 57%; opacity: .8; }
  .directory-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .frame { width: calc(100% - 32px); }
  .site-header { min-height: 66px; }
  .site-header { gap: 8px; }
  .brand { gap: 7px; }
  .nav-link { padding-inline: 8px; }
  .hero { min-height: 484px; align-items: start; border-radius: 18px; }
  .hero-content { padding: 29px 23px 230px; }
  .art { inset: auto 0 -10px; width: 100%; height: 240px; }
  .orbit-outer { width: min(78%, 225px); }
  .orbit-middle { width: min(68%, 195px); }
  .orbit-inner { width: min(54%, 156px); }
  .core { width: min(42%, 122px); }
  .tools-hero { min-height: 195px; align-items: center; }
  .tools-hero .hero-content { padding: 28px 23px; }
  .site-card { padding-inline: 12px; gap: 10px; }
  .site-icon { width: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.site-card { transition: none; }
}
