/* ============================================
   印铭之 / Michael Yin — 个人成长主页样式
   配色：蓝 #2563eb · 青 #06b6d4 · 白 · 橙 #f59e0b
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a5f;

  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;

  --orange-400: #fb923c;
  --orange-500: #f59e0b;

  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 4px 24px rgba(37, 99, 235, 0.08);
  --shadow-card-hover: 0 8px 32px rgba(37, 99, 235, 0.15);
  --transition: 0.3s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
  color: var(--gray-700);
  background: var(--gray-50);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

/* ---------- Utility ---------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue-600);
  margin-bottom: 4px;
}

.section-title .subtitle {
  font-size: 0.95rem;
  color: var(--gray-600);
  font-weight: 400;
}

/* ---------- Fade-in animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(37, 99, 235, 0.08);
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue-600);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-logo .rocket {
  font-size: 1.3rem;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue-500);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--blue-600);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.menu-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, #e0f2fe 0%, #f0f9ff 30%, #ffffff 60%, #ecfeff 100%);
  overflow: hidden;
  padding-top: 64px;
}

/* Floating decorative elements */
.hero-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-decoration .circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
}

.hero-decoration .circle-1 {
  width: 400px;
  height: 400px;
  background: var(--blue-400);
  top: -100px;
  right: -80px;
  animation: floatSlow 8s ease-in-out infinite;
}

.hero-decoration .circle-2 {
  width: 260px;
  height: 260px;
  background: var(--cyan-400);
  bottom: -60px;
  left: -50px;
  animation: floatSlow 10s ease-in-out infinite reverse;
}

.hero-decoration .circle-3 {
  width: 140px;
  height: 140px;
  background: var(--orange-400);
  top: 30%;
  left: 8%;
  animation: floatSlow 7s ease-in-out infinite 1s;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

/* Floating star particles */
.star-particle {
  position: absolute;
  font-size: 14px;
  opacity: 0;
  animation: twinkle 4s ease-in-out infinite;
}

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

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.15);
  margin: 0 auto 28px;
  background: var(--blue-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--blue-500);
  overflow: hidden;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--blue-900);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.hero h1 .wave {
  display: inline-block;
  animation: wave 2.5s ease-in-out infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
}

.hero .tagline {
  font-size: 1.2rem;
  color: var(--gray-600);
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
}

.btn-outline {
  background: #fff;
  color: var(--blue-600);
  border: 2px solid var(--blue-200);
}

.btn-outline:hover {
  background: var(--blue-50);
  border-color: var(--blue-400);
  transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-600);
  font-size: 0.8rem;
  animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator .arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--blue-400);
  border-bottom: 2px solid var(--blue-400);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
section {
  padding: 90px 0;
}

#about {
  background: #fff;
}

.about-card {
  background: linear-gradient(145deg, var(--blue-50), #fff);
  border-radius: var(--radius);
  padding: 48px;
  max-width: 780px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--blue-100);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '💡';
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2rem;
  opacity: 0.15;
}

.about-card p {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--gray-700);
}

.about-card p + p {
  margin-top: 16px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.about-tags .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 50px;
  background: var(--blue-100);
  color: var(--blue-600);
  transition: all var(--transition);
}

.about-tags .tag:hover {
  background: var(--blue-200);
  transform: translateY(-1px);
}

/* ============================================
   INTERESTS SECTION
   ============================================ */
#interests {
  background: var(--gray-50);
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.interest-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
  cursor: default;
}

.interest-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--blue-200);
}

.interest-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: transform var(--transition);
}

.interest-card:hover .interest-icon {
  transform: scale(1.1) rotate(-3deg);
}

.interest-card:nth-child(1) .interest-icon {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.interest-card:nth-child(2) .interest-icon {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.interest-card:nth-child(3) .interest-icon {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.interest-card:nth-child(4) .interest-icon {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
}

.interest-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.interest-card p {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ============================================
   TIMELINE (Growth Journey)
   ============================================ */
#timeline {
  background: #fff;
}

.timeline-wrapper {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding-left: 40px;
}

.timeline-wrapper::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--blue-400), var(--cyan-400));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

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

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 6px;
  width: 18px;
  height: 18px;
  background: #fff;
  border: 3px solid var(--blue-500);
  border-radius: 50%;
  z-index: 2;
  transition: all var(--transition);
}

.timeline-item:hover .timeline-dot {
  background: var(--blue-500);
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.15);
}

.timeline-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-500);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.timeline-card {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}

.timeline-item:hover .timeline-card {
  background: var(--blue-50);
  border-color: var(--blue-200);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.timeline-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* ============================================
   AWARDS & ACHIEVEMENTS
   ============================================ */
#awards {
  background: linear-gradient(165deg, #eff6ff 0%, #f0fdfa 50%, #fefce8 100%);
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.award-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.award-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.award-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--blue-50);
}

.award-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.award-card p {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Optional: award certificate image placeholder */
.award-image-placeholder {
  width: 100%;
  height: 140px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 0.8rem;
  border: 2px dashed var(--gray-200);
}

/* ============================================
   PROJECTS
   ============================================ */
#projects {
  background: #fff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.project-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}

.project-card:not(.expanded):hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.project-thumbnail {
  height: 170px;
  background: linear-gradient(135deg, var(--blue-100), var(--cyan-400));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



.project-info {
  padding: 24px;
}

.project-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.project-info p {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags span {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 50px;
  background: var(--blue-50);
  color: var(--blue-600);
}

/* Placeholder / coming-soon card */
.project-card.coming-soon {
  border: 2px dashed var(--gray-200);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.project-card.coming-soon:hover {
  border-color: var(--blue-300);
  background: var(--blue-50);
  transform: none;
}

.coming-soon-content {
  text-align: center;
  color: var(--gray-600);
}

.coming-soon-content .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.coming-soon-content p {
  font-size: 0.9rem;
}

/* ============================================
   CARD EXPAND (hover zoom to center)
   ============================================ */
.project-card:not(.coming-soon) {
  cursor: pointer;
}

/* 磨砂背景遮罩 */
.card-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1999;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.card-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* 占位元素：卡片飞走后保留原始空间 */
.card-placeholder {
  visibility: hidden;
}

/* 卡片展开态 */
.project-card.expanded {
  position: fixed;
  z-index: 2000;
  transition: top 0.4s cubic-bezier(0.4,0,0.2,1),
              left 0.4s cubic-bezier(0.4,0,0.2,1),
              width 0.4s cubic-bezier(0.4,0,0.2,1),
              height 0.4s cubic-bezier(0.4,0,0.2,1),
              transform 0.4s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.4s ease;
  box-shadow: 0 24px 80px rgba(37, 99, 235, 0.25);
}

.project-card.expanded .project-thumbnail {
  height: 260px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--gray-800);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 32px;
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer .footer-emoji {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.footer p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.footer .copyright {
  font-size: 0.78rem;
  margin-top: 20px;
  opacity: 0.5;
}

.footer a {
  color: var(--cyan-400);
  transition: color var(--transition);
}

.footer a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 8px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--cyan-400) !important;
  transition: all var(--transition);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--cyan-400);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.25);
}

.social-icon {
  flex-shrink: 0;
}

/* ============================================
   RESPONSIVE — Tablet
   ============================================ */
@media (max-width: 900px) {
  .interests-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hero h1 {
    font-size: 2.2rem;
  }
}

/* ============================================
   RESPONSIVE — Mobile
   ============================================ */
@media (max-width: 640px) {
  html {
    scroll-padding-top: 64px;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    border-bottom: 1px solid var(--gray-200);
  }

  .nav-links.open {
    max-height: 340px;
    padding: 16px 0;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  .hero-avatar {
    width: 100px;
    height: 100px;
    font-size: 2.8rem;
  }

  section {
    padding: 60px 0;
  }

  .section-title h2 {
    font-size: 1.6rem;
  }

  .about-card {
    padding: 28px 20px;
  }

  .interests-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .interest-card {
    padding: 24px 16px;
  }

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

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

  .timeline-wrapper {
    padding-left: 32px;
  }

  .timeline-wrapper::before {
    left: 10px;
  }

  .timeline-dot {
    left: -28px;
    width: 14px;
    height: 14px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}
