:root {
  --bg: #080b12;
  --bg-soft: #0e1420;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f4f7ff;
  --muted: #98a5bb;
  --primary: #7c6cff;
  --primary-2: #00d4ff;
  --accent: #ff5d8f;
  --green: #3ddc97;
  --header-bg: rgba(8, 11, 18, 0.76);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --container: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-soft: #ffffff;
  --surface: rgba(18, 26, 48, 0.04);
  --surface-strong: rgba(18, 26, 48, 0.07);
  --border: rgba(18, 26, 48, 0.1);
  --text: #141a2a;
  --muted: #667085;
  --primary: #6354e8;
  --primary-2: #008fbd;
  --accent: #e14373;
  --green: #119c6b;
  --header-bg: rgba(247, 248, 252, 0.82);
  --shadow: 0 24px 70px rgba(30, 41, 80, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(124, 108, 255, 0.18), transparent 34%),
    radial-gradient(circle at 88% 22%, rgba(0, 212, 255, 0.13), transparent 32%),
    radial-gradient(circle at 55% 85%, rgba(255, 93, 143, 0.1), transparent 38%);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(circle at 12% 8%, rgba(124, 108, 255, 0.12), transparent 34%),
    radial-gradient(circle at 88% 22%, rgba(0, 143, 189, 0.1), transparent 32%),
    radial-gradient(circle at 55% 85%, rgba(225, 67, 115, 0.07), transparent 38%);
}

.background-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(124, 108, 255, 0.35); color: var(--text); }

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 24px rgba(124, 108, 255, 0.3);
}
.brand-text { font-size: 15px; font-weight: 800; letter-spacing: 0.06em; }
.brand-text span { color: var(--primary-2); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  position: relative;
  padding: 6px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width 0.25s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  background: var(--surface);
  transition: background 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { background: var(--surface-strong); transform: rotate(12deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.header-cta {
  padding: 9px 17px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #5a48e6);
  box-shadow: 0 8px 24px rgba(124, 108, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.header-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(124, 108, 255, 0.35); }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Shared */
.section { padding: 112px 0; position: relative; }
.section-heading { max-width: 620px; margin-bottom: 48px; }
.section-heading-row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.section-heading-row p { max-width: 380px; margin: 0 0 6px; }
.section-label {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--primary-2);
}
.section-heading h2,
.about-card h2,
.contact-intro h2 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.section-heading p,
.about-card p,
.contact-intro p { margin: 0; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn span { transition: transform 0.2s ease; }
.btn:hover span { transform: translateX(4px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #5a48e6);
  box-shadow: 0 12px 32px rgba(124, 108, 255, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(124, 108, 255, 0.38); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-strong); }
.btn-block { width: 100%; }

.text-link {
  display: inline-flex;
  gap: 8px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-2);
}
.text-link:hover span { transform: translateX(4px); }
.text-link span { transition: transform 0.2s ease; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* Hero */
.hero {
  min-height: calc(100vh - 72px);
  padding-top: 72px;
  padding-bottom: 96px;
  display: flex;
  align-items: center;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 64px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.14);
  animation: pulse 2s infinite;
}
.hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  line-height: 1.12;
  letter-spacing: -0.05em;
}
.gradient-text {
  background: linear-gradient(100deg, var(--primary-2), var(--primary) 55%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead { max-width: 540px; margin: 0; color: var(--muted); font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 38px;
  margin: 48px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats dt { font-size: 28px; font-weight: 800; line-height: 1.2; }
.hero-stats dd { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.hero-visual { position: relative; padding: 26px 0; }
.editor-window {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(20, 27, 45, 0.96), rgba(11, 15, 25, 0.98));
  box-shadow: var(--shadow);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
}
[data-theme="light"] .editor-window {
  background: linear-gradient(160deg, #1b2338, #0d1322);
}
.editor-bar,
.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 11px;
  color: #7e8aa3;
}
.editor-bar { border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.editor-footer { gap: 12px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.window-dots i:nth-child(2) { background: #febc2e; }
.window-dots i:nth-child(3) { background: #28c840; }
.editor-file { margin-right: auto; margin-left: 16px; color: #b6c0d4; }
.editor-sync { color: #4ade9c; }
.editor-body { display: flex; min-height: 280px; padding: 20px 18px; }
.line-numbers {
  padding-right: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  color: #4b5670;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.9;
  text-align: right;
  user-select: none;
}
.editor-body pre {
  margin: 0;
  padding-left: 18px;
  color: #c9d6e5;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}
.caret {
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--primary-2);
  animation: blink 1s step-end infinite;
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  animation: float 5s ease-in-out infinite;
}
.float-card strong { display: block; font-size: 13px; }
.float-card small { display: block; font-size: 11px; color: var(--muted); }
.float-one { top: 2px; right: -18px; }
.float-two { bottom: 0; left: -22px; animation-delay: -2.5s; }
.float-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #07130e;
  background: var(--green);
  font-weight: 800;
}
.pulse-ring {
  width: 12px;
  height: 12px;
  margin-inline: 9px;
  border-radius: 50%;
  background: var(--primary-2);
  box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.15);
}

.scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.scroll-hint span {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--primary-2), transparent);
  animation: scrollLine 2s infinite;
}

/* Services */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-card {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s ease, background 0.3s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(124, 108, 255, 0.45);
  background: var(--surface-strong);
}
.service-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 14px;
}
.service-icon svg { width: 24px; height: 24px; }
.icon-purple { color: #a99cff; background: rgba(124, 108, 255, 0.14); }
.icon-blue { color: #5ddcff; background: rgba(0, 212, 255, 0.13); }
.icon-pink { color: #ff89ad; background: rgba(255, 93, 143, 0.13); }
.icon-green { color: #6ee7b7; background: rgba(61, 220, 151, 0.13); }
.service-card h3 { margin: 0 0 10px; font-size: 18px; }
.service-card p { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.service-card ul { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.service-card li {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
}

/* Skills */
.skills-section { background: var(--surface); border-block: 1px solid var(--border); }
.skills-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 80px; align-items: center; }
.skill-groups { display: grid; gap: 26px; }
.skill-group {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.skill-group h3 { margin: 0 0 22px; font-size: 16px; }
.skill-item + .skill-item { margin-top: 18px; }
.skill-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.skill-head span:first-child { color: var(--text); font-weight: 600; }
.bar { height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-strong); }
.bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width 1.1s var(--ease);
}
.skills-section .reveal.visible .bar span { width: var(--level); }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s ease;
}
.project-card:hover { transform: translateY(-8px); border-color: rgba(0, 212, 255, 0.35); }
.project-visual {
  position: relative;
  height: 188px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.visual-a { background: linear-gradient(135deg, #4c3ddb, #7b61ff 55%, #b06cff); }
.visual-b { background: linear-gradient(135deg, #0a7f9e, #00b4d8 55%, #48cae4); }
.visual-c { background: linear-gradient(135deg, #b82c68, #f45d8c 55%, #ff9a76); }
.project-visual::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 62%);
}
.mock-badge {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #fff;
}
.mock-browser {
  position: relative;
  width: 74%;
  height: 108px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: rotate(-4deg);
}
.mock-browser > span { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #e5e7eb; }
.mock-line { height: 9px; margin-top: 22px; border-radius: 4px; background: linear-gradient(90deg, #7c6cff, #c4b5fd); }
.mock-line.short { width: 60%; margin-top: 9px; background: #e5e7eb; }
.mock-board { display: flex; gap: 10px; transform: rotate(3deg); }
.mock-board span {
  width: 46px;
  height: 100px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
}
.mock-board span:nth-child(2) { height: 78px; }
.mock-board span:nth-child(3) { height: 116px; }
.mock-board span:nth-child(4) { height: 64px; }
.mock-chart { display: flex; align-items: flex-end; gap: 10px; height: 110px; transform: rotate(-2deg); }
.mock-chart i { width: 18px; border-radius: 6px 6px 2px 2px; background: rgba(255, 255, 255, 0.9); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14); }
.mock-chart i:nth-child(1) { height: 35%; }
.mock-chart i:nth-child(2) { height: 58%; }
.mock-chart i:nth-child(3) { height: 45%; }
.mock-chart i:nth-child(4) { height: 82%; }
.mock-chart i:nth-child(5) { height: 64%; }
.mock-chart i:nth-child(6) { height: 100%; }
.mock-chart i:nth-child(7) { height: 76%; }
.project-content { padding: 24px; }
.project-meta { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 11px; color: var(--muted); }
.project-meta span:first-child { color: var(--primary-2); font-weight: 700; }
.project-content h3 { margin: 0 0 10px; font-size: 18px; }
.project-content p { margin: 0 0 18px; min-height: 66px; font-size: 13px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span {
  padding: 4px 9px;
  border-radius: 7px;
  background: var(--surface-strong);
  font-size: 11px;
  color: var(--muted);
}
.project-link {
  display: inline-flex;
  gap: 8px;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-2);
}
.project-link:hover span { transform: translateX(4px); }
.project-link span { transition: transform 0.2s ease; }

/* About */
.about-section { background: var(--surface); border-block: 1px solid var(--border); }
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-card p + p { margin-top: 16px; }
.about-card .btn { margin-top: 30px; }
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 1px;
  background: linear-gradient(var(--primary), var(--primary-2), transparent);
}
.timeline-item { position: relative; padding-bottom: 30px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  top: 7px;
  left: -29px;
  width: 11px;
  height: 11px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
.timeline-year { margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--primary-2); }
.timeline-item h3 { margin: 0 0 7px; font-size: 16px; }
.timeline-item p { margin: 0; font-size: 13px; color: var(--muted); }

/* Contact */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.contact-email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 380px;
  margin-top: 34px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.contact-email span { display: block; margin-bottom: 4px; font-size: 11px; color: var(--muted); }
.contact-email strong { font-size: 16px; }
.copy-btn {
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-strong);
  font-size: 12px;
  transition: background 0.2s ease;
}
.copy-btn:hover { background: var(--surface-strong); }
.contact-form {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: var(--bg-soft);
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: 0.7; }
.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.15);
}
.form-note { margin: 14px 0 0; font-size: 11px; color: var(--muted); text-align: center; }

/* Footer */
.site-footer { padding: 30px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-inner p { margin: 0; font-size: 12px; color: var(--muted); }
.footer-inner p a:hover { color: var(--text); }
.footer-inner > a:last-child { font-size: 12px; color: var(--muted); }
.footer-inner > a:last-child:hover { color: var(--text); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  padding: 11px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Animations */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.14); }
  50% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0.04); }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Responsive */
@media (max-width: 1080px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-layout,
  .about-layout { gap: 48px; }
  .nav-links { gap: 18px; }
}

@media (max-width: 900px) {
  .section { padding: 88px 0; }
  .hero { min-height: auto; padding-top: 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-copy { max-width: 680px; }
  .editor-window { transform: none; }
  .float-one { right: 4px; }
  .float-two { left: 4px; }
  .skills-layout,
  .about-layout,
  .contact-layout { grid-template-columns: 1fr; }
  .skills-layout,
  .about-layout,
  .contact-layout { gap: 48px; }
  .section-heading-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .section-heading-row p { max-width: 600px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .container { width: min(100% - 36px, var(--container)); }
  .header-cta { display: none; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 18px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--header-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--border); font-size: 15px; }
  .nav-links a::after { display: none; }
  .hero h1 { font-size: clamp(2.3rem, 10vw, 3.4rem); }
  .hero-stats { gap: 26px; }
  .hero-stats dt { font-size: 24px; }
  .project-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .section { padding: 72px 0; }
  .hero { padding-top: 48px; padding-bottom: 72px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { justify-content: space-between; gap: 12px; }
  .hero-stats div { flex: 1; text-align: center; }
  .editor-body { min-height: 240px; padding: 16px 12px; }
  .editor-body pre, .line-numbers { font-size: 11px; }
  .float-card { padding: 9px 12px; }
  .float-card small { display: none; }
  .float-one { top: -14px; }
  .float-two { bottom: -14px; }
  .service-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 22px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-email { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .bar span { width: var(--level); }
}
