/* ============================================
   Components — Cards, Profile, Timeline, Buttons
   ============================================ */

/* --- About / Profile --- */
.about {
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-template-rows: auto auto;
  gap: var(--space-3xl);
  align-items: start;
}

.about__photo-wrapper {
  grid-column: 1;
  grid-row: 1;
}

.about__content {
  grid-column: 2;
  grid-row: 1 / 3;
}

.about__news {
  grid-column: 1;
  grid-row: 2;
}

/* --- About News (inline) --- */
.about__news .about__heading {
  margin-bottom: var(--space-md);
}

.about__news-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-height: 280px;
  overflow-y: hidden;
  padding-right: var(--space-xs);
}

.about__news-list:hover {
  overflow-y: auto;
}

.about__news-item {
  display: flex;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  line-height: 1.5;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

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

.about__news-date {
  color: var(--color-accent);
  font-weight: 600;
  white-space: nowrap;
  min-width: 70px;
  font-size: var(--text-xs);
}

.about__news-text {
  color: var(--color-text-secondary);
}

.about__photo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.about__photo {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-accent-light);
  box-shadow: 0 8px 32px var(--color-shadow);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.about__photo:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 40px var(--color-shadow-hover);
}

.about__social {
  display: flex;
  gap: var(--space-md);
}

.about__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-size: var(--text-xl);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.about__social-link:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
}

.about__content h1 {
  margin-bottom: var(--space-sm);
}

.about__subtitle {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  margin-bottom: var(--space-xl);
}

.about__bio {
  margin-bottom: var(--space-xl);
}

.about__heading {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.about__interests {
  margin-bottom: var(--space-xl);
}

.about__interests ul {
  list-style: none;
  padding: 0;
}

.about__interests li {
  padding: var(--space-xs) 0;
  padding-left: var(--space-lg);
  position: relative;
}

.about__interests li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.about__vision {
  padding: var(--space-lg);
  background: var(--color-accent-light);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--color-accent);
}

.about__vision p {
  color: var(--color-text);
  font-style: italic;
  margin-bottom: 0;
}

/* --- Publication Cards --- */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.pub-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.pub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--color-shadow-hover);
  border-color: var(--color-accent);
}

.pub-card__img {
  width: 100%;
  border-radius: var(--border-radius-sm);
  object-fit: contain;
  height: auto;
}

.pub-card__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.pub-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.pub-card__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.pub-card__badge--accepted {
  background: #d4edda;
  color: #155724;
}

[data-theme="dark"] .pub-card__badge--accepted {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.pub-card__badge--award {
  background: #fff3cd;
  color: #856404;
}

[data-theme="dark"] .pub-card__badge--award {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
}

.pub-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  line-height: var(--leading-tight);
}

.pub-card__authors {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: calc(-1 * var(--space-sm) + 2px);
}

.pub-card__note {
  font-size: var(--text-xs);
}

.pub-card__venue {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-style: italic;
  letter-spacing: -0.05em;
}

.pub-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.pub-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.pub-card__link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
}

.pub-card__video {
  margin-top: var(--space-md);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.pub-card__video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- CV Section --- */
.cv-section {
  text-align: center;
}

/* --- CV Modal --- */
.cv-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.cv-modal.open {
  display: flex;
}

.cv-modal__inner {
  position: relative;
  width: 90vw;
  height: 90vh;
  max-width: 900px;
  background: var(--color-bg-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
  animation: lightbox-in 0.25s ease;
}

.cv-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.cv-modal__close:hover {
  opacity: 1;
}

.cv-modal__iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* --- News Timeline --- */
.news-timeline {
  position: relative;
  padding-left: var(--space-2xl);
}

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

.news-item {
  position: relative;
  padding-bottom: var(--space-xl);
}

.news-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-2xl) + 4px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-timeline-dot);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.news-item__date {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

.news-item__content {
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

.news-item__content a {
  font-weight: 500;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--border-radius);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
  animation: lightbox-in 0.25s ease;
}

@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.lightbox__close:hover {
  opacity: 1;
}

.lightbox-trigger {
  cursor: zoom-in;
}

/* --- Responsive Components --- */
@media (max-width: 768px) {
  .about {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    text-align: center;
  }

  .about__photo-wrapper,
  .about__content,
  .about__news {
    grid-column: 1;
    grid-row: auto;
  }

  .about__news {
    text-align: left;
  }

  .about__photo {
    width: 160px;
    height: 160px;
  }

  .about__social {
    justify-content: center;
  }

  .about__interests ul {
    text-align: left;
  }

  .about__vision {
    text-align: left;
  }

  .pub-card {
    grid-template-columns: 1fr;
  }

  .pub-card__img {
    max-height: none;
  }

  .cv-embed {
    height: 400px;
  }
}
