﻿:root {
  color-scheme: dark;
  --bg: #070d1f;
  --bg-soft: rgba(10, 18, 38, 0.78);
  --line: rgba(114, 151, 255, 0.22);
  --text: #e9f0ff;
  --muted: #9fb0d4;
  --accent: #39d2ff;
  --accent-2: #56f8b2;
  --shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Han Sans SC", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% -10%, rgba(57, 210, 255, 0.22), transparent 38%),
    radial-gradient(circle at 95% 5%, rgba(86, 248, 178, 0.18), transparent 32%),
    linear-gradient(180deg, #070d1f 0%, #090f20 58%, #050812 100%);
  overflow-x: hidden;
}

#fx-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

#cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  background: radial-gradient(circle, rgba(57, 210, 255, 0.16) 0%, rgba(57, 210, 255, 0.06) 35%, rgba(57, 210, 255, 0) 72%);
  transform: translate(-50%, -50%);
  transition: opacity 220ms ease;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.2;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 95%);
}

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 7px;
  opacity: 0.16;
}

.glass {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
  transform-style: preserve-3d;
}

.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(57, 210, 255, 0.08), transparent 35%, rgba(86, 248, 178, 0.06));
  opacity: 0;
  transition: opacity 240ms ease;
}

.glass:hover {
  border-color: rgba(57, 210, 255, 0.36);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.glass:hover::after {
  opacity: 1;
}

.top-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: min(1260px, calc(100% - 24px));
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #7e80ff);
  color: #04101f;
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
}

.brand-title {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.08em;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.menu {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.menu a {
  color: var(--muted);
  font-family: "Orbitron", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.menu a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-switch {
  display: inline-flex;
  border: 1px solid rgba(159, 176, 212, 0.26);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.02);
}

.mode-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.74rem;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.mode-btn.active {
  background: linear-gradient(135deg, var(--accent), #6f79ff);
  color: #03121f;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(86, 248, 178, 0.35);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--accent-2);
  font-family: "Orbitron", sans-serif;
  font-size: 0.75rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(86, 248, 178, 0.4);
  animation: pulse 1.8s infinite;
}

.layout {
  width: min(1260px, calc(100% - 24px));
  margin: 0 auto;
  padding: 108px 0 56px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.left-column,
.right-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.profile-card,
.panel,
.hero-banner,
.card,
.snake-panel,
.updates-panel,
.card-mode-panel {
  border-radius: 20px;
  padding: 20px;
}

.avatar-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.avatar {
  width: 100%;
  max-width: 100%;
  height: auto;
  justify-self: center;
  border-radius: 16px;
  aspect-ratio: auto;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.avatar-gif {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  line-height: 1.15;
}

h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  margin-bottom: 10px;
}

h2 {
  font-size: 1rem;
  margin-bottom: 10px;
}

h3 {
  font-size: 1.02rem;
  margin-bottom: 10px;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.action-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  padding: 10px 14px;
  text-decoration: none;
  border: 1px solid transparent;
  font-size: 0.88rem;
}

.btn-solid {
  color: #051019;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 700;
}

.btn-ghost {
  color: var(--text);
  border-color: rgba(159, 176, 212, 0.32);
  background: rgba(255, 255, 255, 0.03);
}

.link-list,
.stat-list,
.updates-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list li,
.stat-list li,
.updates-list li {
  border-bottom: 1px solid rgba(159, 176, 212, 0.14);
  padding: 10px 0;
}

.link-list li:last-child,
.stat-list li:last-child,
.updates-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.link-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  text-decoration: none;
}

.link-list a:hover {
  color: var(--accent);
}

.nav-title {
  font-weight: 600;
  color: var(--text);
}

.nav-sub {
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(159, 176, 212, 0.88);
}

.stat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-list strong {
  font-family: "Orbitron", sans-serif;
  color: var(--accent);
}

.hero-banner {
  padding: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  letter-spacing: 0.18em;
  font-family: "Orbitron", sans-serif;
  font-size: 0.74rem;
}

.hero-banner h2 {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  margin-bottom: 12px;
}

.quote-panel {
  padding: 20px 24px;
}

.quote-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
}

.quote-list li + li {
  margin-top: 6px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  text-decoration: none;
}

.updates-head,
.snake-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#updates-source,
#date-line {
  color: var(--muted);
  font-size: 0.82rem;
}

.updates-list .update-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px;
}

.updates-date {
  color: var(--accent);
  font-family: "Orbitron", sans-serif;
  font-size: 0.78rem;
}

.updates-text {
  color: var(--muted);
}

.loading {
  color: var(--muted);
}

.snake {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.card-mode-panel {
  display: none;
}

.quick-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a {
  text-decoration: none;
  border: 1px solid rgba(159, 176, 212, 0.26);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
}

.footer {
  width: min(1260px, calc(100% - 24px));
  margin: 0 auto;
  padding: 0 0 30px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.footer p {
  color: var(--muted);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.menu a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.doc-page {
  overflow-x: hidden;
}

.doc-nav {
  top: 14px;
}

.doc-wrap {
  width: min(980px, calc(100% - 24px));
  margin: 0 auto;
  padding: 110px 0 44px;
}

.doc-panel {
  border-radius: 20px;
  padding: 26px;
}

.doc-panel h1,
.doc-panel h2,
.doc-panel h3 {
  margin-top: 18px;
  margin-bottom: 10px;
}

.doc-panel h1 {
  margin-top: 0;
}

.doc-panel p,
.doc-panel li {
  color: var(--muted);
  line-height: 1.8;
}

.doc-panel ul {
  margin: 0;
  padding-left: 1.1rem;
}

.doc-panel a {
  color: var(--accent);
}

.doc-panel hr {
  border: 0;
  height: 1px;
  margin: 18px 0;
  background: rgba(159, 176, 212, 0.2);
}

.repo-meta {
  margin: 12px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.repo-source {
  color: var(--muted);
  font-size: 0.9rem;
}

.repo-visit {
  text-decoration: none;
  border: 1px solid rgba(159, 176, 212, 0.3);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.86rem;
}

.repo-visit:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.repo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.repo-item {
  border: 1px solid rgba(159, 176, 212, 0.18);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.repo-title {
  text-decoration: none;
  color: var(--text);
  font-family: "Orbitron", sans-serif;
  font-size: 0.95rem;
}

.repo-title:hover {
  color: var(--accent);
}

.repo-desc {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.65;
  min-height: 3.2em;
}

.repo-item-meta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.repo-lang,
.repo-stars,
.repo-updated {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(159, 176, 212, 0.24);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  color: var(--muted);
}

.repo-lang {
  color: var(--accent-2);
  border-color: rgba(86, 248, 178, 0.28);
}

.repo-stars {
  color: var(--accent);
  border-color: rgba(57, 210, 255, 0.28);
}

.repo-footnote {
  margin-top: 16px;
}

.center-block {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.center-title {
  text-align: center;
}

.center-title a {
  color: var(--text);
  text-decoration: none;
}

.hero-avatar-row img {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  object-fit: cover;
}

.badge-wrap {
  margin: 6px 0;
}

.icon-row img {
  margin: 0 8px;
}

.doc-panel table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.doc-panel th,
.doc-panel td {
  border: 1px solid rgba(159, 176, 212, 0.2);
  padding: 10px;
  text-align: left;
  color: var(--muted);
  vertical-align: top;
}

.doc-panel th {
  color: var(--text);
}

body[data-mode="card"] .blog-only {
  display: none;
}

body[data-mode="card"] .layout {
  grid-template-columns: 420px minmax(0, 1fr);
}

body[data-mode="card"] .card-only {
  display: block;
}

body[data-mode="card"] .profile-card {
  position: sticky;
  top: 104px;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(86, 248, 178, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(86, 248, 178, 0); }
  100% { box-shadow: 0 0 0 0 rgba(86, 248, 178, 0); }
}

@media (max-width: 1180px) {
  .layout,
  body[data-mode="card"] .layout {
    grid-template-columns: 1fr;
  }

  .left-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card {
    grid-column: 1 / -1;
  }

  body[data-mode="card"] .profile-card {
    position: static;
  }
}

@media (max-width: 760px) {
  #cursor-glow,
  #fx-particles {
    display: none;
  }

  .top-nav,
  .layout,
  .doc-wrap,
  .footer {
    width: calc(100% - 16px);
  }

  .left-column,
  .content-grid,
  .avatar-row {
    grid-template-columns: 1fr;
  }

  .avatar-gif {
    display: none;
  }

  .menu {
    gap: 10px;
  }

  .menu a,
  .mode-btn {
    font-size: 0.66rem;
  }

  .footer {
    flex-direction: column;
  }

  .updates-list .update-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .doc-panel {
    padding: 18px;
  }

  .repo-list {
    grid-template-columns: 1fr;
  }

  .hero-avatar-row img {
    width: 100px;
    height: 100px;
  }
}
