/* ==========================================================================
   Yi Li Personal Website - Modern Design System
   Inspired by lscodes.com with emerald accent
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Typography */
  --font-heading: 'Montserrat', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Colors - Light Mode */
  --color-primary: #0a3b68;
  /* Deep Navy for headings */
  --color-text: #545454;
  /* Grey for body text */
  --color-text-light: #6b7280;
  /* Lighter grey */
  --color-accent: #10b981;
  /* Emerald accent */
  --color-accent-light: #d1fae5;
  /* Light emerald */
  --color-bg: #ffffff;
  /* White background */
  --color-bg-subtle: #f8fafc;
  /* Subtle grey background */
  --color-border: #e5e7eb;
  /* Light border */
  --color-card-bg: #ffffff;
  --color-card-shadow: rgba(0, 0, 0, 0.08);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Dark Mode Variables */
.dark-mode {
  --color-primary: #60a5fa;
  /* Light blue for dark mode */
  --color-text: #e5e7eb;
  --color-text-light: #9ca3af;
  --color-accent: #34d399;
  --color-accent-light: #065f46;
  --color-bg: #0f172a;
  --color-bg-subtle: #1e293b;
  --color-border: #334155;
  --color-card-bg: #1e293b;
  --color-card-shadow: rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   Projects Section - Tag Filter & Grid
   -------------------------------------------------------------------------- */

/* Container */
.projects-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

/* Section Header */
.projects-header {
  margin-bottom: var(--space-2xl);
}

.projects-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.projects-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-light);
  max-width: 600px;
}

/* Tag Filter Bar */
.tag-filter-container {
  margin-bottom: var(--space-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tag-filter-container::-webkit-scrollbar {
  display: none;
}

.tag-filter {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
  flex-wrap: wrap;
}

.tag-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tag-btn:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.tag-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
}

.tag-btn .tag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 var(--space-xs);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-full);
}

.tag-btn.active .tag-count {
  background: rgba(255, 255, 255, 0.2);
}

/* Project Cards Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Project Card */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--color-card-shadow);
  border-color: var(--color-accent);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card.hidden {
  display: none;
}

/* Card Header */
.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.project-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0;
  line-height: 1.3;
}

.project-card-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-text-light);
  background: var(--color-bg-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.project-card-link:hover {
  color: var(--color-accent);
  background: var(--color-accent-light);
}

.project-card-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Card Description */
.project-card-description {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

/* Card Tags */
.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: auto;
}

.project-tag {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.project-tag:hover {
  background: var(--color-accent);
  color: #ffffff;
  cursor: pointer;
}

/* Empty State */
.projects-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-2xl);
  color: var(--color-text-light);
}

.projects-empty-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto var(--space-md);
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Animation Classes
   -------------------------------------------------------------------------- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card {
  animation: fadeInUp 0.4s ease forwards;
}

.project-card:nth-child(1) {
  animation-delay: 0ms;
}

.project-card:nth-child(2) {
  animation-delay: 50ms;
}

.project-card:nth-child(3) {
  animation-delay: 100ms;
}

.project-card:nth-child(4) {
  animation-delay: 150ms;
}

.project-card:nth-child(5) {
  animation-delay: 200ms;
}

.project-card:nth-child(6) {
  animation-delay: 250ms;
}

/* --------------------------------------------------------------------------
   About Me & CV Section - Merged Redesign
   -------------------------------------------------------------------------- */

/* Container */
.about-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 24px;
}

/* Hero Section */
.about-hero {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 48px;
}

.about-hero-photo {
  width: 140px;
  height: 140px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--color-accent) 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

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

.about-hero-placeholder {
  color: white;
  font-size: 40px;
  font-weight: 700;
}

.about-hero-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

.about-hero-subtitle {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.about-hero-hook {
  color: var(--color-text);
  font-size: 1.15rem;
  max-width: 520px;
  line-height: 1.7;
}

/* About Intro Section - Steipete.me Style */
.about-intro {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 48px;
}

.about-intro-photo {
  width: 280px;
  height: 320px;
  border-radius: 16px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.about-intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-intro-text {
  flex: 1;
  padding-top: 8px;
}

.about-intro-text p {
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.75;
  margin-bottom: 20px;
}

.about-intro-text p:first-child {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-primary);
}

.about-intro-text p:last-child {
  margin-bottom: 0;
}

.about-intro-text em {
  color: var(--color-accent);
  font-style: italic;
}

/* Impact Stats Row */
.about-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.about-stat-card {
  background: var(--color-card-bg);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 3px var(--color-card-shadow);
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}

.about-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-card-shadow);
}

.about-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 6px;
}

.about-stat-label {
  font-size: 0.8rem;
  color: var(--color-text-light);
  font-weight: 500;
}

/* Section Divider */
.about-divider {
  margin: 48px 0;
  text-align: center;
}

.about-divider-line {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.about-divider-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

/* Expertise Tags */
.about-expertise {
  margin-bottom: 48px;
}

.about-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
  margin-bottom: 16px;
  font-weight: 600;
}

.about-expertise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.about-tag {
  padding: 10px 18px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  transition: all 0.2s;
}

.about-tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Two Column Layout */
.about-two-col {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}

/* Section Headers */
.about-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.about-section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.about-section-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-accent) 0%, #059669 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

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

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

.about-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

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

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

.about-timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-border);
  border: 3px solid var(--color-bg);
}

.about-timeline-item.current .about-timeline-dot {
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.about-timeline-date {
  font-size: 0.75rem;
  color: var(--color-text-light);
  font-weight: 600;
  margin-bottom: 4px;
  font-family: monospace;
}

.about-timeline-item.current .about-timeline-date {
  color: var(--color-accent);
}

.about-timeline-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 2px;
}

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

.about-timeline-desc {
  font-size: 0.8rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.company-logo {
  font-size: 1.1rem;
  margin-right: 4px;
  vertical-align: middle;
}

/* Education Badge */
.about-education-badge {
  background: linear-gradient(135deg, var(--color-accent-light) 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 16px;
  margin-top: 24px;
}

.about-badge-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #059669;
  font-weight: 600;
  margin-bottom: 8px;
}

.about-badge-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.about-badge-school {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.about-badge-note {
  font-size: 0.8rem;
  color: var(--color-accent);
  margin-top: 4px;
}

/* About Project Cards */
.about-projects-grid {
  display: grid;
  gap: 16px;
}

.about-project-card {
  background: var(--color-card-bg);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}

.about-project-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.about-project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.about-project-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.about-project-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.about-project-icon.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-accent);
}

.about-project-icon.blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.about-project-icon.purple {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.about-project-icon svg {
  width: 16px;
  height: 16px;
}

.about-project-desc {
  font-size: 0.85rem;
  color: var(--color-text);
  margin-bottom: 12px;
  line-height: 1.5;
}

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

.about-project-tag {
  padding: 4px 10px;
  background: var(--color-bg-subtle);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-accent);
  font-family: monospace;
}

/* Publications */


.about-publications h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-primary);
}

.about-pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-pub-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-bg-subtle);
}

.about-pub-item:last-child {
  border-bottom: none;
}

.about-pub-year {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 600;
  flex-shrink: 0;
  width: 48px;
}

.about-pub-text {
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.5;
}

.about-pub-text em {
  color: var(--color-text-light);
}

/* Publication Links */
.about-pub-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: 1;
  transition: all 0.2s;
}

.about-pub-link:hover .about-pub-text {
  color: var(--color-accent);
}

.about-pub-link:hover .about-pub-download {
  color: var(--color-accent);
  transform: translateY(2px);
}

.about-pub-download {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-text-light);
  transition: all 0.2s;
}


/* Connect Section */
.about-connect {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.about-connect-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text-light);
  text-decoration: none;
  transition: all 0.2s;
}

.about-connect-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.about-connect-btn svg {
  width: 22px;
  height: 22px;
}

/* Responsive - About Page */
@media (max-width: 768px) {
  .about-hero {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .about-hero-hook {
    max-width: 100%;
  }

  .about-intro {
    flex-direction: column;
    align-items: center;
  }

  .about-intro-photo {
    width: 200px;
    height: 240px;
  }

  .about-intro-text {
    text-align: center;
  }

  .about-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-two-col {
    grid-template-columns: 1fr;
  }

  .about-journey {
    flex-direction: column;
    gap: 24px;
  }

  .about-journey-quote {
    text-align: center;
    padding: 20px;
  }
}

/* --------------------------------------------------------------------------
   Journey Section Styles
   -------------------------------------------------------------------------- */

/* Journey Section */
.about-journey {
  display: flex;
  gap: 32px;
  margin-bottom: 48px;
  padding: 32px;
  background: linear-gradient(135deg, var(--color-accent-light) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Quote Card */
.about-journey-quote {
  flex-shrink: 0;
  width: 280px;
  padding: 28px;
  background: var(--color-card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  text-align: center;
  font-style: italic;
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.6;
  position: relative;
}

.about-journey-quote-mark {
  font-size: 2.5rem;
  color: var(--color-accent);
  font-family: Georgia, serif;
  line-height: 0;
  vertical-align: top;
}

.about-journey-quote-source {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 16px;
  font-style: normal;
  font-weight: 600;
}

/* Journey Content */
.about-journey-content {
  flex: 1;
}

.about-journey-content p {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-journey-content p:last-child {
  margin-bottom: 0;
}

.about-journey-content strong {
  color: var(--color-accent);
  font-weight: 600;
}

/* Highlighted Expertise Tags */
.about-tag.highlight {
  background: linear-gradient(135deg, var(--color-accent) 0%, #059669 100%);
  color: white;
  border-color: transparent;
  font-weight: 600;
}

.about-tag.highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}