/*
 * Card Components
 * Layouts for publications, projects, and content cards
 */

/* ============================================
   BASE CARD STYLES
   ============================================ */

.card {
  background-color: var(--color-bg-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

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

.card:last-child {
  margin-bottom: 0;
}

/* ============================================
   PUBLICATION CARD
   ============================================ */

.publication-card {
  /* Inherits from .card */
}

.publication-card .card-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-heading);
  margin-bottom: var(--spacing-md);
  line-height: var(--line-height-tight);
}

.publication-card .card-title a {
  color: var(--color-heading);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.publication-card .card-title a:hover {
  color: var(--color-link);
}

/* Publication metadata line */
.publication-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  align-items: center;
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
}

.publication-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.publication-meta .meta-separator {
  color: var(--color-text-tertiary);
}

.publication-meta .authors {
  font-style: normal;
}

.publication-meta .author-highlight {
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.publication-meta .venue {
  font-style: italic;
  color: var(--color-text-primary);
}

.publication-meta .year {
  font-weight: var(--font-weight-medium);
}

/* Publication abstract */
.publication-abstract {
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-lg);
  text-align: justify;
}

/* Publication tags */
.publication-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.tag {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  background-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--border-radius-sm);
  border: var(--border-width) solid var(--color-border);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.tag:hover {
  background-color: var(--color-link);
  color: white;
  border-color: var(--color-link);
}

/* Publication links */
.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  align-items: center;
}

.publication-link,
.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-lg);
  background-color: transparent;
  color: var(--color-link);
  font-family: var(--font-heading);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 1px;
  border: var(--border-width) solid var(--color-link);
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
}

.publication-link:hover,
.cta:hover {
  background-color: var(--color-link);
  color: white;
}

.publication-link.primary,
.cta.primary {
  background-color: var(--color-link);
  color: white;
}

.publication-link.primary:hover,
.cta.primary:hover {
  background-color: var(--color-link-hover);
  border-color: var(--color-link-hover);
}

/* ============================================
   PROJECT CARD
   ============================================ */

.project-card {
  /* Inherits from .card */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.project-card .card-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-heading);
  margin-bottom: var(--spacing-sm);
  line-height: var(--line-height-tight);
}

.project-card .card-title a {
  color: var(--color-heading);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.project-card .card-title a:hover {
  color: var(--color-link);
}

/* Project with image layout */
.project-card.with-image {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

@media (min-width: 768px) {
  .project-card.with-image {
    grid-template-columns: 2fr 1fr;
  }

  .project-card.with-image .project-image {
    order: 2;
  }

  .project-card.with-image .project-content {
    order: 1;
  }
}

/* Project image */
.project-image {
  width: 100%;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  border: var(--border-width) solid var(--color-border);
}

.project-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Project description */
.project-description {
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
}

/* Project technical details */
.project-tech {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
  border-left: 3px solid var(--color-border);
}

/* Project links */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-top: auto;
}

/* ============================================
   SIMPLE INFO CARD (for About page, etc.)
   ============================================ */

.info-card {
  background-color: var(--color-bg-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-lg);
  color: var(--color-heading);
}

.info-card p {
  margin-bottom: var(--spacing-md);
  line-height: var(--line-height-relaxed);
}

.info-card p:last-child {
  margin-bottom: 0;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  .card {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
  }

  .publication-card .card-title,
  .project-card .card-title {
    font-size: var(--font-size-lg);
  }

  .publication-meta {
    font-size: var(--font-size-xs);
    gap: var(--spacing-sm);
  }

  .publication-abstract,
  .project-description {
    font-size: var(--font-size-sm);
  }

  .publication-links,
  .project-links {
    flex-direction: column;
    align-items: stretch;
  }

  .publication-link,
  .cta {
    justify-content: center;
    width: 100%;
  }

  .project-card.with-image {
    grid-template-columns: 1fr;
  }

  .project-card.with-image .project-image {
    order: 1;
  }

  .project-card.with-image .project-content {
    order: 2;
  }
}
