@view-transition {
  navigation: auto;
}

::view-transition-group(log-channel) {
  animation-duration: 0.48s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

::view-transition-old(log-channel),
::view-transition-new(log-channel) {
  animation-duration: 0.48s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  overflow: clip;
  height: 100%;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.28s;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

:root {
  --bg: #0d1114;
  --accent: #d1ff00;
  --text-main: #e0f0f5;
  --text-dim: #5e8291;
  --border: rgba(255, 255, 255, 0.08);
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
  --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", -apple-system, system-ui, sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 13px;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(circle, #1a252b 0%, #0d1114 100%);
}

.mist {
  position: absolute;
  width: 150%;
  height: 150%;
  pointer-events: none;
  will-change: translate;
}

.mist::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(94, 130, 145, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(209, 255, 0, 0.03) 0%, transparent 30%);
  filter: blur(80px);
  animation: drift 20s ease-in-out infinite alternate;
}

@keyframes drift {
  0% { transform: translate(-10%, -10%) rotate(0deg); }
  100% { transform: translate(0%, 0%) rotate(5deg); }
}

.scan-line {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.1) 2px 4px
  );
  pointer-events: none;
  opacity: 0.3;
  z-index: 100;
}

.light-leak {
  position: fixed;
  top: 0;
  left: 30%;
  width: 1px;
  height: 100vh;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.4), transparent);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
  z-index: 1;
  animation: sweep 12s linear infinite;
  pointer-events: none;
}

@keyframes sweep {
  0% { transform: translateX(-200px); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateX(800px); opacity: 0; }
}

.topo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  pointer-events: none;
}

header {
  position: fixed;
  top: 40px;
  left: 40px;
  z-index: 10;
}

.logo {
  font-family: var(--font-mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
}

.logo::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}

.nav-coords {
  position: fixed;
  right: 40px;
  top: 40px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-align: right;
  line-height: 1.6;
  font-size: 10px;
  z-index: 10;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.scroller {
  position: fixed;
  left: 40px;
  bottom: 40px;
  height: 120px;
  width: 1px;
  background: var(--border);
  z-index: 10;
}

.scroller-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--accent);
  height: 30%;
  box-shadow: 0 0 8px var(--accent);
}

footer {
  position: relative;
  display: flex;
  justify-content: flex-end;
  gap: 40px;
  padding: 48px 80px 56px;
  margin-top: 24px;
  border-top: 0.5px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

footer a { transition: color 0.3s; }
footer a:hover { color: var(--accent); }

@media (max-width: 900px) {
  html, body { font-size: 15px; }
  header, .nav-coords, .scroller { position: static; }
  header, .nav-coords { padding: 24px 24px 0; }
  .nav-coords { text-align: left; }
  footer {
    padding: 40px 24px;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
  }
  .scroller { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mist::before, .light-leak, .scan-line { animation: none; }
  .scan-line, .light-leak { display: none; }
}
