body {
  font-family: Arial, sans-serif;
  background: #181c24;
  color: #e0e6ed;
  margin: 0;
  padding: 0;
}

/* Dynamically set background image from JS */
body.team-bg {
  background: #181c24 !important;
  background-image: none !important;
  background-size: initial !important;
}
h1 {
  text-align: center;
  margin-top: 2rem;
  color: #3fa7ff;
  font-family: Impact, Charcoal, sans-serif;
}
#team-container {
  column-count: 3;
  column-gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  width: 100%;
}
.card {
  display: inline-block;
  width: 100%;
  margin: 0 0 2rem 0;
  background: #23283a;
  color: #e0e6ed;
  border-radius: 10px;
  box-shadow: 0 0 0 8px rgba(34,40,58,0.12);
  overflow: hidden;
  transition: box-shadow 0.2s;
  height: auto;
  break-inside: avoid;
}
.card-header {
  position: relative;
  height: 320px;
  background: #23283a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 0;
}
.card-cover {
  width: 100%;
  aspect-ratio: 2/3;
  height: auto;
  min-height: 180px;
  max-height: 220px;
  position: relative;
  background-size: cover;
  background-position: center;
  z-index: 1;
  image-rendering: auto;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.card-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  left: 50%;
  top: calc(180px - 50px); /* Lowered: overlap bottom of cover */
  transform: translateX(-50%);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 2;
  background: #fff;
  border: 4px solid #23283a;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-avatar:hover {
  transform: translateX(-50%) scale(3.25);
  z-index: 10;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.card-fullname, .card-divider, .card-jobtitle {
  position: static;
}
.card-fullname {
  margin-top: 70px;
  font-size: 1.3rem;
  font-weight: bold;
  color: #e0e6ed;
  margin-bottom: 0.2em;
  z-index: 3;
  max-width: 90%;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}
.card-divider {
  width: 60%;
  margin: 0.2em auto 0.2em auto;
  border: 0;
  border-top: 1.5px solid #3fa7ff;
  opacity: 0.7;
}
.card-jobtitle {
  font-size: 0.95rem;
  color: #3fa7ff;
  margin: 0 0 0.5em 0;
  z-index: 3;
  max-width: 90%;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}
.card-main {
  padding-top: 10px; /* Reduced from 100px to decrease gap */
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.card-section {
  display: none;
}
.card-section.is-active {
  display: block;
  animation: fadeIn 0.5s both;
}
.card-section[data-section="experience"] {
  margin-top: 0;
  padding-top: 0;
  transition: none;
}
@media (max-width: 1000px) {
  #team-container {
    column-count: 2;
  }
}
@media (max-width: 700px) {
  #team-container {
    column-count: 1;
  }
}
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; }
}
.card-content {
  padding: 1.2rem 1.5rem 0.5rem 1.5rem;
}
.card-subtitle {
  font-weight: bold;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: #3fa7ff;
}
.card-desc {
  color: #b0c4de;
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
}
.card-timeline {
  margin-top: 1.2rem;
  position: relative;
  border-left: 2px solid #353b4a;
  padding-left: 1.2rem;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
}
.card-item {
  position: relative;
  margin-bottom: 1.2rem;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: visible;
  word-break: break-word;
  padding-left: 2.5rem; /* Add space for year label */
}
.card-item:last-child {
  margin-bottom: 0;
}
.card-item:before {
  content: attr(data-year);
  position: absolute;
  left: -2.8rem;
  top: 0.1rem;
  font-size: 0.95rem;
  color: #3fa7ff;
  font-weight: bold;
  min-width: 2.5rem;
  text-align: right;
  white-space: nowrap;
}
.card-item-title {
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  white-space: normal;
  word-break: break-word;
  color: #e0e6ed;
}
.card-item-desc {
  font-size: 0.97rem;
  color: #b0c4de;
  line-height: 1.5;
}
.card-buttons {
  display: flex;
  background: #23283a;
  border-top: 1px solid #353b4a;
  margin-top: auto;
}
.card-buttons button {
  flex: 1 1 auto;
  background: none;
  border: none;
  padding: 0.9rem 0;
  font-size: 1rem;
  color: #3fa7ff;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-bottom 0.2s;
}
.card-buttons button.is-active,
.card-buttons button:hover {
  color: #e0e6ed;
  border-bottom: 2px solid #3fa7ff;
}
