:root {
  --bg: #08111f;
  --bg-soft: rgba(15, 23, 42, 0.72);
  --panel: rgba(15, 23, 42, 0.78);
  --text: #e5eefc;
  --muted: #9fb0c9;
  --line: rgba(148, 163, 184, 0.18);
  --primary: #60a5fa;
  --primary-2: #22d3ee;
  --accent: #a78bfa;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --max: 1120px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(167, 139, 250, 0.14), transparent 24%),
    linear-gradient(180deg, #07101c 0%, #0b1526 45%, #08111f 100%);
  min-height: 100vh;
  line-height: 1.6;
}

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

img {
  max-width: 100%;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.bg-grid,
.glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.bg-grid {
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 85%);
}

.glow {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
}

.glow-a {
  top: 10%;
  left: 8%;
  background: rgba(34, 211, 238, 0.18);
}

.glow-b {
  top: 30%;
  right: 5%;
  background: rgba(96, 165, 250, 0.16);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(8, 17, 31, 0.92);
  border-bottom: 1px solid var(--line);
}

.nav {
  position: relative;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.logo span {
  color: var(--primary-2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  z-index: 2;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.section {
  padding: 5.5rem 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 2rem;
}

.section-head.left {
  margin-bottom: 0;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--primary-2);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

h1 span {
  background: linear-gradient(135deg, var(--primary), var(--primary-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 0.7rem;
}

h3 {
  margin-bottom: 0.8rem;
}

.lead,
.section-head p,
.panel p,
.project-card p,
.hero-card p {
  color: var(--muted);
}

.hero-grid,
.about-grid,
.project-grid,
.skills-grid,
.contact-grid {
  display: grid;
  gap: 1.25rem;
}

.hero-grid {
  grid-template-columns: 1.3fr 0.9fr;
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.6rem 0 1.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #041018;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.22);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.55);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.hero-meta div,
.panel,
.project-card,
.hero-card,
.contact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-meta div {
  padding: 1rem;
}

.hero-meta strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.hero-meta span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-card {
  padding: 1.6rem;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.3), rgba(34, 211, 238, 0.28));
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.checklist,
.list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.checklist li,
.list li {
  margin-bottom: 0.45rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.2rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.18);
  color: var(--muted);
  font-size: 0.92rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.12);
}

.about-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.panel,
.project-card {
  padding: 1.4rem;
}

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

.project-top {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.tag {
  width: fit-content;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.18);
  font-size: 0.84rem;
}

.tech,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tech span,
.chips span {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.card-links {
  margin-top: 1.1rem;
}

.card-links a {
  color: var(--primary-2);
  font-weight: 600;
}

.skills-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-grid {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
}

.contact-cards {
  display: grid;
  gap: 0.9rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.2rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.35);
}

.contact-card span {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-row p {
  margin: 0;
}

@media (max-width: 920px) {
  .hero-grid,
  .about-grid,
  .project-grid,
  .skills-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    z-index: 200;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.85rem;
    border-radius: 18px;
    background: #0b1526;
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    isolation: isolate;
  }

  .nav-links a {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    color: var(--text);
    background: transparent;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(96, 165, 250, 0.14);
    color: var(--text);
  }

  .nav-links.open {
    display: flex;
  }

  .footer-row {
    flex-direction: column;
  }
}