@charset "utf-8";

:root {
  --bg-deep: #f0f4fa;
  --bg-base: #f8fafc;
  --bg-card: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);
  --text: #1c2433;
  --text-muted: #5c6578;
  --text-dim: #8b95a8;
  --accent: #6366f1;
  --accent-2: #0891b2;
  --accent-3: #a855f7;
  --gradient-main: linear-gradient(135deg, #6366f1 0%, #22d3ee 50%, #a855f7 100%);
  --gradient-text: linear-gradient(135deg, #4f46e5, #0891b2, #9333ea);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 12px 40px rgba(15, 23, 42, 0.1);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: #eef2f8;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

[v-cloak] {
  display: none !important;
}

::selection {
  background: rgba(99, 102, 241, 0.2);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--accent-2);
}

/* ── Background ── */
.bg-layers {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f8 45%, #f0f4fa 100%);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.bg-tech-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
  animation: gridDrift 30s linear infinite;
}

@keyframes gridDrift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 64px 64px, 64px 64px; }
}

.bg-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(99, 102, 241, 0.018) 3px,
    rgba(99, 102, 241, 0.018) 4px
  );
  background-size: 100% 4px;
  animation: scanMove 10s linear infinite;
}

@keyframes scanMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 4px; }
}

.bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
  width: 520px;
  height: 520px;
  background: rgba(129, 140, 248, 0.35);
  top: -12%;
  left: -6%;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: rgba(34, 211, 238, 0.28);
  top: 28%;
  right: -10%;
  animation-delay: -7s;
}

.orb-3 {
  width: 360px;
  height: 360px;
  background: rgba(192, 132, 252, 0.22);
  bottom: 8%;
  left: 28%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Layout ── */
.resume-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  isolation: isolate;
}

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

/* ── Hero ── */
.resume-hero {
  padding: 48px 0 32px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 36px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 999px;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-info {
  flex: 1;
  min-width: 0;
}

.hero-name {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-meta {
  margin-top: 14px;
}

.meta-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.04);
  border-radius: 6px;
}

.hero-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.82rem;
  color: var(--text-muted) !important;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.25s var(--ease);
}

.contact-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.7;
}

.contact-link:hover {
  color: var(--accent) !important;
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.hero-avatar {
  flex-shrink: 0;
}

.hero-avatar img {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}

/* ── Main sections ── */
.resume-main {
  padding-bottom: 64px;
}

.resume-section {
  margin-bottom: 28px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s var(--ease);
}

.resume-section:hover {
  box-shadow: var(--shadow-card-hover);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-bounce);
}

.resume-section:hover .section-icon {
  transform: scale(1.1) rotate(-4deg);
}

.section-icon svg {
  width: 18px;
  height: 18px;
}

.section-icon--work {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
}

.section-icon--edu {
  color: var(--accent-2);
  background: rgba(8, 145, 178, 0.1);
}

.section-icon--skill {
  color: var(--accent-3);
  background: rgba(168, 85, 247, 0.1);
}

.section-icon--oss {
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
}

.section-icon--project {
  color: #d97706;
  background: rgba(217, 119, 6, 0.1);
}

.section-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
  border-radius: 2px;
  opacity: 0.35;
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -28px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.timeline-card {
  padding: 18px 20px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.25s var(--ease);
}

.timeline-card:hover {
  background: rgba(99, 102, 241, 0.03);
  border-color: rgba(99, 102, 241, 0.15);
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.timeline-date {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  padding: 3px 10px;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 6px;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ── Skills ── */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}

.skill-tag {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(8, 145, 178, 0.06));
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.25s var(--ease);
}

.skill-tag:hover {
  color: var(--accent);
  border-color: rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-1px);
}

/* ── Projects ── */
.project-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
}

.project-card {
  padding: 20px 22px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.25s var(--ease);
}

.project-card:hover {
  background: rgba(99, 102, 241, 0.03);
  border-color: rgba(99, 102, 241, 0.15);
  transform: translateX(4px);
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.project-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.project-date {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ── Responsive ── */
@media screen and (max-width: 640px) {
  .resume-hero {
    padding: 24px 0 16px;
  }

  .hero-inner {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    padding: 28px 24px;
    gap: 24px;
  }

  .hero-contacts {
    justify-content: center;
  }

  .hero-avatar img {
    width: 96px;
    height: 96px;
  }

  .resume-section {
    padding: 22px 20px;
  }

  .timeline-header,
  .project-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .timeline-date,
  .project-date {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-tech-canvas,
  .bg-grid,
  .bg-scanline,
  .orb,
  .hero-badge-dot {
    animation: none !important;
    display: none;
  }
}

@media print {
  .bg-layers {
    display: none;
  }

  body {
    background: white;
  }

  .resume-hero {
    padding: 0;
  }

  .hero-inner,
  .resume-section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .contact-link:hover,
  .skill-tag:hover,
  .project-card:hover,
  .timeline-card:hover {
    transform: none;
  }
}
