:root {
  --bg-deep: #050508;
  --bg-card: rgba(12, 16, 28, 0.72);
  --cyan: #00e5ff;
  --violet: #8b5cf6;
  --magenta: #d946ef;
  --text: #e8edf7;
  --text-muted: #8b95a8;
  --border: rgba(0, 229, 255, 0.18);
  --glow: 0 0 40px rgba(0, 229, 255, 0.15);
  --font-display: "Orbitron", "Noto Sans SC", sans-serif;
  --font-body: "Inter", "Noto Sans SC", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  display: block;
}

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

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 80%);
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.glow-orb--1 {
  width: 500px;
  height: 500px;
  top: -120px;
  right: -80px;
  background: rgba(139, 92, 246, 0.22);
}

.glow-orb--2 {
  width: 400px;
  height: 400px;
  bottom: 10%;
  left: -100px;
  background: rgba(0, 229, 255, 0.12);
}

.glow-orb--3 {
  width: 300px;
  height: 300px;
  top: 45%;
  right: 20%;
  background: rgba(217, 70, 239, 0.1);
}

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
}

.nav.scrolled {
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
  position: relative;
}

.nav__links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.3s;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--cyan);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
}

.hero__content {
  max-width: 720px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.05);
  margin-bottom: 1.8rem;
  animation: fadeUp 0.8s ease both;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 2s infinite;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
  animation: fadeUp 0.8s 0.1s ease both;
}

.hero__title .gradient {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 50%, var(--magenta) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.8s 0.2s ease both;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.3s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #050508;
  box-shadow: 0 4px 24px rgba(0, 229, 255, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 229, 255, 0.4);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

.hero__stats {
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.8s 0.5s ease both;
}

.stat__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cyan);
}

.stat__label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.hero__visual {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 42%;
  max-width: 480px;
  opacity: 0.9;
}

.neural-ring {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
}

.neural-ring svg {
  width: 100%;
  height: 100%;
  animation: rotateSlow 30s linear infinite;
}

.neural-core {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.2), transparent 70%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
  animation: pulse 3s ease-in-out infinite;
}

/* Sections */
section {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
}

.section-desc {
  color: var(--text-muted);
  max-width: 560px;
  margin: 1rem auto 0;
  font-size: 0.95rem;
}

/* About */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.about__avatar {
  position: relative;
}

.avatar-frame {
  aspect-ratio: 1;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--glow);
}

.avatar-frame__inner {
  width: 80%;
  height: 80%;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(139, 92, 246, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(135deg, var(--cyan), var(--violet));
}

.avatar-frame__corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--cyan);
  border-style: solid;
}

.avatar-frame__corner--tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.avatar-frame__corner--br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.about__text p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.about__text p strong {
  color: var(--text);
}

.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.tag {
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(0, 229, 255, 0.04);
  transition: border-color 0.2s, color 0.2s;
}

.tag:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Expertise */
.expertise__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: var(--glow);
}

.card:hover::before {
  opacity: 1;
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(139, 92, 246, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.card__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Blog */
.blog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: transform 0.3s, border-color 0.3s;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
}

.blog-card__cover {
  height: 160px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(139, 92, 246, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
}

.blog-card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 229, 255, 0.03) 2px,
    rgba(0, 229, 255, 0.03) 4px
  );
}

.blog-card__body {
  padding: 1.5rem;
}

.blog-card__meta {
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.blog-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-card__excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--violet);
  transition: gap 0.2s;
}

.blog-card:hover .blog-card__link {
  gap: 0.6rem;
}

/* Tech stack */
.tech__marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.tech__track {
  display: flex;
  gap: 1.2rem;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.tech__item {
  flex-shrink: 0;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-card);
  white-space: nowrap;
}

/* Contact */
.contact {
  padding-bottom: 4rem;
}

.contact__box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3.5rem;
  text-align: center;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.contact__box::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.05), transparent 50%);
  pointer-events: none;
}

.contact__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.contact__desc {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.contact__wechat {
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: center;
}

figure.contact__wechat img.contact__qrcode {
  display: block;
  width: 140px;
  height: 140px;
  max-width: 140px;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.contact__wechat-label {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer span {
  color: var(--cyan);
}

.footer__beian {
  margin-top: 0.6rem;
}

.footer__beian a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer__beian a:hover {
  color: var(--cyan);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Keyframes */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero__visual { display: none; }
  .about__grid { grid-template-columns: 1fr; }
  .expertise__grid,
  .blog__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
  }

  .nav__links.open { display: flex; }

  .nav__links li a {
    display: block;
    padding: 0.8rem 1.5rem;
  }

  .nav__toggle { display: block; }

  .hero__stats { gap: 1.5rem; flex-wrap: wrap; }

  .expertise__grid,
  .blog__grid { grid-template-columns: 1fr; }

  .contact__box { padding: 2rem 1.5rem; }
}
