/* Unified Card Layout for Publications, Projects, and Experience */

/* Common card styles */
.pub-card,
.project-card,
.exp-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  transition: border-color 0.2s ease;
}

.pub-card:hover,
.project-card:hover,
.exp-card:hover {
  border-color: #3949ab;
}

/* List containers */
.pub-list,
.project-list,
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.exp-list {
  gap: 0.875rem;
}

/* Publications section header */
.pub-links {
  margin: 1rem 0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pub-links a {
  color: #3949ab;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  border: 1px solid #3949ab;
  border-radius: 16px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.pub-links a:hover {
  background: #3949ab;
  color: #fff;
  text-decoration: none;
}

.pub-note {
  font-size: 0.9rem;
  color: #666;
  margin-top: -0.5rem;
  margin-bottom: 0.75rem;
}

/* Publication title */
.pub-title {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
  letter-spacing: 0.01em;
}

/* Award badge */
.award-badge {
  display: block;
  color: #dc2626;
  font-size: 0.85em;
  font-style: italic;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Publication authors */
.pub-authors {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #4a4a4a;
  margin-bottom: 0.4rem;
  letter-spacing: 0.005em;
}

.pub-authors strong {
  color: #1a1a1a;
  font-weight: 600;
}

/* Publication venue */
.pub-venue {
  margin-bottom: 0.5rem;
}

.venue-badge {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: "Alegreya Sans SC", sans-serif;
  letter-spacing: 0.02em;
}

.venue-badge.conf {
  background: #e8eaf6;
  color: #3949ab;
}

.venue-badge.preprint {
  background: #f3f4f6;
  color: #6b7280;
}

/* Publication buttons */
.pub-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.pub-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #4b5563;
  font-family: "Alegreya Sans SC", sans-serif;
  letter-spacing: 0.08em;
}

.pub-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #1f2937;
}

.pub-btn.active {
  background: #e5e7eb;
  border-color: #6b7280;
  color: #111827;
}

/* Arxiv button */
.btn-arxiv {
  background: #f9fafb;
  color: #4b5563;
  border-color: #d1d5db;
}

.btn-arxiv:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #1f2937;
}

/* Code button */
.btn-code {
  background: #f9fafb;
  color: #4b5563;
  border-color: #d1d5db;
}

.btn-code:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #1f2937;
}

/* Abstract section */
.pub-abstract {
  margin-top: 0.75rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #374151;
}

.pub-abstract.hidden {
  display: none;
}

/* BibTeX section */
.pub-bibtex {
  margin-top: 0.75rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
  overflow-x: auto;
}

.pub-bibtex.hidden {
  display: none;
}

/* Project header */
.project-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.project-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1a1a1a;
}

.project-badges {
  display: flex;
  gap: 0.4rem;
}

.project-badges img {
  height: 18px;
}

/* Project description */
.project-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #4a4a4a;
  letter-spacing: 0.005em;
}

/* Experience card */
.exp-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.exp-date {
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.exp-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.exp-mentor {
  font-size: 0.95rem;
  color: #4a4a4a;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.exp-mentor a {
  color: #3949ab;
}

.exp-mentor a:hover {
  color: #283593;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .pub-card,
  .project-card,
  .exp-card {
    background: #2a2b36;
    border-color: #3a3b46;
  }

  .pub-card:hover,
  .project-card:hover,
  .exp-card:hover {
    border-color: #7986cb;
  }

  .pub-title,
  .project-name,
  .exp-title {
    color: #f3f4f6;
  }

  .pub-authors,
  .project-desc,
  .exp-mentor {
    color: #a1a1aa;
  }

  .pub-authors strong {
    color: #f3f4f6;
  }

  .award-badge {
    color: #f87171;
  }

  .pub-note {
    color: #9ca3af;
  }

  .pub-links a {
    color: #7986cb;
    border-color: #7986cb;
  }

  .pub-links a:hover {
    background: #7986cb;
    color: #1f2937;
  }

  .venue-badge.conf {
    background: rgba(121, 134, 203, 0.15);
    color: #c5cae9;
  }

  .venue-badge.preprint {
    background: rgba(156, 163, 175, 0.15);
    color: #d1d5db;
  }

  .exp-date {
    color: #9ca3af;
  }

  .exp-mentor a {
    color: #7986cb;
  }

  .exp-mentor a:hover {
    color: #9fa8da;
  }

  /* Dark mode buttons */
  .pub-btn {
    background: #2a2b36;
    color: #d1d5db;
    border-color: #4b5563;
  }

  .pub-btn:hover {
    background: #374151;
    border-color: #6b7280;
    color: #f3f4f6;
  }

  .pub-btn.active {
    background: #4b5563;
    border-color: #9ca3af;
    color: #fff;
  }

  .pub-abstract {
    background: #2a2b36;
    color: #d1d5db;
    border-color: #3a3b46;
  }

  .pub-bibtex {
    background: #2a2b36;
    color: #d1d5db;
    border-color: #3a3b46;
  }

[data-theme="dark"] .pub-card,
[data-theme="dark"] .project-card,
[data-theme="dark"] .exp-card {
  background: #2a2b36;
  border-color: #3a3b46;
}

[data-theme="dark"] .pub-card:hover,
[data-theme="dark"] .project-card:hover,
[data-theme="dark"] .exp-card:hover {
  border-color: #7986cb;
}

[data-theme="dark"] .pub-title,
[data-theme="dark"] .project-name,
[data-theme="dark"] .exp-title {
  color: #f3f4f6;
}

[data-theme="dark"] .pub-authors,
[data-theme="dark"] .project-desc,
[data-theme="dark"] .exp-mentor {
  color: #a1a1aa;
}

[data-theme="dark"] .pub-authors strong {
  color: #f3f4f6;
}

[data-theme="dark"] .award-badge {
  color: #f87171;
}

[data-theme="dark"] .pub-note {
  color: #9ca3af;
}

[data-theme="dark"] .pub-links a {
  color: #7986cb;
  border-color: #7986cb;
}

[data-theme="dark"] .pub-links a:hover {
  background: #7986cb;
  color: #1f2937;
}

[data-theme="dark"] .venue-badge.conf {
  background: rgba(121, 134, 203, 0.15);
  color: #c5cae9;
}

[data-theme="dark"] .venue-badge.preprint {
  background: rgba(156, 163, 175, 0.15);
  color: #d1d5db;
}

[data-theme="dark"] .exp-date {
  color: #9ca3af;
}

[data-theme="dark"] .exp-mentor a {
  color: #7986cb;
}

[data-theme="dark"] .exp-mentor a:hover {
  color: #9fa8da;
}

[data-theme="dark"] .pub-btn {
  background: #2a2b36;
  color: #d1d5db;
  border-color: #4b5563;
}

[data-theme="dark"] .pub-btn:hover {
  background: #374151;
  border-color: #6b7280;
  color: #f3f4f6;
}

[data-theme="dark"] .pub-btn.active {
  background: #4b5563;
  border-color: #9ca3af;
  color: #fff;
}

[data-theme="dark"] .pub-abstract {
  background: #2a2b36;
  color: #d1d5db;
  border-color: #3a3b46;
}

[data-theme="dark"] .pub-bibtex {
  background: #2a2b36;
  color: #d1d5db;
  border-color: #3a3b46;
}

/* Last updated footer */
.last-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Alegreya Sans SC", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
  letter-spacing: 0.03em;
  margin-top: 2rem;
  padding: 0.4rem 0.9rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.last-updated::before {
  content: "◷";
  font-size: 0.9em;
  color: #9ca3af;
}

@media (prefers-color-scheme: dark) {
  .last-updated {
    color: #9ca3af;
    background: #2a2b36;
    border-color: #3a3b46;
  }
  
  .last-updated::before {
    color: #6b7280;
  }
}

[data-theme="dark"] .last-updated {
  color: #9ca3af;
  background: #2a2b36;
  border-color: #3a3b46;
}

[data-theme="dark"] .last-updated::before {
  color: #6b7280;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .pub-card,
  .project-card,
  .exp-card {
    padding: 0.875rem 1rem;
  }

  .pub-title {
    font-size: 0.95rem;
  }

  .project-name {
    font-size: 1rem;
  }

  .pub-authors,
  .project-desc,
  .exp-mentor {
    font-size: 0.9rem;
  }

  .pub-badges img,
  .project-badges img {
    height: 16px;
  }
}
