/* Modern Academic Website Stylesheet */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Header Section */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
}

.header-left {
  flex: 1;
}

.name {
  font-size: 62px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #000;
}

.affiliation {
  font-size: 24px;
  color: #666;
  font-style: italic;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #555;
  text-decoration: none;
  font-size: 18px;
  transition: color 0.2s;
}

.social-link:hover {
  color: #1772d0;
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.profile-picture {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
  margin-left: 30px;
}

/* About Section */
.about-section {
  margin-bottom: 40px;
}

.about-section p {
  font-size: 18px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 16px;
}

.about-section a {
  color: #1772d0;
  text-decoration: none;
  font-weight: 500;
}

.about-section a:hover {
  text-decoration: underline;
}

/* Research Section */
.research-section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 16px;
}

.research-section p {
  font-size: 18px;
  line-height: 1.8;
  color: #444;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 40px;
  margin-top: 0;
  border-bottom: 2px solid #e0e0e0;
}

.nav-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  font-size: 18px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  font-family: inherit;
}

.nav-tab:hover {
  color: #1772d0;
}

.nav-tab.active {
  color: #000;
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #000;
}

/* Publications/Content Grid */
.content-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 0;
}

/* Publications Table Style */
.publications-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  table-layout: fixed;
}

.publications-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #e0e0e0;
}

.publications-table th {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  border-bottom: 2px solid #e0e0e0;
}

.table-header-title {
  width: 70%;
  text-align: left;
}

.table-header-venue {
  width: 30%;
  text-align: right;
}

.publications-table tbody tr {
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.publications-table tbody tr:last-child {
  border-bottom: none;
}

.publications-table tbody tr:hover {
  background-color: #f8f9fa;
}

.publications-table tbody tr.highlighted {
  background-color: #ffffd0;
}

.publications-table tbody tr.highlighted:hover {
  background-color: #ffffb0;
}

.publications-table td {
  padding: 14px 20px;
  vertical-align: top;
}

.publication-title-cell {
  width: 70%;
  font-size: 18px;
  font-weight: 700;
  color: #000;
  line-height: 1.6;
  text-align: left;
}

.publication-venue-cell {
  width: 30%;
  font-size: 16px;
  color: #666;
  font-weight: 400;
  text-align: right;
}

/* Publication Detail Modal */
.publication-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.publication-modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 40px;
  border: none;
  width: 90%;
  max-width: 800px;
  border-radius: 8px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.publication-modal-close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 32px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.publication-modal-close:hover {
  color: #000;
}

.publication-detail-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
  color: #000;
}

.publication-detail-authors {
  font-size: 16px;
  color: #555;
  margin-bottom: 12px;
  line-height: 1.6;
}

.publication-detail-venue {
  font-size: 15px;
  color: #666;
  font-style: italic;
  margin-bottom: 20px;
}

.publication-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.publication-detail-abstract-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 12px;
}

.publication-detail-abstract-text {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
}

/* Old publication card style (for cards with thumbnails) - keep for projects */
.project-card {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: transparent;
  border: none;
  border-radius: 0;
  transition: none;
}

.project-card:hover {
  box-shadow: none;
  border-color: transparent;
}

.publication-thumbnail {
  width: 200px;
  min-width: 200px;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  border-radius: 6px;
  background: #f5f5f5;
}

.publication-content {
  flex: 1;
  position: relative;
  padding-right: 100px;
  padding-top: 2px;
}

.publication-category {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.publication-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
  padding-right: 0;
}

.publication-title a {
  color: #000;
  text-decoration: none;
}

.publication-title a:hover {
  color: #1772d0;
}

.publication-authors {
  font-size: 16px;
  color: #555;
  margin-bottom: 6px;
  line-height: 1.6;
}

.publication-authors a {
  color: #555;
  text-decoration: none;
}

.publication-authors a:hover {
  color: #1772d0;
  text-decoration: underline;
}

.publication-venue {
  font-size: 16px;
  color: #777;
  font-style: italic;
  margin-bottom: 12px;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.pub-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f5f5f5;
  border-radius: 4px;
  text-decoration: none;
  color: #555;
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}

.pub-link:hover {
  background: #1772d0;
  color: #fff;
}

.pub-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.publication-description {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
  margin-top: 8px;
}

/* Blog-style Misc Section */
.misc-blog-item {
  margin-bottom: 50px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e0e0e0;
}

.misc-blog-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.misc-blog-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.misc-blog-title {
  font-size: 24px;
  font-weight: 700;
  color: #000;
  margin-bottom: 12px;
  margin-top: 20px;
}

.misc-blog-description {
  font-size: 16px;
  color: #666;
  line-height: 1.8;
  margin-top: 12px;
}

.misc-blog-date {
  font-size: 14px;
  color: #999;
  margin-bottom: 16px;
  font-style: italic;
}

/* Hidden content */
.hidden {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
  }

  .profile-picture {
    width: 150px;
    height: 150px;
    margin-left: 0;
    margin-top: 20px;
  }

  .name {
    font-size: 28px;
  }

  .project-card {
    flex-direction: column;
  }

  .publications-table {
    font-size: 14px;
  }

  .publications-table th,
  .publications-table td {
    padding: 10px 12px;
  }

  .publication-title-cell {
    font-size: 14px;
  }

  .publication-venue-cell {
    font-size: 13px;
  }

  .publication-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .publication-card-title {
    padding-right: 0;
  }

  .publication-card-venue {
    align-self: flex-end;
  }

  .publication-thumbnail {
    width: 100%;
    height: 200px;
  }

  .nav-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}