body {
  background: #fff;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, 'Liberation Sans', sans-serif;
  color: #222;
  margin: 0;
  padding: 50px;
  padding-bottom: 20px;
  font-size: 15px;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-top: 0;
}

p, ul, ol, table, pre, dl {
  font-size: 15px;
  margin: 0 0 0 0;
}

/* Add spacing between main sections */
section#experiences,
section#education,
section#publications,
section#teaching {
  margin-top: 3em;
}

header, section {
  width: 100%;
  position: static;
}

h2, h3 {
    margin-top: 0.7em;
    margin-bottom: 0.3em;
    padding-bottom: 0.2em;
    line-height: 1.0;
    padding-top: 0.5em;
    border-bottom: 1px solid #aaaaaa;
}

h2 {
    font-size: 155%;
}

h2 + h3 {
    padding-top: 0.2em;
}

h3 {
    font-size: 110%;
    border-bottom: none;
}

footer {
  width: 100%;
  color: #aaaaaa;
  text-align: center;
  margin: 65px 0 0 0;
}

/* Experience section styles */
.experience-item {
  margin-bottom: 1.5em;
}
.experience-item p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3em;
}
.experience-item .date,
.experience-item .location {
  font-size: 0.95em;
  color: #666;
}

/* Education section styles */
.education-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5em;
}
.education-logo {
  width: 45px;
  height: 45px;
  margin-right: 15px;
  flex-shrink: 0;
}
.education-details {
  flex: 1;
}
.education-details .date {
  color: #666;
  font-size: 0.95em;
}

/* Publications section styles */
.publications-list {
  list-style: none;
  padding-left: 0;
}
.publications-list li {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
  position: relative;
}
.publications-list li:before {
  content: "•";
  position: absolute;
  left: 0;
}
.publication-title {
  margin-bottom: 0.3em;
}
.publication-authors {
  margin-bottom: 0.3em;
  color: #555;
}
.publication-links a {
  color: #2980d9;
  text-decoration: none;
  font-weight: bold;
}
.publication-links a:hover {
  text-decoration: underline;
}
.publication-links .tag {
  color: #888;
}

/* Teaching section styles */
.teaching-list {
  list-style: none;
  padding-left: 0;
}
.teaching-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8em;
  padding-left: 1.5em;
  position: relative;
}
.teaching-list li:before {
  content: "•";
  position: absolute;
  left: 0;
}
.teaching-list .date {
  color: #666;
  font-size: 0.95em;
  white-space: nowrap;
}

.layout-flex {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  width: 290px;
  min-width: 230px;
  max-width: 340px;
  padding: 0 0 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sidebar-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 18px 0 18px;
}
.sidebar-name {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 6px;
  text-align: center;
}
.sidebar-title {
  font-size: 1em;
  color: #555;
  margin-bottom: 10px;
  text-align: center;
}
.sidebar-desc {
  font-size: 0.98em;
  color: #666;
  margin-bottom: 18px;
  text-align: center;
  line-height: 1.5;
}
.sidebar-contact {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}
.sidebar-contact a {
  color: #2980d9;
  text-decoration: none;
  word-break: break-all;
}
.sidebar-contact i {
  margin-right: 6px;
  color: #888;
}
.sidebar-social {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 20px;
}
.sidebar-social a {
  color: #2980d9;
  font-size: 1.35em;
  transition: color 0.2s;
}
.sidebar-social a:hover {
  color: #1a5fa0;
}
.main-content {
  flex: 1 1 0%;
  padding: 18px 40px 40px 48px;
  min-width: 0;
}
.main-content > *:first-child {
  margin-top: 0;
}
.main-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
}
@media (max-width: 900px) {
  .layout-flex {
    flex-direction: column;
    max-width: 100vw;
  }
  .sidebar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid #eee;
    padding-bottom: 0;
  }
  .sidebar-inner {
    padding: 24px 8vw 0 8vw;
  }
  .main-content {
    padding: 32px 4vw 24px 4vw;
  }
}
@media (max-width: 600px) {
  .avatar {
    width: 120px;
    height: 120px;
  }
  .sidebar-inner {
    padding: 16px 2vw 0 2vw;
  }
  .main-content {
    padding: 18px 2vw 12px 2vw;
  }
}

@media print, screen and (max-width: 720px) {
  body {
    word-wrap:break-word;
  }
  section { padding: 0 2vw; }
}

@media print, screen and (max-width: 480px) {
  body {
    padding:15px;
  }
  .avatar {
    width: 120px;
    max-width: 120px;
    min-width: 90px;
  }
  section { padding: 0 1vw; }
}

