:root {
  color-scheme: dark;
  --bg: #080b12;
  --panel: rgba(16, 23, 36, 0.78);
  --panel-strong: rgba(20, 32, 50, 0.9);
  --text: #eef5ff;
  --muted: #9fb0c8;
  --line: rgba(148, 197, 255, 0.18);
  --accent: #53e0ff;
  --accent-2: #8fffcb;
  --hot: #ffcb6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

:root.light {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --text: #142033;
  --muted: #5e6c81;
  --line: rgba(35, 76, 120, 0.14);
  --accent: #087fbd;
  --accent-2: #16a36d;
  --hot: #b76a00;
  --shadow: 0 24px 70px rgba(34, 72, 114, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(83, 224, 255, 0.2), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(143, 255, 203, 0.16), transparent 30rem),
    linear-gradient(145deg, var(--bg), #101522 55%, var(--bg));
  overflow-x: hidden;
}

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

#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-strong), transparent 8%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.hero-actions,
.stats,
.tags,
.profile-links,
.github-profile,
.github-metrics,
.github-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #06111b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.nav {
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.nav a,
.theme-toggle {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 8px;
}

.nav a:hover,
.theme-toggle:hover {
  color: var(--text);
  background: rgba(128, 180, 255, 0.12);
}

.theme-toggle {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: center;
  min-height: calc(100vh - 84px);
  gap: 42px;
  padding: 56px 0 44px;
}

.eyebrow,
.section-head p {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-text {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-btn {
  color: #06111b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 40px rgba(83, 224, 255, 0.22);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.orbit {
  position: relative;
  aspect-ratio: 1;
  width: min(420px, 82vw);
  margin-inline: auto;
}

.orbit span,
.orbit .core {
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
}

.orbit span {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 50%;
  animation: spin 16s linear infinite;
}

.orbit span:nth-child(2) {
  width: 72%;
  height: 72%;
  animation-duration: 10s;
  animation-direction: reverse;
}

.orbit span:nth-child(3) {
  width: 42%;
  height: 42%;
  animation-duration: 7s;
}

.orbit span::before {
  content: "";
  position: absolute;
  top: 8%;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 26px var(--hot);
}

.core {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 28px;
  font-size: 30px;
  font-weight: 900;
  color: #06111b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 60px rgba(83, 224, 255, 0.35);
}

.dashboard {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 80px;
}

.profile-panel,
.post-card,
.project-card,
.timeline li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.profile-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 24px;
}

.avatar {
  display: grid;
  width: 74px;
  height: 74px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 18px;
  color: #07131e;
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-2), var(--hot));
}

.profile-panel h2,
.section-head h2 {
  margin-bottom: 12px;
  font-size: 28px;
}

.profile-panel p,
.post-card p,
.project-card p,
.timeline span {
  color: var(--muted);
  line-height: 1.75;
}

.stats {
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}

.stats span,
.tags span,
.project-card span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.stats span {
  flex: 1 1 92px;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.stats strong {
  display: block;
  color: var(--text);
  font-size: 24px;
}

.tags {
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  padding: 7px 10px;
  color: var(--muted);
  font-size: 13px;
}

.profile-links {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.profile-links a {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 800;
}

.content-flow,
.projects,
.github-section,
.timeline {
  margin-bottom: 80px;
}

.section-head {
  margin-bottom: 18px;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 14px;
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.post-card:hover,
.project-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent), transparent 35%);
}

.post-card time {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.post-card h3,
.project-card h3 {
  margin: 8px 0 8px;
  font-size: 22px;
}

.post-card a {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  color: #06111b;
  font-weight: 900;
  background: var(--accent);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  min-height: 220px;
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card span {
  display: inline-flex;
  padding: 6px 10px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.github-card {
  display: grid;
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(83, 224, 255, 0.12), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.github-profile {
  gap: 18px;
}

.github-profile img {
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.github-label {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.github-profile h3 {
  margin: 8px 0;
  font-size: 26px;
}

.github-profile p,
.github-note {
  color: var(--muted);
  line-height: 1.75;
}

.github-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.github-metrics span {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.github-metrics strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 28px;
}

.github-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.github-note {
  margin: -6px 0 0;
  font-size: 13px;
}

.timeline ol {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  padding: 20px;
}

.timeline strong {
  color: var(--accent);
}

.music-player {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 44px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.music-player button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #06111b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
}

.music-player strong,
.music-player span {
  display: block;
}

.music-player span {
  max-width: 210px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 98px;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.ripple {
  position: fixed;
  z-index: 40;
  width: 12px;
  height: 12px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: ripple 0.75s ease-out forwards;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes ripple {
  to {
    width: 120px;
    height: 120px;
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 72px;
  }

  .profile-panel {
    position: static;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .github-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main,
  footer,
  .site-header {
    width: min(100% - 22px, 1180px);
  }

  h1 {
    font-size: 40px;
  }

  .post-card,
  .timeline li {
    grid-template-columns: 1fr;
  }

  .github-profile {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-card a {
    width: 100%;
    height: 42px;
    border-radius: 8px;
  }

  .music-player {
    right: 11px;
    bottom: 11px;
  }
}
