/* galaxyuniverse.ai AEO Hub — sample by GATEPOP INC. */
:root {
  --bg: #05060f;
  --bg2: #0a0c1e;
  --surface: rgba(255, 255, 255, 0.04);
  --surface2: rgba(255, 255, 255, 0.07);
  --border: rgba(139, 122, 255, 0.18);
  --text: #e8e9f3;
  --muted: #9aa0b8;
  --violet: #8b7aff;
  --cyan: #4dd6ff;
  --magenta: #ff5ecf;
  --grad: linear-gradient(100deg, #8b7aff 0%, #4dd6ff 55%, #ff5ecf 110%);
  --radius: 16px;
  --maxw: 1100px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(139,122,255,.4); }

/* starfield */
#stars { position: fixed; inset: 0; z-index: -2; }
.nebula {
  position: fixed; z-index: -1; pointer-events: none; filter: blur(90px); opacity: .35;
  border-radius: 50%;
}
.nebula.a { width: 560px; height: 560px; top: -180px; right: -120px; background: radial-gradient(circle, #5b3fd4, transparent 70%); }
.nebula.b { width: 480px; height: 480px; bottom: -160px; left: -140px; background: radial-gradient(circle, #0e4d7a, transparent 70%); }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 6, 15, 0.72);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 22px;
}
.brand { font-weight: 800; font-size: 17px; letter-spacing: .02em; color: var(--text); }
.brand .dot { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 18px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.lang-switch {
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px;
  font-size: 13px; color: var(--text) !important; background: var(--surface);
}
.lang-switch:hover { background: var(--surface2); }

/* layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--violet); margin-bottom: 14px;
}
h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.01em; margin-bottom: 14px; }
h3 { font-size: 19px; font-weight: 700; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 17px; max-width: 680px; }

/* hero */
.hero { padding: 110px 0 80px; text-align: center; }
.hero .lead { margin: 22px auto 34px; }
.hero-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.badge {
  font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 12px; font-weight: 700; font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #0a0618; box-shadow: 0 8px 30px rgba(139,122,255,.35); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); background: var(--surface); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; text-align: center;
}
.stat .num { font-size: 42px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .label { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 34px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; position: relative; transition: transform .18s ease, border-color .18s ease, background .18s ease;
  display: block; color: var(--text);
}
a.card:hover { transform: translateY(-4px); border-color: rgba(139,122,255,.5); background: var(--surface2); text-decoration: none; }
.card .icon { font-size: 26px; margin-bottom: 12px; display: block; }
.card h3 { margin-bottom: 6px; }
.card .aud { font-size: 12px; color: var(--violet); font-weight: 600; letter-spacing: .04em; margin-bottom: 8px; display: block; }
.card p { color: var(--muted); font-size: 14px; }
.card .soon {
  position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700;
  color: var(--muted); border: 1px solid rgba(255,255,255,.14); padding: 3px 9px; border-radius: 999px;
}
.card.live { border-color: rgba(77,214,255,.35); }
.card .soon.live-tag { color: var(--cyan); border-color: rgba(77,214,255,.4); }

/* AI simulator */
.sim {
  background: linear-gradient(180deg, rgba(139,122,255,.08), rgba(255,255,255,.03));
  border: 1px solid var(--border); border-radius: 20px; padding: 34px; margin-top: 36px;
}
.sim-q { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 24px; }
.sim-q button {
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); transition: all .15s ease;
}
.sim-q button:hover { border-color: var(--violet); }
.sim-q button.active { background: var(--grad); color: #0a0618; border-color: transparent; }
.sim-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sim-panel { border-radius: 14px; padding: 22px; font-size: 14.5px; min-height: 170px; }
.sim-panel .tag { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 10px; }
.sim-before { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); color: var(--muted); }
.sim-before .tag { color: #ff8c8c; }
.sim-after { background: rgba(77,214,255,.06); border: 1px solid rgba(77,214,255,.3); }
.sim-after .tag { color: var(--cyan); }
.sim-after .cite { display: inline-block; margin-top: 12px; font-size: 12px; color: var(--violet); border: 1px dashed rgba(139,122,255,.5); padding: 3px 10px; border-radius: 8px; }
.typing::after { content: "▍"; animation: blink 1s infinite; color: var(--cyan); }
@keyframes blink { 50% { opacity: 0; } }

/* article */
.article-layout { display: grid; grid-template-columns: 230px 1fr; gap: 48px; padding: 60px 0 90px; }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14px; }
.toc .toc-title { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.toc a { display: block; color: var(--muted); padding: 6px 0 6px 14px; border-left: 2px solid rgba(255,255,255,.1); }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--violet); border-left-color: var(--violet); font-weight: 600; }
.article h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 10px; }
.article .meta { color: var(--muted); font-size: 14px; margin-bottom: 36px; }
.article section { padding: 26px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.article section h2 { font-size: 24px; }
.article section .kicker { color: var(--violet); font-weight: 700; font-size: 13px; letter-spacing: .1em; }
.article p { margin: 12px 0; color: #c9cde0; }
.article blockquote {
  margin: 20px 0; padding: 20px 26px; border-left: 3px solid var(--violet);
  background: var(--surface); border-radius: 0 12px 12px 0; font-style: italic; color: var(--text);
}
.article ul { margin: 12px 0 12px 22px; color: #c9cde0; }
.article li { margin: 6px 0; }

/* FAQ accordion */
.faq-item { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 14px; background: var(--surface); overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 20px 24px; font-weight: 700; font-size: 16.5px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--violet); transition: transform .2s ease; flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 24px 22px; color: #c9cde0; font-size: 15px; }
.faq-item[open] { border-color: rgba(139,122,255,.45); }

/* table */
.facts-table { width: 100%; border-collapse: collapse; margin-top: 26px; font-size: 14.5px; }
.facts-table th, .facts-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; }
.facts-table th { color: var(--violet); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.facts-table td { color: #c9cde0; }

.code-box {
  background: #0b0d1c; border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px; color: #a8e6ff; overflow-x: auto; white-space: pre; margin-top: 18px;
}

/* breadcrumb */
.crumbs { font-size: 13px; color: var(--muted); padding: 26px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }

/* footer */
footer { border-top: 1px solid rgba(255,255,255,.07); padding: 44px 0 60px; margin-top: 40px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
footer p { color: var(--muted); font-size: 13px; max-width: 560px; }
footer .disclaimer {
  margin-top: 12px; padding: 12px 16px; border: 1px dashed rgba(255,255,255,.16);
  border-radius: 10px; font-size: 12.5px;
}
footer nav a { display: block; color: var(--muted); font-size: 13.5px; padding: 3px 0; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.show { opacity: 1; transform: none; }

/* language dropdown */
.lang-dd { position: relative; }
.lang-dd summary {
  list-style: none; cursor: pointer; border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 14px; font-size: 13px; color: var(--text); background: var(--surface);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.lang-dd summary::-webkit-details-marker { display: none; }
.lang-dd summary::after { content: "▾"; font-size: 10px; color: var(--muted); }
.lang-dd[open] summary { border-color: var(--violet); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 100; min-width: 190px;
  background: #0c0e20; border: 1px solid var(--border); border-radius: 14px; padding: 8px;
  box-shadow: 0 16px 50px rgba(0,0,0,.6);
}
.lang-menu a, .lang-menu span {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 8px; font-size: 13.5px; color: var(--text);
}
.lang-menu a:hover { background: var(--surface2); text-decoration: none; }
.lang-menu a.on { color: var(--violet); font-weight: 700; }
.lang-menu span { color: var(--muted); cursor: default; }
.lang-menu em {
  font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 2px 8px; color: var(--muted);
}

/* library: filter chips + entry cards */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 8px; }
.chips button {
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); transition: all .15s ease;
}
.chips button:hover { border-color: var(--violet); }
.chips button.active { background: var(--grad); color: #0a0618; border-color: transparent; }
.entry {
  display: flex; gap: 20px; align-items: baseline; padding: 20px 22px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  color: var(--text); transition: transform .15s ease, border-color .15s ease;
}
a.entry:hover { transform: translateX(4px); border-color: rgba(139,122,255,.5); text-decoration: none; }
.entry .date { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 84px; }
.entry .cat {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid rgba(77,214,255,.3); border-radius: 999px;
  padding: 2px 10px; white-space: nowrap;
}
.entry .cat.wp { color: var(--violet); border-color: rgba(139,122,255,.4); }
.entry .cat.story { color: var(--magenta); border-color: rgba(255,94,207,.35); }
.entry .t { font-weight: 700; font-size: 15.5px; flex: 1; }
.entry .t small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 3px; }
.entry.upcoming { opacity: .55; border-style: dashed; }
.entry .lang-tags { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* reading progress bar */
#readbar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 300;
  background: var(--grad); box-shadow: 0 0 12px rgba(139,122,255,.8);
}

/* parallax nebulas follow CSS vars set by JS */
.nebula.a { transform: translate(calc(var(--px, 0) * 46px), calc(var(--py, 0) * 34px)); transition: transform .4s ease-out; }
.nebula.b { transform: translate(calc(var(--px, 0) * -34px), calc(var(--py, 0) * -26px)); transition: transform .4s ease-out; }

/* 3D tilt cards */
a.card { transform-style: preserve-3d; will-change: transform; }
a.card.tilting { transition: none; }

/* orbit universe map */
.orbit-wrap {
  position: relative; height: 600px; margin: 10px 0 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.orbit-center {
  position: absolute; z-index: 3; width: 140px; height: 140px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: radial-gradient(circle at 35% 30%, rgba(139,122,255,.35), rgba(10,8,24,.95) 70%);
  border: 1px solid rgba(139,122,255,.5);
  box-shadow: 0 0 60px rgba(139,122,255,.45), inset 0 0 30px rgba(139,122,255,.2);
  text-align: center; font-weight: 800; font-size: 15px; letter-spacing: .04em;
}
.orbit-center small { font-weight: 500; font-size: 10.5px; color: var(--muted); letter-spacing: .12em; }
.ring {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  border: 1px dashed rgba(139,122,255,.22);
  animation: orbitspin linear infinite;
}
.ring.r1 { width: 320px; height: 320px; margin: -160px; animation-duration: 46s; }
.ring.r2 { width: 540px; height: 540px; margin: -270px; animation-duration: 82s; animation-direction: reverse; }
@keyframes orbitspin { to { transform: rotate(360deg); } }
.onode {
  position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; margin: -29px;
  transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a)));
}
.okeep { display: block; width: 100%; height: 100%; }
.r1 .onode { --r: 160px; }
.r2 .onode { --r: 270px; }
.r1 .okeep { animation: orbitspin 46s linear infinite reverse; }
.r2 .okeep { animation: orbitspin 82s linear infinite; }
.onode .oi {
  width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: var(--surface2); border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,.5); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.onode .olabel {
  position: absolute; top: 64px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--text);
  background: rgba(12,14,32,.95); border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 10px; opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 5;
}
.onode:hover .oi { transform: scale(1.3); border-color: var(--violet); box-shadow: 0 0 30px rgba(139,122,255,.7); }
.onode:hover .olabel { opacity: 1; }
.orbit-wrap:hover .ring, .orbit-wrap:hover .okeep { animation-play-state: paused; }

/* FAQ live search */
.faq-search {
  width: 100%; padding: 14px 20px; margin: 0 0 22px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 15px; outline: none; transition: border-color .15s ease;
}
.faq-search:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139,122,255,.15); }
.faq-search::placeholder { color: var(--muted); }
.faq-empty { color: var(--muted); font-size: 14.5px; padding: 18px 4px; display: none; }

/* live JSON viewer */
.json-view { display: none; margin-top: 18px; max-height: 420px; overflow: auto; }
.json-view.open { display: block; }
.json-view .k { color: #8b7aff; }
.json-view .s { color: #7ee2a8; }

@media (max-width: 860px) {
  .entry { flex-wrap: wrap; gap: 8px 14px; }
  .lang-menu { right: -10px; }
  .orbit-wrap { height: 430px; }
  .ring.r1 { width: 210px; height: 210px; margin: -105px; }
  .ring.r2 { width: 370px; height: 370px; margin: -185px; }
  .onode { width: 44px; height: 44px; margin: -22px; }
  .onode .oi { width: 44px; height: 44px; font-size: 18px; }
  .orbit-center { width: 104px; height: 104px; font-size: 12px; }
  .r1 .onode { --r: 105px; }
  .r2 .onode { --r: 185px; }

  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; }
  .toc a { border-left: none; padding: 4px 0; }
  .sim-panels { grid-template-columns: 1fr; }
  .nav-links { gap: 12px; }
  .nav-links a:not(.lang-switch) { display: none; }
}
