:root {
  --bg: #120307;
  --bg-2: #24060d;
  --card: rgba(47, 10, 19, 0.62);
  --card-2: rgba(58, 13, 24, 0.48);
  --text: #ffedf0;
  --muted: #ffb8c2;
  --accent: #ff4f70;
  --accent-2: #ff274f;
  --accent-3: #ff8e9f;
  --border: rgba(255, 122, 145, 0.35);
  --shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
  --glow: 0 0 42px rgba(255, 79, 112, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 12% 8%, #842138 0, transparent 40%),
    radial-gradient(circle at 88% 2%, #c0143e 0, transparent 33%),
    radial-gradient(circle at 70% 80%, #7e1731 0, transparent 35%),
    linear-gradient(145deg, var(--bg), var(--bg-2)), var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000 36%, transparent 86%);
  opacity: 0.16;
}

body::after {
  background: radial-gradient(circle at 50% -20%, rgba(255, 77, 109, 0.2), transparent 50%),
    radial-gradient(circle at 25% 110%, rgba(255, 123, 137, 0.14), transparent 48%);
  transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0);
  transition: transform 0.2s linear;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: linear-gradient(
    to bottom,
    rgba(13, 3, 6, 0.8),
    rgba(13, 3, 6, 0.25),
    transparent
  );
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
}

.brand {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
}

.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.nav a:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}

main.container {
  padding-top: 28px;
  padding-bottom: 80px;
}

.hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  animation: fade-up 0.9s ease forwards;
  margin-top: 16px;
}

.hero::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 77, 109, 0.45), rgba(255, 77, 109, 0));
  filter: blur(12px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    380px circle at var(--mx, 70%) var(--my, 20%),
    rgba(255, 138, 153, 0.2),
    transparent 55%
  );
}

.badge {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid rgba(255, 138, 153, 0.55);
  border-radius: 999px;
  color: #ffd9df;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  background: rgba(255, 77, 109, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

h1 {
  margin: 16px 0 10px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.1;
  text-shadow: 0 4px 30px rgba(255, 77, 109, 0.45);
}

.subtitle {
  margin: 0;
  font-size: clamp(17px, 2.6vw, 22px);
  color: var(--muted);
  font-weight: 500;
}

.intro {
  margin: 24px 0 0;
  line-height: 1.9;
  font-size: 16px;
  color: #ffd6dc;
  max-width: 740px;
}

.actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stats {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.stat h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.stat p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.btn {
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    filter 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn .ripple {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.55s ease-out forwards;
  pointer-events: none;
  z-index: 0;
}

.btn > span {
  position: relative;
  z-index: 1;
}

.btn-primary {
  color: white;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px rgba(255, 77, 109, 0.36), var(--glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 145, 160, 0.62);
  background: rgba(255, 93, 118, 0.12);
}

.grid {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

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

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

.section {
  margin-top: 42px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 34px);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  opacity: 0;
  transform: translateY(16px);
}

.card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 145, 160, 0.62);
  box-shadow: 0 10px 28px rgba(125, 18, 45, 0.4);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: #ffe3e7;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.tag {
  margin: 0 0 8px;
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffd3db;
  border: 1px solid rgba(255, 132, 150, 0.5);
  background: rgba(255, 79, 112, 0.14);
}

.project h3 {
  margin-bottom: 10px;
}

.skills {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills span {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 14px;
  color: #ffd8de;
  font-size: 13px;
  transition: 0.2s ease;
}

.skills span:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 143, 159, 0.65);
  background: rgba(255, 93, 118, 0.14);
}

.timeline {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(rgba(255, 109, 132, 0.6), rgba(255, 109, 132, 0.1));
}

.timeline-item {
  padding-left: 30px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 24px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
}

footer {
  margin-top: 38px;
  text-align: center;
  color: #d7929e;
  font-size: 13px;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(16);
    opacity: 0;
  }
}

@media (max-width: 800px) {
  .nav {
    display: none;
  }

  .hero {
    padding: 28px 22px;
  }

  .cols-3,
  .cols-2 {
    grid-template-columns: 1fr;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
