/* Custom styles for academic homepage */

/* Publication card layout */
.pub-entry {
  display: flex;
  flex-direction: row;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

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

.pub-img {
  flex: 0 0 200px;
  width: 200px;
  aspect-ratio: 16 / 9;
  margin-right: 20px;
  background-color: #f5f5f5;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pub-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.pub-content {
  flex: 1;
}

.pub-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  line-height: 1.4;
}

.pub-title a {
  color: #333;
  text-decoration: none;
}

.pub-title a:hover {
  color: #337ab7;
  text-decoration: underline;
}

.pub-venue {
  font-size: 0.95em;
  color: #666;
  margin-bottom: 5px;
}

.pub-venue .award {
  color: #d9534f;
  font-weight: 600;
}

.pub-venue .to-appear {
  color: #5cb85c;
  font-weight: 500;
  font-style: italic;
}

/* Project card layout */
.project-entry {
  display: flex;
  flex-direction: row;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.project-entry:last-child {
  border-bottom: none;
}

.project-icon {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  margin-right: 15px;
  background-color: #f5f5f5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.project-content {
  flex: 1;
}

.project-title {
  font-size: 1.05em;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.project-title a {
  color: #337ab7;
  text-decoration: none;
}

.project-title a:hover {
  text-decoration: underline;
}

.project-desc {
  font-size: 0.9em;
  color: #555;
  line-height: 1.5;
}

.project-links {
  margin-top: 8px;
}

.project-links a {
  display: inline-block;
  margin-right: 10px;
  padding: 3px 8px;
  font-size: 0.8em;
  color: #fff;
  background-color: #333;
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.project-links a:hover {
  background-color: #555;
}

.pub-authors {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 8px;
}

.pub-authors .me {
  font-weight: 600;
}

.pub-links {
  margin-top: 10px;
}

.pub-links a {
  display: inline-block;
  margin-right: 10px;
  margin-bottom: 5px;
  padding: 4px 10px;
  font-size: 0.85em;
  color: #fff;
  background-color: #337ab7;
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.pub-links a:hover {
  background-color: #23527c;
  text-decoration: none;
}

.pub-links a.github {
  background-color: #333;
}

.pub-links a.github:hover {
  background-color: #555;
}

.pub-links a.project {
  background-color: #5cb85c;
}

.pub-links a.project:hover {
  background-color: #449d44;
}

/* Intern/Experience section */
.intern-entry {
  display: flex;
  flex-direction: row;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.intern-entry:last-child {
  border-bottom: none;
}

.intern-logo {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  margin-right: 20px;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.intern-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.intern-content {
  flex: 1;
}

.intern-title {
  font-size: 1.05em;
  font-weight: 600;
  color: #333;
  margin-bottom: 3px;
}

.intern-company {
  font-size: 0.95em;
  color: #337ab7;
  margin-bottom: 3px;
}

.intern-time {
  font-size: 0.85em;
  color: #888;
  margin-bottom: 5px;
}

.intern-desc {
  font-size: 0.9em;
  color: #555;
  line-height: 1.5;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .pub-entry {
    flex-direction: column;
  }
  
  .pub-img {
    flex: none;
    width: 100%;
    max-width: 300px;
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .intern-entry {
    flex-direction: column;
  }
  
  .intern-logo {
    flex: none;
    margin-right: 0;
    margin-bottom: 10px;
  }
}

/* Section headers */
.section-title {
  font-size: 1.5em;
  font-weight: 600;
  color: #333;
  margin-top: 30px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #337ab7;
}

/* Dark mode support - for academicpages theme toggle */
html[data-theme="dark"] .pub-img {
  background-color: #2a2a2a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

html[data-theme="dark"] .pub-title,
html[data-theme="dark"] .pub-title a,
html[data-theme="dark"] .intern-title,
html[data-theme="dark"] .project-title {
  color: #e0e0e0;
}

html[data-theme="dark"] .pub-title a:hover {
  color: #5bc0de;
}

html[data-theme="dark"] .pub-venue,
html[data-theme="dark"] .pub-authors,
html[data-theme="dark"] .intern-desc,
html[data-theme="dark"] .project-desc {
  color: #b0b0b0;
}

html[data-theme="dark"] .pub-entry,
html[data-theme="dark"] .intern-entry,
html[data-theme="dark"] .project-entry {
  border-bottom-color: #555;
}

html[data-theme="dark"] .section-title {
  color: #e0e0e0;
}

html[data-theme="dark"] .project-icon {
  background-color: #2a2a2a;
}

/* Also support system preference for users who haven't toggled */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .pub-img {
    background-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }
  
  html:not([data-theme="light"]) .pub-title,
  html:not([data-theme="light"]) .intern-title {
    color: #e0e0e0;
  }
  
  html:not([data-theme="light"]) .pub-venue,
  html:not([data-theme="light"]) .pub-authors,
  html:not([data-theme="light"]) .intern-desc {
    color: #b0b0b0;
  }
  
  html:not([data-theme="light"]) .pub-entry,
  html:not([data-theme="light"]) .intern-entry {
    border-bottom-color: #555;
  }
  
  html:not([data-theme="light"]) .section-title {
    color: #e0e0e0;
  }
}

