:root {
  --bg-deep: #02040c;
  --bg-mid: #050b1a;
  --blue-core: #4db8ff;
  --blue-bright: #7ad4ff;
  --blue-dim: #1a6fb5;
  --blue-glow: rgba(77, 184, 255, 0.55);
  --text-main: #e8f4ff;
  --text-muted: rgba(200, 224, 255, 0.72);
  --glass-bg: rgba(12, 28, 56, 0.35);
  --glass-border: rgba(120, 190, 255, 0.28);
  --glass-highlight: rgba(180, 220, 255, 0.12);
  --font-display: "Orbitron", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", sans-serif;
  --radius: 18px;
  --max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-deep);
  overflow-x: hidden;
  line-height: 1.65;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.nebula {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(30, 90, 180, 0.35), transparent 55%),
    radial-gradient(ellipse 45% 40% at 85% 70%, rgba(20, 60, 140, 0.22), transparent 60%),
    radial-gradient(ellipse 40% 35% at 10% 60%, rgba(40, 100, 180, 0.15), transparent 55%);
  animation: nebula-drift 22s ease-in-out infinite alternate;
}

@keyframes nebula-drift {
  from { opacity: 0.85; transform: scale(1); }
  to { opacity: 1; transform: scale(1.06); }
}

.nav,
main,
.footer {
  position: relative;
  z-index: 2;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: var(--blue-bright);
  text-shadow: 0 0 12px var(--blue-glow), 0 0 28px rgba(77, 184, 255, 0.35);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.nav-links a:hover {
  color: var(--blue-bright);
  text-shadow: 0 0 10px var(--blue-glow);
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4.5rem, 14vh, 8rem) 1.5rem 5rem;
  min-height: calc(100vh - 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue-bright);
  text-shadow:
    0 0 10px var(--blue-glow),
    0 0 30px rgba(77, 184, 255, 0.5),
    0 0 60px rgba(40, 140, 255, 0.35);
  animation: brand-pulse 3.6s ease-in-out infinite;
  margin-bottom: 1.25rem;
}

@keyframes brand-pulse {
  0%, 100% {
    text-shadow:
      0 0 10px var(--blue-glow),
      0 0 30px rgba(77, 184, 255, 0.5),
      0 0 60px rgba(40, 140, 255, 0.35);
  }
  50% {
    text-shadow:
      0 0 14px var(--blue-bright),
      0 0 42px rgba(77, 184, 255, 0.7),
      0 0 80px rgba(40, 140, 255, 0.45);
  }
}

.hero-title {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  max-width: 18em;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 28em;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.55rem;
  border-radius: 999px;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  color: #031018;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-core));
  box-shadow: 0 0 20px rgba(77, 184, 255, 0.4);
  border: none;
  font-weight: 500;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(77, 184, 255, 0.65);
}

.btn-ghost {
  color: var(--blue-bright);
  background: transparent;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--blue-core);
  box-shadow: 0 0 16px rgba(77, 184, 255, 0.25);
  transform: translateY(-2px);
}

.skills {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  letter-spacing: 0.14em;
  color: var(--blue-bright);
  text-shadow: 0 0 14px var(--blue-glow);
  margin-bottom: 0.55rem;
}

.section-head p {
  color: var(--text-muted);
  font-weight: 300;
  max-width: 28em;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 12px 40px rgba(0, 10, 30, 0.35);
}

.skill-card {
  padding: 1.75rem 1.5rem 1.6rem;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(120, 190, 255, 0.5);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 16px 48px rgba(20, 80, 160, 0.35),
    0 0 24px rgba(77, 184, 255, 0.12);
}

.skill-icon {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--blue-core);
  margin-bottom: 1.1rem;
  filter: drop-shadow(0 0 8px var(--blue-glow));
}

.skill-icon svg {
  width: 100%;
  height: 100%;
}

.skill-card h3 {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--blue-bright);
  text-shadow: 0 0 12px rgba(77, 184, 255, 0.4);
  margin-bottom: 0.7rem;
  letter-spacing: 0.06em;
}

.skill-card > p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 300;
  margin-bottom: 1.15rem;
}

.skill-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.skill-card li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.88rem;
  color: rgba(210, 230, 255, 0.85);
}

.skill-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-core);
  box-shadow: 0 0 8px var(--blue-glow);
}

.overview-panel {
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.overview-panel > p {
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 1.5rem;
  max-width: 52em;
}

.overview-panel strong {
  color: var(--blue-bright);
  font-weight: 500;
  text-shadow: 0 0 10px rgba(77, 184, 255, 0.35);
}

.arch-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.65rem;
}

.arch-node {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--blue-bright);
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(20, 50, 100, 0.25);
  text-shadow: 0 0 10px rgba(77, 184, 255, 0.35);
}

.arch-arrow {
  color: var(--blue-dim);
  font-size: 1rem;
}

.flow-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flow-item {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  padding: 1.35rem 1.4rem;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.flow-item:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 190, 255, 0.5);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 14px 40px rgba(20, 80, 160, 0.3);
}

.flow-num {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--blue-bright);
  text-shadow: 0 0 14px var(--blue-glow);
  flex-shrink: 0;
  line-height: 1.4;
}

.flow-item h3 {
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--blue-bright);
  text-shadow: 0 0 10px rgba(77, 184, 255, 0.35);
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}

.flow-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 300;
}

.scheme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.scheme-card {
  padding: 1.6rem 1.4rem;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.scheme-card:hover {
  transform: translateY(-6px);
  border-color: rgba(120, 190, 255, 0.5);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 16px 48px rgba(20, 80, 160, 0.35);
}

.scheme-card h3 {
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--blue-bright);
  text-shadow: 0 0 12px rgba(77, 184, 255, 0.4);
  margin-bottom: 0.9rem;
  letter-spacing: 0.04em;
}

.scheme-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.scheme-card li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: rgba(210, 230, 255, 0.85);
  font-weight: 300;
}

.scheme-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-core);
  box-shadow: 0 0 8px var(--blue-glow);
}

.scheme-card code {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--blue-bright);
  text-shadow: 0 0 8px rgba(77, 184, 255, 0.3);
}

.flow-item[data-reveal].is-visible:nth-child(2) {
  transition-delay: 0.08s;
}

.flow-item[data-reveal].is-visible:nth-child(3) {
  transition-delay: 0.16s;
}

.flow-item[data-reveal].is-visible:nth-child(4) {
  transition-delay: 0.24s;
}

.scheme-card[data-reveal].is-visible:nth-child(2) {
  transition-delay: 0.12s;
}

.scheme-card[data-reveal].is-visible:nth-child(3) {
  transition-delay: 0.24s;
}

.contact {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem 5rem;
}

.contact-panel {
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.contact-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 1.65rem);
  letter-spacing: 0.1em;
  color: var(--blue-bright);
  text-shadow: 0 0 16px var(--blue-glow);
}

.contact-panel p {
  color: var(--text-muted);
  font-weight: 300;
  max-width: 28em;
  margin-bottom: 0.5rem;
}

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(120, 190, 255, 0.12);
}

.footer-left {
  justify-self: start;
}

.footer-beian {
  justify-self: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  transition: color 0.25s ease, text-shadow 0.25s ease;
  white-space: nowrap;
}

.footer-beian:hover {
  color: var(--blue-bright);
  text-shadow: 0 0 10px var(--blue-glow);
}

.footer-glow {
  justify-self: end;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--blue-dim);
  text-shadow: 0 0 10px rgba(77, 184, 255, 0.3);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.skill-card[data-reveal].is-visible:nth-child(2) {
  transition-delay: 0.12s;
}

.skill-card[data-reveal].is-visible:nth-child(3) {
  transition-delay: 0.24s;
}

@media (max-width: 900px) {
  .skill-grid,
  .scheme-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .nav-links {
    gap: 0.85rem;
    font-size: 0.88rem;
  }
}

@media (max-width: 520px) {
  .nav-links {
    gap: 1rem;
  }

  .hero-brand {
    letter-spacing: 0.08em;
  }

  .footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-left,
  .footer-glow {
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nebula,
  .hero-brand {
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
