/* Instructors pages — list + profile, minimal, playful, responsive */

.page-instructor main,
.page-instructors main {
  padding-block: 0;
}

/* ── Hero ── */
.inst-hero {
  position: relative;
  padding: clamp(1.25rem, 3.5vw, 2rem) 0 clamp(2rem, 5vw, 2.75rem);
  overflow: hidden;
}

.inst-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 280px at 92% 8%, rgba(167, 139, 250, 0.14), transparent),
    radial-gradient(circle 240px at 4% 88%, rgba(78, 205, 196, 0.16), transparent),
    radial-gradient(circle 180px at 50% 100%, rgba(255, 217, 61, 0.12), transparent),
    linear-gradient(180deg, var(--cream-100) 0%, var(--bg-page) 100%);
  pointer-events: none;
}

.inst-hero__inner {
  position: relative;
}

.inst-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
}

.inst-hero__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.inst-avatar {
  position: relative;
  width: clamp(7.5rem, 22vw, 9.5rem);
  height: clamp(7.5rem, 22vw, 9.5rem);
  flex-shrink: 0;
}

.inst-avatar__ring {
  position: absolute;
  inset: -6px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--teal-400), var(--purple-400), var(--sun-400));
  opacity: 0.85;
  animation: inst-ring-spin 12s linear infinite;
}

@keyframes inst-ring-spin {
  to { transform: rotate(360deg); }
}

.inst-avatar__img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md);
  background: var(--teal-100);
}

.inst-avatar__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.inst-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--white);
  border: 2px solid var(--teal-100);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--teal-500);
  white-space: nowrap;
}

.inst-hero__copy {
  text-align: center;
}

.inst-hero__eyebrow {
  display: block;
  font-family: var(--font-en);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.inst-hero__title {
  font-size: clamp(1.375rem, 4vw, 1.75rem);
  line-height: 1.25;
  margin-bottom: var(--space-3);
}

.inst-hero__tagline {
  display: inline-block;
  margin: 0 0 var(--space-5);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--teal-100), var(--purple-50));
  border: 1px solid rgba(78, 205, 196, 0.25);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-700);
  line-height: 1.5;
}

.inst-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.inst-hero__actions .btn {
  min-height: var(--touch-min);
}

/* ── Mission quote ── */
.inst-quote {
  padding-block: var(--space-8);
}

.inst-quote__box {
  position: relative;
  max-width: 40rem;
  margin-inline: auto;
  padding: var(--space-6);
  padding-inline-start: calc(var(--space-6) + var(--space-2));
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--ink-700);
}

.inst-quote__box::before {
  content: '';
  position: absolute;
  inset-block: var(--space-5);
  inset-inline-start: var(--space-4);
  width: 4px;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, var(--coral-500), var(--teal-500));
}

.inst-quote__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--icon-box);
  height: var(--icon-box);
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--sun-100);
  color: var(--coral-500);
}

.inst-quote__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

/* ── Contact chips ── */
.inst-info {
  padding-block: var(--space-8);
  background: var(--white);
  border-block: 1px solid var(--border);
}

.inst-info__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.inst-chip {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--cream-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--ink-700);
  text-decoration: none;
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
}

a.inst-chip:hover {
  border-color: var(--teal-400);
  background: var(--teal-50);
  color: var(--teal-500);
  transform: translateY(-2px);
}

.inst-chip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--teal-500);
  box-shadow: var(--shadow-sm);
}

.inst-chip__body {
  min-width: 0;
}

.inst-chip__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.inst-chip__value {
  display: block;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}

/* ── Education ── */
.inst-edu {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--purple-50), var(--white));
  border: 2px solid var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.inst-edu__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--icon-box-lg);
  height: var(--icon-box-lg);
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--purple-100);
  color: var(--purple-500);
}

.inst-edu__title {
  font-size: var(--heading-card);
  margin: 0 0 var(--space-1);
}

.inst-edu__meta {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Experience ── */
.inst-exp {
  padding-block: var(--space-10);
}

.inst-exp__head {
  text-align: center;
  max-width: 28rem;
  margin: 0 auto var(--space-8);
}

.inst-exp__head h2 {
  margin-bottom: var(--space-2);
}

.inst-exp__head p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.inst-exp__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.inst-exp-card {
  padding: var(--space-6);
  background: var(--white);
  border: 2px solid var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.inst-exp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.inst-exp-card--teal { border-top: 4px solid var(--teal-500); }
.inst-exp-card--coral { border-top: 4px solid var(--coral-500); }

.inst-exp-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.inst-exp-card__title {
  font-size: var(--heading-card);
  margin: 0;
}

.inst-exp-card__years {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--teal-100);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--teal-500);
  white-space: nowrap;
}

.inst-exp-card--coral .inst-exp-card__years {
  background: var(--coral-100);
  color: var(--coral-500);
}

.inst-exp-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.inst-exp-card__list li {
  position: relative;
  padding-inline-start: var(--space-5);
  font-size: var(--text-sm);
  color: var(--ink-700);
  line-height: 1.6;
}

.inst-exp-card__list li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-400);
}

.inst-exp-card--coral .inst-exp-card__list li::before {
  background: var(--coral-400);
}

/* ── CTA ── */
.inst-cta {
  padding-block: var(--space-10) var(--space-12);
}

.inst-cta__box {
  text-align: center;
  max-width: 36rem;
  margin-inline: auto;
  padding: clamp(var(--space-6), 5vw, var(--space-8));
  background: linear-gradient(135deg, var(--teal-500), var(--teal-400));
  border-radius: var(--radius-xl);
  color: var(--white);
  box-shadow: 0 12px 40px rgba(78, 205, 196, 0.35);
}

.inst-cta__box h2 {
  color: var(--white);
  margin-bottom: var(--space-2);
}

.inst-cta__box p {
  margin: 0 0 var(--space-6);
  font-size: var(--text-sm);
  opacity: 0.92;
}

.inst-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.inst-cta__actions .btn-primary {
  background: var(--white);
  color: var(--teal-500);
  border-color: var(--white);
}

.inst-cta__actions .btn-primary:hover {
  background: var(--cream-50);
  color: var(--teal-500);
}

.inst-cta__actions .btn-outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
}

.inst-cta__actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: var(--white);
}

/* ── Responsive ── */
@media (min-width: 640px) {
  .inst-info__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .inst-info__grid .inst-chip:last-child {
    grid-column: 1 / -1;
  }

  .inst-exp__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .inst-hero__grid {
    grid-template-columns: auto 1fr;
    gap: var(--space-8);
    text-align: start;
  }

  .inst-hero__visual {
    align-items: center;
  }

  .inst-hero__copy {
    text-align: start;
  }

  .inst-hero__actions {
    justify-content: flex-start;
  }

  .inst-info__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .inst-info__grid .inst-chip:last-child {
    grid-column: auto;
  }

  .inst-info__layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-6);
    align-items: start;
  }
}

/* ── Instructors list ── */
.inst-hero--list {
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.inst-hero--list .inst-hero__grid {
  align-items: center;
}

.inst-hero--list .inst-hero__copy {
  text-align: center;
}

.inst-hero__viki {
  display: flex;
  justify-content: center;
  align-items: center;
}

.inst-list {
  padding-block: var(--space-8) var(--space-10);
}

.inst-list__intro {
  text-align: center;
  max-width: 28rem;
  margin: 0 auto var(--space-8);
}

.inst-list__intro p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
}

.inst-list__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  max-width: 52rem;
  margin-inline: auto;
}

.inst-card {
  border-radius: var(--radius-xl);
  background: var(--white);
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.inst-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.inst-card__link {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  padding: var(--space-5);
  text-decoration: none;
  color: inherit;
}

.inst-card__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.inst-card__avatar {
  position: relative;
  width: clamp(5.5rem, 18vw, 6.5rem);
  height: clamp(5.5rem, 18vw, 6.5rem);
  flex-shrink: 0;
}

.inst-card__avatar-ring {
  position: absolute;
  inset: -5px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--teal-400), var(--purple-400));
  opacity: 0.75;
}

.inst-card__avatar-img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-sm);
  background: var(--teal-100);
}

.inst-card__avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.inst-card__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--teal-100);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--teal-500);
}

.inst-card__body {
  text-align: center;
  min-width: 0;
}

.inst-card__name-en {
  display: block;
  font-family: var(--font-en);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.inst-card__name {
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  margin: 0 0 var(--space-2);
  line-height: 1.3;
}

.inst-card__tagline {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--ink-700);
  line-height: 1.65;
}

.inst-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch-min);
  padding: 0 var(--space-5);
  border-radius: var(--radius-full);
  background: var(--cream-50);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--teal-500);
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.inst-card:hover .inst-card__cta {
  background: var(--teal-100);
  border-color: rgba(78, 205, 196, 0.35);
}

.inst-card:nth-child(odd) .inst-card__avatar-ring {
  background: linear-gradient(135deg, var(--teal-400), var(--sun-400));
}

.inst-card:nth-child(even) .inst-card__avatar-ring {
  background: linear-gradient(135deg, var(--coral-400), var(--purple-400));
}

.inst-list__empty {
  text-align: center;
  max-width: 24rem;
  margin-inline: auto;
  padding: var(--space-10) var(--space-5);
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 2px dashed var(--border);
}

.inst-list__empty p {
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .inst-list__grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    max-width: none;
  }

  .inst-card__link {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-6);
  }

  .inst-card__visual {
    align-items: center;
  }

  .inst-card__body {
    text-align: start;
  }

  .inst-card__cta {
    justify-content: flex-start;
  }
}

@media (min-width: 768px) {
  .inst-hero--list .inst-hero__grid {
    grid-template-columns: 1fr auto;
    gap: var(--space-6);
  }

  .inst-hero--list .inst-hero__copy {
    text-align: start;
  }
}

@media (max-width: 480px) {
  .inst-hero__actions,
  .inst-cta__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .inst-hero__actions .btn,
  .inst-cta__actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inst-avatar__ring { animation: none; }

  .inst-exp-card:hover,
  a.inst-chip:hover,
  .inst-card:hover {
    transform: none;
  }
}
