.teacher-badge {
  display: inline-block;
  background: #eaf4ff;
  color: var(--primary);
  border: 1px solid rgba(0, 74, 173, 0.18);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.teacher-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 14px;
  border: 4px solid #eef4fb;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.teacher-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.secondary-button {
  background: linear-gradient(180deg, var(--primary) 0%, #003986 100%);
  box-shadow: 0 14px 26px rgba(0, 74, 173, 0.22);
}

.profile-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
}

.profile-photo {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  object-fit: cover;
  display: block;
  border: 5px solid #eef4fb;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.08);
}

.profile-copy h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--primary);
  margin-bottom: 10px;
}

.profile-copy p {
  color: #555;
  font-size: 1rem;
}

.profile-highlight {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 4px solid var(--primary);
  background: #f7fbff;
  border-radius: 10px;
  color: #35506b;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.info-box {
  background: #fafafa;
  border: 1px solid #e8edf2;
  border-radius: 14px;
  padding: 18px;
}

.info-box strong {
  display: block;
  color: var(--primary);
  margin-bottom: 8px;
}

.profile-list {
  padding-left: 18px;
  color: #444;
}

.profile-list li + li {
  margin-top: 8px;
}

@media (max-width: 700px) {
  .profile-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-photo {
    margin: 0 auto;
  }

  .profile-highlight {
    text-align: left;
  }
}

.teacher-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 14px 0;
}

.teacher-tag {
  background: #f4f8fc;
  color: var(--primary);
  border: 1px solid #dbe7f3;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.teacher-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 14px 0;
}

.teacher-tag {
  background: #f4f8fc;
  color: var(--primary);
  border: 1px solid #dbe7f3;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.teacher-tag-button {
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, background 0.2s ease;
}

.teacher-tag-button:hover {
  background: #eaf4ff;
  transform: translateY(-1px);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 2000;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  position: relative;
  width: min(100%, 760px);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  animation: modalRise 0.22s ease;
}

.modal-card h3 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.modal-subtitle {
  color: #667085;
  margin-bottom: 20px;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.modal-box {
  background: #fafafa;
  border: 1px solid #e8edf2;
  border-radius: 14px;
  padding: 18px;
}

.modal-box strong {
  display: block;
  color: var(--primary);
  margin-bottom: 10px;
}

.modal-box ul {
  padding-left: 18px;
  color: #444;
}

.modal-box li + li {
  margin-top: 6px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-close:hover {
  background: #e2e8f0;
}

@keyframes modalRise {
  from {
    transform: translateY(10px) scale(0.98);
    opacity: 0.7;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .modal-card {
    padding: 22px 18px;
    border-radius: 18px;
  }
}