/* Compact, clean, and DRY styles for all pages */
body {
  margin: 0;
  font-family: 'Courier New', Arial, sans-serif;
}

header {
  background: #222;
  color: #fff;
  padding: 0;
}

.container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  background: #f5f5f5;
  width: 280px;
  padding: 2rem 1rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-image, .photo-row .photo, .photo {
  border-radius: 50%;
  object-fit: cover;
  width: 200px;
  height: 200px;
  display: block;
  cursor: pointer;
  transition: box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content-area {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.side-nav {
  background: #222;
  padding: 0;
}
.side-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  border-bottom: 1px solid #444;
}
.side-nav li {
  margin: 0;
}
.side-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 1rem 2rem;
  font-weight: bold;
  transition: background 0.2s;
}
.side-nav a:hover {
  background: #444;
}

.main-content {
  padding: 2rem;
  background: #fff;
  flex: 1;
}

h1, h2, h3 {
  color: #2a6496;
}

.sidebar-info p {
  margin: 0.5em 0;
  display: flex;
  align-items: center;
  font-size: 1em;
}
.sidebar-info i {
  margin-right: 0.6em;
  min-width: 1.2em;
  text-align: center;
}
.sidebar-info a {
  color: #222;
  text-decoration: none;
}
.sidebar-info a:hover {
  text-decoration: underline;
}

/* List styles for publications, teaching, cv, etc. */
.cv-list {
  padding-left: 1.2em;
  margin-bottom: 2em;
}
.cv-list ol {
  margin-bottom: 1em;
  line-height: 1.4;
} 
.cv-list li {
  margin-bottom: 1em;
  line-height: 1.4;
}
.cv-list .fa-link {
  margin-left: 0.4em;
  color: #0077b6;
}
.cv-meta {
  color: #555;
  font-style: italic;
  font-size: 1em;
}

/* Modal styles */
#modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}
#modal img {
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
#modal.close {
  cursor: pointer;
}

/* Flex row for photo + text side by side */
.photo-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 1em;
}
.photo-row .photo {
  flex-shrink: 0;
  width: 200px;
  height: auto;
}
.photo-row .description {
  margin: 0;
}

/* Talk entry styles */
.talk-entry {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 2rem;
}

.talk-entry-img {
  flex: 0 0 auto;
}

.talk-entry-content {
  flex: 1 1 0;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
    min-height: unset;
  }
  .sidebar {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem 0.5rem;
  }
  .profile-image {
    width: 100px;
    height: 100px;
    margin-right: 1rem;
  }
  .sidebar-info {
    flex: 1;
  }
  .side-nav ul {
    flex-direction: column;
    border-bottom: none;
  }
  .side-nav a {
    padding: 0.75rem 1rem;
    font-size: 1.1em;
  }
  .main-content {
    padding: 1rem;
  }
  .talk-entry {
    flex-direction: column;
    gap: 12px;
  }
  .talk-entry-img, .photo-row .photo {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  .photo, .profile-image {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 500px) {
  body {
    font-size: 15px;
  }
  .main-content {
    padding: 0.5rem;
  }
  .sidebar {
    padding: 0.5rem 0.2rem;
  }
  .profile-image, .photo {
    width: 70px;
    height: 70px;
  }
  h1, h2 {
    font-size: 1.2em;
  }
  .talk-entry-content h2 {
    font-size: 1em;
  }
}



