/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Base */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Links */
a { color: #1a5276; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Headings */
h1 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

h2 {
  font-size: 1.3rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.3rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

p { margin-bottom: 0.8rem; }

/* Header */
.subtitle {
  color: #666;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* Profile section */
.profile {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.profile img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-text p:first-child {
  margin-top: 0;
}

/* Contact links */
.contact-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Languages & Skills */
.tags {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.5rem;
}

/* Research interests */
.research-interests {
  padding-left: 1.25rem;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.research-interests li {
  margin-bottom: 0.4rem;
}

/* News list */
.news-list {
  list-style: none;
  padding: 0;
}

.news-list li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.news-date {
  color: #888;
  font-size: 0.85rem;
  min-width: 6rem;
  display: inline-block;
}

/* Publications */
.pub {
  margin-bottom: 1.25rem;
}

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

.pub-authors {
  font-size: 0.9rem;
  color: #555;
}

.pub-venue {
  font-size: 0.85rem;
  color: #777;
  font-style: italic;
}

.pub-status {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  background: #e8e8e8;
  color: #555;
  margin-left: 0.25rem;
}

.pub-status.published { background: #d4edda; color: #155724; }
.pub-status.accepted { background: #d4edda; color: #155724; }
.pub-status.under-revision { background: #d1ecf1; color: #0c5460; }
.pub-status.under-review { background: #fff3cd; color: #856404; }

details summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: #1a5276;
  margin-top: 0.2rem;
}

details p {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.4rem;
  padding-left: 0.5rem;
  border-left: 2px solid #ddd;
}

/* CV sections */
.cv-section {
  margin-bottom: 1.5rem;
}

.cv-section h3 {
  margin-top: 1rem;
}

.cv-entry {
  margin-bottom: 1rem;
}

.cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.cv-entry-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.cv-entry-year {
  font-size: 0.85rem;
  color: #888;
  white-space: nowrap;
}

.cv-entry-institution {
  font-size: 0.9rem;
  color: #555;
  font-style: italic;
}

.cv-entry ul {
  margin-top: 0.25rem;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

.cv-entry li {
  margin-bottom: 0.15rem;
}

/* Nested list (skills) */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
  font-size: 0.9rem;
}

.skills-grid dt {
  font-weight: 600;
  grid-column: 1;
}

.skills-grid dd {
  grid-column: 2;
  color: #555;
}

/* Footer */
footer {
  max-width: 800px;
  margin: 2rem auto 0;
  padding: 1rem 1.5rem;
  border-top: 1px solid #ddd;
  font-size: 0.8rem;
  color: #999;
  text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
  .profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-links {
    justify-content: center;
  }

  .cv-entry-header {
    flex-direction: column;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid dd {
    grid-column: 1;
    margin-bottom: 0.5rem;
  }
}
